Re: [xwiki-users] How to disable marco editor in CKEditor 1.7

2016-06-23 Thread Vincent Massol
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  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

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] How to disable marco editor in CKEditor 1.7

2016-06-22 Thread Marius Dumitru Florea
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  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-7-tp766.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] How to disable marco editor in CKEditor 1.7

2016-06-16 Thread Wei He
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-7-tp766.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users