Changes for page CKEditor Integration
Last modified by Admin on 2024/03/27 14:14
<
>
edited by Marius Dumitru Florea
on 2016/04/01 14:37
on 2016/04/01 14:37
edited by Marius Dumitru Florea
on 2016/04/15 12:17
on 2016/04/15 12:17
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
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