[xwiki-users] How to disable marco editor in CKEditor 1.7
I am looking for advice on how to disable macro editor in CKEditor. We want to upgrade to 1.7 to fix bugs, but not ready to let users explore all macros. It would be nice if we can modify the script in CKEditor.EditSheet to disable it or hide the available macro list. -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-disable-marco-editor-in-CKEditor-1-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Wei He, Sorry for the late reply. Here's what you can do: * edit the CKEditor.EditSheet page using the object editor * expand the first JavaScriptExtension object ("CKEditor Loader") * replace removeButtons: 'Find,Anchor', with removeButtons: 'Find,Anchor,xwiki-macro', * save, clear the browser cache and reload the CKEditor edit mode. Hope this helps, Marius On Thu, Jun 16, 2016 at 7:42 PM, Wei He <[email protected]> wrote:
I am looking for advice on how to disable macro editor in CKEditor. We want to upgrade to 1.7 to fix bugs, but not ready to let users explore all macros.
It would be nice if we can modify the script in CKEditor.EditSheet to disable it or hide the available macro list.
-- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-disable-marco-editor-in-CKEditor-1-... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Marius, Thanks for getting back to me. This change will hide the macro button on toolbar but user can still popup the macro editor by double clicking any existing macro in CKEditor. What's the best way to also disable the popup? Thanks, Wei -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-disable-marco-editor-in-CKEditor-1-... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Wei, Actually the macro editing feature is not an optional feature and it’s not been made to be disabled (in the WYSIWYG editor or anywhere else FTM). Being able to edit macros is a major feature and the user will also always be able to go in wiki edit mode and edit the macro so the only way you have to prevent users from modifying macros is with permissions. More generally speaking we consider macro like content and it’s thus subject to the same permissions as content editing. To achieve what you want, you’d need to contribute a new permission (permission to edit a macro) and modify various parts of XWiki to check for that permission (for example having a listener on page save and verify that no macro has been modified, etc). It would be quite complex to implement and not natural IMO. Thanks -Vincent
On 22 Jun 2016, at 19:33, Wei He <[email protected]> wrote:
Hi Marius, Thanks for getting back to me. This change will hide the macro button on toolbar but user can still popup the macro editor by double clicking any existing macro in CKEditor. What's the best way to also disable the popup?
Thanks, Wei
Hi Vincent, Thanks for explaining how macro permission works. We are disabling certain macros permanently. We only need to hide some of them from the macro selector in CKEditor, for example, the groovy macro. Is there a best way to do that? Thanks, Wei -- View this message in context: http://xwiki.475771.n2.nabble.com/How-to-disable-marco-editor-in-CKEditor-1-... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Marius Dumitru Florea -
Vincent Massol -
Wei He