On Mon, Feb 27, 2017 at 12:40 PM, Mahomed Hussein <maho...@custodiandc.com>
wrote:

> Hi
>
> With the editor in XWiki < v9.0.0 (GWT Editor), I could add different
> buttons and macros onto the toolbar by modifying the configuration and
> adding “macro:macroName” as a toolbar “feature”.
>
>

> Has anyone got a simple step by step instructions for adding the same
> thing in CKEditor? I’ve tried looking at the documentation, but it doesn’t
> immediately or easily relate to the macros/add-ins (e.g. the lightbox
> macro/plugin is one we use a lot).
>

The CKEditor integration doesn't support this ATM, unfortunately. Would be
great if you could make a feature request on
http://jira.xwiki.org/browse/CKEDITOR . Someone else also asked for this
recently so I could try to make some time to implement it but I can't
guarantee. If you can't wait and you know JavaScript you could try to
implement this yourself like this:

* read the CKEditor documentation for writing a plugin
http://docs.ckeditor.com/#!/guide/plugin_sdk_sample . You can write the
plugin in a JSX similar to
https://github.com/xwiki-contrib/application-ckeditor/blob/application-ckeditor-1.0/ui/src/main/resources/CKEditor/WikiSourcePlugin.xml
and load it like
https://github.com/xwiki-contrib/application-ckeditor/blob/application-ckeditor-1.0/ui/src/main/resources/CKEditor/EditSheet.xml#L154
* the "insertTimestamp" command defined in the example plugin from the
CKEditor documentation would open the macro editor and then insert macro
when the dialog is closed. Something like this is done in
https://github.com/xwiki-contrib/application-ckeditor/blob/master/plugins/src/main/resources/xwiki-macro/plugin.js#L160
.

But it's not very easy and I would like to implement something generic.

Thanks,
Marius


>
> Thanks in advance for any help.
>
>
> Kind regards,
>
>
> Mahomed Hussein
> Custodian Data Centre
> Email: maho...@custodiandc.com
> http://www.CustodianDC.com
>

Reply via email to