Hi!
Our users are delighted by CK Editor in JSPWiki.
Few glitches remain which cause problems with saved documents.
One is with saving images in a page: CKEditor is storing image
properties as CSS in style="..." attribute.
In /src/com/ecyrd/jspwiki/htmltowiki/XHtmlElementToWikiTranslator.java
I find the following piece of code (around line 733 in method printImage):
map.put( "align", base.getAttributeValue( "align" ) );
map.put( "height", img.getAttributeValue( "height" ) );
map.put( "width", img.getAttributeValue( "width" ) );
map.put( "alt", img.getAttributeValue( "alt" ) );
map.put( "caption", emptyToNull( XPath.newInstance( "CAPTION"
).valueOf( base ) ) );
map.put( "link", href );
map.put( "border", img.getAttributeValue( "border" ) );
map.put( "style", base.getAttributeValue( "style" ) );
You can see that style is taken from "base" (like "align") and not from
"img". For that reason, the style attribute of the image simply
disappear in the Wiki Markup. And my users are unhappy!
What is the reasoning behind this? Should I merge "base" and "img"
attributes? Take "img" only? Or what else?
THANK YOU VERY MUCH !!!
Have a nice day!
Christophe