Custom Drupal Layouts with HTML
Using a WYSIWYG Editor without messing up your site.
If you aren’t super-familiar with HTML tags but want to do some custom layout work, a WYSIWYG (What You See Is What You Get) editor can be a great help. A WYSIWYG can be a stand-alone application (Dreamweaver) or a plugin to a CMS like Drupal or CoalEngine (TinyMCE, FCK).
However, you can also really break your site with them! Here are some of the guidelines we use, here at Coalmarch, to help prevent that from happening:
- Make sure your page is W3 Valid.
- Some tags are just plain bad (font, blink, excessive inline styles, etc.).
- Use XHTML strict as your html doc type when possible.
- Try to re-use the div classes from your site’s normal content, so that the custom section looks good.
Here are some special considerations when using raw HTML in Drupal:
- Change the filter to Filtered HTML, Full HTML, or something similar. Otherwise, the HTML will just be stripped out.
- If your HTML is still being removed, the filter settings might not allow the specific tag that you are trying to use.
- Filters can be set to accept a variety of sets of tags, so they may need to be modified for you.