Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By encho on
Hi, if I try to put something like:
<span style="font-weight: bold;">
the "style=..." part gets stripped from the code. I have allowed 'Filtered HTML' input format to accept spans. How to make it work? Many RTEs are using this kind of formatting instead of 'strong' or 'b'.
Comments
You can't make this work
You can't make this work with the HTML filter; it always strips the style attribute as its contents can be used to execute JavaScript.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
if you're using a rich text
if you're using a rich text editor, it should be using the 'strong' tag for simple bolding. (what editor are you using that inserts 'span' tags for that? the only RTE i've used with Drupal is TinyMCE.)
if you want to manually edit your HTML, you could just create a class in your stylesheet, and use that instead of the 'style' attribute. (better coding practice, anyway...)
FCK and NicEdit. I prefer
FCK and NicEdit. I prefer using those two. Guess I'll have to switch to TinyMCE then :-(
TinyMCE align button uses
TinyMCE align button uses style="text-aling: center" attribute.
And all other editors too.
What shoud I do? Disable "Filtered HTML"???
Viatcheslav Joukov
2008 and no one has come up with a solution.
Why the editors are not using div tags etc. is the question.