I’m working with CKeditor, and for whatever reason, they included Hspace and Vspace in their UI. Convenient idea to allow users to manipulate their images like so, but those are way deprecated.
Has anyone converted CKeditor’s Hspace and Vspace to CSS, and know how to explain its conversion?
I am a javascript novice..
hspaceandvspaceare margins in pixels. The conversion should be direct, immediate and simple.Where do you want the correction to take place? I don’t know anything about CKEditor’s source, so that leads me to propose three options.
Option 1: Replace the
hspaceandvspaceattributes with proper CSS at submit time. This might impact editability later.Option 2: Replace the
hspaceandvspaceattributes with proper CSS at render time. This might be slow if you do it the right way (HTML parser).Option 3: Replace the
hspaceandvspaceattributes with proper CSS on the client side at render time. This should be trivial in jQuery, Prototype, Mootools, or whatever library you’re using.jQuery to the rescue! Something like this could work.