| Steps to reproduce, on XWiki 18.8.0 with the Prism.js Macro installed:
- Create a page holding {{prism language="java"}}int x = 1;{{/prism}} 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. |