3

I'm using the CKEditor Module in combination with the Token insert (ckeditor) to show a user property in my body.

It looks like this: enter image description here

But the results shows just the static text instead of the user property. What am I doing wrong?

UPDATE:

I've also tried to add the Token insert button to my editor like this:

enter image description here

But every time I save this and check again it is switched back.

These modules are enabled:

  • Entity Tokens
  • Token insert (ckeditor)
  • Token insert (text)
  • Token insert UI
  • Token

UPDATE:

The test gave me a result like this:

enter image description here

I tried to add a random number in my text field but the result just gave me the static text [random:number] instead of a random number...

6
  • Is the Token Module Installed??
    – eyoung100
    May 20, 2014 at 16:41
  • Yes, The Token module is installed. Also Entity Tokens, Tokens insert (ckeditor), Token insert (text) and Token insert UI.
    – nielsv
    May 20, 2014 at 18:10
  • Are you using one of the core tokens? I'm trying to determine if it's your addin module, or a misconfigured Drupal Core...
    – eyoung100
    May 20, 2014 at 18:18
  • I've tried it with for ex.: [current-page:url] and with a user property like: [current-user:name]. Both just gave the exact text back.
    – nielsv
    May 20, 2014 at 21:06
  • What does this test yield?
    – eyoung100
    May 20, 2014 at 21:12

3 Answers 3

5

You need to install the token filter module for the token insert to work.

Download the module.

Configure the tokens you want to use by role or globaly.

enter image description here

and add the filter in the Text Format:

enter image description here

Then you can use the ckeditor plugin to add the token in the Fields that have this Text format, and thats all.

I've just test and it works perfect.

0
0

You can try the Advanced Text Formatter module.

It has Token Replace feature. Personally, I like the idea replace the tokens using Field Display, you can choose to replace any fields in whatever (display) mode you want.

It's more flexible and good for performance. The con is it works only for field :)

0

token_filter was not installed for me. It's not a dependency but it is required for this to work. "Replace tokens" filter is not available without it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.