On Tue, Mar 14, 2017 at 4:57 PM, Mahomed Hussein
> We’ve come across a slight issue with the Lightbox macro when using
> CKEditor 1.12. I thought I’d post to the group before logging it on Jira.
> Basically, the issue is that when you go into CKEditor, the Macro
> encompasses all the text that follows it . I have marked up all the
> images so please look at them as it should make it easier to see what I
> mean. Looking at the source, it appears that the closing DIV for the macro
> is being put at the end of all the following content .
> If you then go into Source view, it deletes all the text after the
> lightbox macro . If you edit using the original Wiki editor, you can see
> all the text is there correctly 
This sounds like http://jira.xwiki.org/browse/CKEDITOR-131 and the problem
(see my comment to the linked issue) is probably that the LightBox Macro
generates invalid HTML. It may look good in view mode, but usually that is
because the browser fixes the invalid HTML on the fly. And this fixing on
the fly messes up the macro rendering markers. Of course, the rendering
markers should be made more robust, but that requires more changes. The
easies solution is to make sure the macro generates valid HTML (e.g all
tags are properly closed so that the browser doesn't have to close the DIV
Hope this helps,
> You can put in a terrible workaround (this was more an experiment than a
> solution to be honest) by going into Wiki edit mode, and adding 2 extra
> line breaks and a closing DIV tag inside the HTML tags . This then
> allows CKEditor to render correctly and you can view/edit the content after
> the light box without any issues. . Sadly this isn’t a solution and I
> hope someone can help with a proper solution.
> It seems to me that this is something that needs changing in CKEditor,
> rather than in the Lightbox Macro as rendering of the images and lightbox
> is fine when viewing the documents, and it seems the Macro JS code does not
> get executed when editing in CKEditor.
> Please let me know if you need any other info and I hope someone can help.
>  - http://pasteboard.co/JljtnBA9U.png
>  - http://pasteboard.co/JlFkCTN8k.png
>  - http://pasteboard.co/JlG6J0k5E.png
>  - http://pasteboard.co/JlGsIdGZK.png
>  - http://pasteboard.co/JlHgakjs2.png
>  - http://pasteboard.co/JlHCxvOC8.png
> Kind regards,
> Mahomed Hussein
> Custodian Data Centre
> Email: maho...@custodiandc.com