Custom Search

You are hereBlog / bug fixed: <img> styles stripped when posting with Drupal TinyMCE editor

bug fixed: <img> styles stripped when posting with Drupal TinyMCE editor


Posted on August 08, 2008 by Denis

Printer-friendly versionSend to friend

ISSUE: TinyMCE and IMCE modules are installed with Image Advanced plugin/button enabled. While editing, styles on image tabs (which are needed to attribute margins and alignment) get stripped after saving an entry.

SOLUTION: Insert "style|" into "modules/tinymce/plugin_reg.php" at the following two locations:

  1. $plugins['advimage']['extended_valid_elements'] = array('img[style|class|src|alt|title ... |name]');
  2. $plugins['flash']['extended_valid_elements'] = array('img[style|class| ... name|obj|param|embed]');

Not sure why, but doing #1 only will NOT fix the problem.

recent comments

Anonymous's picture

Great blog. Thanks.

Anonymous's picture

It is better to take sure shot stock tips or advices from someone before investing in Stocks and Commodities market instead of losing money and then regretting.
We at Capitalstars Financial Research Pvt. Ltd. Do this for you and help you make profit in stocks and commodities market. Our technical analysis team is an experienced one and provides sure shot stock recommendation with 90-95% accuracy rate. Avail our free trial service to know more.
Stock Tips

Anonymous's picture

It is better to take sure shot stock tips or advices from someone before investing in Stocks and Commodities market instead of losing money and then regretting.
We at Capitalstars Financial Research Pvt. Ltd. Do this for you and help you make profit in stocks and commodities market. Our technical analysis team is an experienced one and provides sure shot stock recommendation with 90-95% accuracy rate. Avail our free trial service to know more.

Foxkeh

View Denis Lam's profile on LinkedIn