Hello all,
I added a class attribute to the image dialog box to apply css classes to images, but I'm having a problem. When I enter a class name for an image and then hit OK, the class is applied (you can see it in the editor window) but when I view image properties dialog box again, the class name is not in the class text field.
If I re-enter the class name, hit OK and then toggle source mode for the editor, it shows that the class attribute is listed twice (as the first and last attributes). As soon as I toggle back to WYSIWYG mode, the second instance of the class disappears (I know this because toggling source mode a second time shows only the first class attribute).
If I re-enter the class name, hit OK and then go immediately back into the image properties dialog, the class name is listed in the class text field.
The way I did this in the image dialog code was just to copy whatever was done with the alt attribute. This technique worked perfectly for adding the title attribute, so I dont see why it wouldnt work the same with the class attribute. Any idea why it would do this or how to fix it?
I added a class attribute to the image dialog box to apply css classes to images, but I'm having a problem. When I enter a class name for an image and then hit OK, the class is applied (you can see it in the editor window) but when I view image properties dialog box again, the class name is not in the class text field.
If I re-enter the class name, hit OK and then toggle source mode for the editor, it shows that the class attribute is listed twice (as the first and last attributes). As soon as I toggle back to WYSIWYG mode, the second instance of the class disappears (I know this because toggling source mode a second time shows only the first class attribute).
If I re-enter the class name, hit OK and then go immediately back into the image properties dialog, the class name is listed in the class text field.
The way I did this in the image dialog code was just to copy whatever was done with the alt attribute. This technique worked perfectly for adding the title attribute, so I dont see why it wouldnt work the same with the class attribute. Any idea why it would do this or how to fix it?