Drupal How-to: Configuring your Input Formats

Drupal How To

Input formats can be a challenge for folks who are new to Drupal -- especially if you've bowed to the pressure to use a WYSYWYG editor on your web site.  Luckily, the input format system has some good options to help control things. 

One think you'll need to think about is which users will be using your site, and what sort of tools are they going to need. Are they savvy enough users to be able to use some more crunchy formats, like Markdown? That's a possibility, but it's probably not the case for most of you.

A good practice, if you're planning to keep "filtered HTML" as your default input format, would be to take the time to determine which html commands you will be using (which buttons you turn on for the users) and what actual code those buttons produce.  If there's an "<hr>" button, for example, you're going to want to make sure that button works for your users.

The easiest way out of this work is to just set "full HTML" as your default and let everyone post any kind of HTML they want -- basically eliminate the HTML filtering options on the site.  And that's totally viable, but that makes it possible for user to create pages that really gunk up your web site's carefully designed look and feel.

After many years of working with editors and input formats, I'm coming around to a new personal strategy as I set up new sites.  

1. Create a default format type that does not use the WYSIWYG editor.  Drupal 7 has the plain text format as a default, and I think this is the right way to go.  (in most cases, as users post content to your site, they do not need the full power of the editor).

2. Create tools for users to add media (video embeds, pictures, etc) in a controlled way (rather than the IMCE popup window dance)

3. Set up an alternative filtered HTML editor that uses a WYSIWYG editor for content that requires more complex editing and formatting. When you do this, make sure you test your WYSIWYG buttons to make sure any button your giving the user access to will create HTML that the filters will allow to pass.  

4. Consider another input format for code that turns off the WYSIWYG editor.  This can be very useful for added text fields you might create for embed widgets. 

The input filter tools have always been something that have been easy to ignore -- they work well enough to get by right out of the box, and there are more pressing configuration options to think about.  But a well-tuned site needs carefully thought out options here, and if you think about your input filters too late you'll create confusion if you're making changes to these setting after you're letting users create content on your site -- far better to make sure you have this detail thought through before you release the hounds. 

 

Thanks for great article. It

Thanks for great article. It helps to people to build up their knowledge about Drupal.
Developmenticon

Navigation

User login

Connect
Sign in using Facebook

Syndicate

Syndicate content
Powered by Drupal, an open source content management system