0

I installed HTML purifier because the default input format is filtered HTML and my users need to be able to add inline styles to the elements in their nodes. I'm trying to get it to work, but it is not very intuitive and there doesn't seem to be much documentation out there.

Can someone please suggest a tutorial or tell me how I can add the style attribute as well as width and height?

2
  • You have gone to htmlpurifier.org right?
    – Jimajamma
    Dec 5 '11 at 0:24
  • Yes I have... a screencast or some sort of tutorial would have been helpful, but they don't provide any.
    – Jane
    Dec 5 '11 at 0:39
1

What wysiwyg editor are you using? In my end I'm using TinyMCE and I have a related task as yours. What I did was I created a plugin to insert a class on a selected texts. Doing this will provide a convenient way to your users to add styles.

Note: you can use hook_wysywyg_plugin() for this.

Hope this help!

2
  • I use ckeditor... not sure how to implement your solution, though...?
    – Jane
    Dec 5 '11 at 2:24
  • 1
    Well It doesn't matter what editor you are using as long as your plugin is not dependent in any editors. Using hook_wywiwyg_plugin makes your plugin to be independent from any editors you are using. Here are some links to help you out drupal.org/node/152046 api.lullabot.com/hook_wysiwyg_plugin Dec 5 '11 at 2:47

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.