Feature #14833
closedDynamicCss -> support for image classes (with patch)
0%
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
Updated by Stanislas Rolland over 19 years ago
Will need to be a little more elaborate to work in IE.
IE has (at least) two types of selections: text selection and control selection. Selecting an image by clicking on it creates a control selection which has properties and behaviours different from those of the text selection.
Updated by Stanislas Rolland over 19 years ago
This should now work in version 0.5.4 of htmlArea RTE