incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Dupriez <christophe.dupr...@destin.be>
Subject Little problem with CK Editor: proposed correction
Date Tue, 25 Jan 2011 22:09:18 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message