Changes for page Customization
Last modified by Vincent Massol on 2024/03/27 13:33
<
>
edited by Marius Dumitru Florea
on 2018/11/21 11:40
on 2018/11/21 11:40
edited by Marius Dumitru Florea
on 2019/10/08 13:46
on 2019/10/08 13:46
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -114,14 +114,8 @@ 114 114 115 115 You can put this: 116 116 117 -* In the "Advanced Configuration" text area from the CKEditor administration section, if you can hard-code the plugin URL/path or compute it on the client-side using only JavaScript. E.g.:(((117 +* in the "Advanced Configuration" text area from the CKEditor administration section, if you can hard-code the plugin URL/path or compute it on the client-side using only JavaScript. E.g.: assuming the CKEditor plugin is defined in the ##Sandbox.Foo## JavaScript [[skin extension>>platform:DevGuide.SkinExtensionsTutorial]] like this((( 118 118 {{code language="js"}} 119 -CKEDITOR.plugins.addExternal('foo', new XWiki.Document('Foo', 'Sandbox').getURL('jsx')); 120 -{{/code}} 121 - 122 -And the content of the ##Sandbox.Foo## JSX would look something like: 123 - 124 -{{code language="js"}} 125 125 CKEDITOR.plugins.add('foo', { 126 126 init: function(editor) { 127 127 ... ... ... @@ -128,8 +128,14 @@ 128 128 } 129 129 }); 130 130 {{/code}} 125 + 126 +then you can specify its location with this: 127 + 128 +{{code language="js"}} 129 +CKEDITOR.plugins.addExternal('foo', new XWiki.Document('Foo', 'Sandbox').getURL('jsx')); 130 +{{/code}} 131 131 ))) 132 -* In a JavaScript [[skin extension>>platform:DevGuide.SkinExtensionsTutorial]]. E.g.:(((132 +* or in a JavaScript [[skin extension>>platform:DevGuide.SkinExtensionsTutorial]]. E.g.: assuming the CKEditor plugin is defined by ##resources/ckeditorPlugins/foo.js## within the XWiki WAR then you can specify its location with((( 133 133 {{code language="js"}} 134 134 require(['deferred!ckeditor'], function(ckeditorPromise) { 135 135 ckeditorPromise.done(function(ckeditor) { ... ... @@ -137,6 +137,8 @@ 137 137 }); 138 138 }); 139 139 {{/code}} 140 + 141 +Make sure the JSX is configured to be loaded automatically on the entire wiki. 140 140 ))) 141 141 ))) 142 142 1. Enable the plugin in the CKEditor configuration:(((