Changes for page CKEditor Integration

Last modified by Admin on 2024/03/27 14:14

<
From version < 29.1 >
edited by Marius Dumitru Florea
on 2016/04/01 14:37
To version < 30.1 >
edited by Marius Dumitru Florea
on 2016/04/15 12:17
>
Change comment: There is no comment for this version

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -42,10 +42,20 @@
42 42  
43 43  {{code language="js"}}
44 44  require(['jquery'], function($) {
45 - // Use the CKEditor for editing page sections.
46 - $('.edit_section > a').attr('href', function(index, oldHref) {
47 - return oldHref + '&editor=inline&sheet=CKEditor.EditSheet';
48 - });
45 + var modifySectionEditLinks = function() {
46 + // Use the CKEditor for editing page sections.
47 + $('.edit_section > a').attr('href', function(index, oldHref) {
48 + return oldHref + '&editor=inline&sheet=CKEditor.EditSheet';
49 + });
50 + };
51 + if (window.XWiki && XWiki.domIsLoaded) {
52 + modifySectionEditLinks();
53 + } else {
54 + // XWiki 6.4+
55 + require(['xwiki-events-bridge'], function() {
56 + $(document).on('xwiki:dom:loaded', modifySectionEditLinks);
57 + });
58 + }
49 49  });
50 50  {{/code}}
51 51  

Get Connected