Project

General

Profile

Actions

Feature #14833

closed

DynamicCss -> support for image classes (with patch)

Added by Guillaume Crico over 19 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2005-06-22
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Enabled DynamicCss image tags processing.

Example :
Add to your css file :
img.image-left { float: left; margin-right: 10px; margin-bottom: 10px; }
img.image-right { float: right; margin-left: 10px; margin-bottom: 10px; }

=> When you select an image, you can choose <image-left> or <image-right> classes in the dynamicCss listbox.

To fix : in IE only, a "classified" image report an "Undefined" classname (seems like there is two selection state for image in IE). So, you can choose a classname, but the current applied classname isalways "Undefined".

To do : Tested with Firefox 1.0.4 and IE6 on MsWindows => Test on other plateforms.

--- htmlarea/plugins/DynamicCSS/dynamiccss.js
++ htmlarea/plugins/DynamicCSS/dynamiccss.js
@ -134 +134 @
- while(parent && !HTMLArea.isBlockElement(parent)) parent = parent.parentNode;
while (parent && !HTMLArea.isBlockElement(parent) && !parent.nodeName.toLowerCase()=='img') parent = parent.parentNode;
@ -221 +221 @
- while (parent && !HTMLArea.isBlockElement(parent)) parent = parent.parentNode;
+ while (parent && !HTMLArea.isBlockElement(parent) && !parent.nodeName.toLowerCase()=='img') parent = parent.parentNode;

(issue imported from #M1230)


Files

dynamiccss.js.diff (557 Bytes) dynamiccss.js.diff Administrator Admin, 2005-06-22 14:03
Actions

Also available in: Atom PDF