Christophe,
The extra editor functions on the plain editor are indeed 'biased' towards
standard jspwiki markup.
Switching to Creole markup would require changes to the jspwiki-edit.js. All
markup specific stuff is located
in the getWikiSnippet() function. Overwriting that function should be
sufficient.
Those snippets have following format:
"toc" : {
snippet:["","[{TableOfContents }]", "\n"],
tab:['[{TableOfContents }]', '']
},
The "snippet" field (always 3 parts) shows the markup which is inserted when
pressing the toc button or typing "toc"+<Tab>. In this case, the snippet
inserts a call to the TableOfContents plugin, followed by a newline.
The "tab" field indicates which text parts to highlight when pressing
subsequent <Tab> keys.
As jspwiki-edit.js is inserted via the plain.jsp; you'd probably also need
to create a 'plain-creole.jsp' or something.
So, copy the plain.jsp and add following line after the insertion of
jspwiki-edit.js :
TemplateManager.addResourceRequest( context, "script", contextPath +
"/scripts/creole-snippets.js" );
The new "/scripts/creole-snippets.js" would have just your new snippet
definitions, something like:
EditTools.getWikiSnippets = function(){
return {
"toc" : {
snippet:["","<creole markup here>", "\n"],
tab:[ ... ]
},
...
}
}
dirk
dirk
On Sun, Mar 9, 2008 at 9:47 AM, Christoph Sauer <[EMAIL PROTECTED]>
wrote:
> Dirk,
>
> I haven't looked too much into the code right now, but it is at least
> biased
> towards jspwiki markup. When I use the creole filter I would have to adapt
> the javascript, so that the buttons are inserting e.g. creole markup for
> headings. One reason why I didn't switch to 2.6 yet was the "biased"
> default
> editor. That's why I called for a "vitage" editor. How easy is it to
> change
> the markup insertion code in the editor? Could you add a simple switch for
> this as well?
>
> --Christoph
>
> -----Ursprüngliche Nachricht-----
> Von: Dirk Frederickx [mailto:[EMAIL PROTECTED]
> Gesendet: Samstag, 8. März 2008 15:06
> An: [email protected]
> Betreff: Re: Problem with the plain editor on 2.6.1
>
> Christoph,
>
> May be should make the wiki-link-suggestion-box optional through a extra
> checkbox instead of having it on by default.
> For the rest the plain editor is pretty 'plain', and is run without
> interference of any javascript.
>
>
>
> dirk
>
>
> On Sat, Mar 8, 2008 at 8:28 AM, Christoph Sauer <[EMAIL PROTECTED]>
> wrote:
>
> > What I would like to see is a really "plain" editor that works without
> > javascript, like the old one in 2.4. That would be a good fallback. I am
> > not
> > sure if you would like to have that in the core, maybe we could call it
> > "vintage" editor?
> >
> > --Christoph
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Steve Dahl [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 25. Februar 2008 20:44
> > An: [email protected]
> > Betreff: Re: Problem with the plain editor on 2.6.1
> >
> > Done. Thanks.
> >
> >
> > On Feb 25, 2008, at 2:19 PM, Dirk Frederickx wrote:
> >
> > > Good Point.
> > > I'll check if I can introduce some kind of max-width on the popup.
> > > Can you raise a JIRA issue for this ?
> > >
> > >
> > > dirk
> > >
> > > On Mon, Feb 25, 2008 at 3:03 PM, Steve Dahl <[EMAIL PROTECTED]> wrote:
> > >> For long lists that contain long page names, the popup can grow large
> > >> enough to clash with the editing area. I'm not sure what the right
> > >> thing would be if the popup contains names that are too long to fit
> > >> into the favorites block area, but it is an issue sometimes.
> > >>
> > >>
> >
> >
> >
>
>
>