Hi Paul,

The CKEditor plugin that handles wiki macros is
https://github.com/xwiki-contrib/application-ckeditor/blob/master/plugins/src/main/resources/xwiki-macro/plugin.js
. It uses
https://github.com/xwiki-contrib/application-ckeditor/blob/master/plugins/src/main/resources/xwiki-marker/plugin.js
. Be aware that the macro output is not submitted. You need to update the
macro markers. Also node that wiki macros are handles as CKEditor Widgets
http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1 .

Hope this helps,
Marius

On Wed, Aug 31, 2016 at 5:46 PM, Paul Libbrecht <[email protected]> wrote:

> Hello Marius,
>
> (for the hook, well, I found a polling solution which worked. But surely
> something else would be better. No urgency)
>
>
> Now, I am still fighting trying to inject the appropriate reformulation
> from an image or a math element (which the Wiris plugin for the CKEditor
> converts to) to a Macro.
>
> As suggested I use CKEditor.editor's toHtml and toDataFormat events.
> I've managed to catch the parsing stage and replace the MathML macros by
> math elements which then get converted by the Wiris plugin to their
> image (including listeners for them to edit when double clicked) by
> hooking into the level 6 of parsing.
>
> How can I know which level I can hook to to reformulate the content just
> before it is sent to the conversion server?
> I've tried levels from 5 to 15 of the event toDataFormat and 15 seems to
> be the best idea... Unfortunately the changes are not sent, an earlier
> version is sent...
> Can it be that there's been a copy of the data before that?
> Where should I look?
>
> thanks in advance.
>
> Paul
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to