By catweazle on
I'm stuck following the instructions in David Mercer's Drupal book on creating a PHP-enabled input format.
The book tells me to create an input format called "special pages" with these filters:
- PHP evaluator
- HTML filter
- Line break converter
- URL filter
- HTML corrector
Then, it tells me to add content which includes CSS:
<div style="text-align: center;">
<strong>The MF4Good</strong>
</div>
But when I get the rendered page, the CSS is always filtered out. Probably by the HTML filter ?! Is there a way to enable CSS, other than disabling the HTML filter altogether ?
Comments
Besides disabling the HTML
Besides disabling the HTML filter, you can configure it and add more allowed html tags to it.
CSS ?
How do I allow
style="text-align: center;"If it works like any other
If it works like any other tag, you should simply allow the
<style>tag.However, it seems more in the spirit of css to predefine your styles with classes and ids and not to allow users to apply any styles they want in the content.
Cool !
Cool, I'll try it out. Thanks !