Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.2
-
None
-
Unknown
-
Description
Page content used below:
{{prism language="java"}}
int x = 1;
{{/prism}}
Steps to reproduce, on XWiki 18.8.0 with the Prism.js Macro installed:
- Create a page with the content above and save it: the code is highlighted in view mode.
- Edit the page with the standalone WYSIWYG editor ("Edit > WYSIWYG", i.e. /bin/edit/...?editor=wysiwyg).
Result: the code is not highlighted inside the editor. The Prism.js CSS (prism-accessible.css, prism-line-numbers.css) is loaded in the editor's iframe, but Prism.js itself only runs in the top window, so the <code class="language-java"> elements of the iframe get no tokens.
Expected: the code is highlighted in the standalone WYSIWYG editor too, as it is when editing the page in place (in-place editing works fine).
Found while documenting the extension (tested with 1.3-SNAPSHOT). Related to XPRISMJS-7, which fixed the highlighting for in-place editing.
Attachments
Issue Links
- relates to
-
XPRISMJS-7 Syntax Highlighting doesn't work in WYSIWYG editors
-
- Closed
-