You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Christophe Dupriez <ch...@destin.be> on 2011/01/25 23:09:18 UTC
Little problem with CK Editor: proposed correction
Hi!
Our users are delighted by CK Editor in JSPWiki.
Few glitches remain which cause problems with saved documents.
One is the inclusion of a target in the generated links. They become :
[link text|address|target]
To overcome this, I modified ONE line in
com.ecyrd.jspwiki.parser.JSPWikiMarkupParser.java to test for
wysiwygEditorMode and omit target generation in that case:
protected Element createAnchor(int type, String link, String text,
String section, String target)
{
text = escapeHTMLEntities( text );
section = escapeHTMLEntities( section );
Element el = new Element("a");
el.setAttribute("class",CLASS_TYPES[type]);
el.setAttribute("href",link+section);
if (target != null && !m_wysiwygEditorMode) {
el.setAttribute( "target", target );
}
el.addContent(text);
return el;
}
Works for us!
(Other problems are remaining with tables but I will try to fix them
later...)
Have a nice evening!
Christophe