Changes for page EditSheet

Last modified by superadmin on 2025/02/27 10:46

From version 5.1
edited by Thomas Coelho (local)
on 2023/01/17 20:36
Change comment: Install extension [org.xwiki.platform:xwiki-platform-ckeditor-ui/14.10.3]
To version 6.1
edited by Thomas Coelho
on 2023/02/27 12:06
Change comment: Install extension [org.xwiki.platform:xwiki-platform-ckeditor-ui/15.1]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.coelho
1 +XWiki.thw
XWiki.JavaScriptExtension[0]
Code
... ... @@ -92,8 +92,10 @@
92 92   sourceDocument.syntax = sourceSyntax;
93 93   }
94 94  
95 + var uploadDisabled = element.hasAttribute('data-upload-disabled');
96 +
95 95   var config = {
96 - filebrowserUploadUrl: getUploadURL(sourceDocument, 'filebrowser'),
98 + filebrowserUploadUrl: uploadDisabled ? '' : getUploadURL(sourceDocument, 'filebrowser'),
97 97   height: $(element).height(),
98 98   mentions: [
99 99   {
... ... @@ -130,7 +130,7 @@
130 130   // The syntax of the edited content is not always the same as the syntax of the source document (which applies to
131 131   // the source document content, but we might be editing something else, like an object property).
132 132   sourceSyntax: sourceSyntax,
133 - uploadUrl: getUploadURL(sourceDocument, 'filetools'),
135 + uploadUrl: uploadDisabled ? '' : getUploadURL(sourceDocument, 'filetools'),
134 134   'xwiki-link': {
135 135   // We use the source document to compute the link label generator URL because we want the link references to be
136 136   // resolved relative to the edited document (as they were inserted).