Community Documentation

Wordfilter

Last updated July 10, 2011. Created by tim.plunkett on July 10, 2011.
Edited by luigithekid. Log in to edit this page.

This is a little explanation of how to use Wordfilter in D7 to replace a word or phrase with an image.

Download, install and enable Wordfilter.

Once enabled, go to Wordfilter's configuration in Admin >> Configuration >> Content Authoring >> Word Filter. Click on the "Add filtered word" tab, and type in the word or phrase to replace in the "Words" textfield. In the "Replacement" field write the html image tag <img src="pathToYourImage" alt="You can even have an alt text" class="And classes" > and save.

Go back to Content Authoring configuration and choose "Text formats" in Admin >> Configuration >> Content Authoring >> Text formats. In my case I configured both Filtered HTML and Full HTML. Click on "configure" on each of those, one at a time. Once on the format's configuration page, enable Word Filter (from the Enabled filters check-box area). Note that filters are executed from top to bottom, so make sure that, at least on the filtered HTML format, you drag your Word filter to the bottom of the list on the "Filter processing order". Save your configuration.

Make sure you have uploaded your image to your server at the specified path and enjoy!

Page status

About this page

Drupal version
Drupal 7.x
Audience
Programmers, Site administrators

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here