farouk korteby wrote:
> Last week i have got a jvm memory leak then we try to increase the jvm
> memory but we can't resolve the problem.
> 
> After many debugging days a found recursive call of include macro, so i get
> thie error because the users can do that in macro menu of GWT wywsiwyg
> editor. (
> http://jira.xwiki.org/jira/browse/XWIKI-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> )

But users can do it also from the wiki editor, right? What stops a user 
from writing {{include document="Current.Page"/}} in the wiki editor?

Anyway, if you really want to hide the include macro in the WYSIWYG 
editor you can register a different implementation for the MacroService 
component used by the WYSIWYG editor. You can extend the current 
implementation, 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/wysiwyg/src/main/java/com/xpn/xwiki/wysiwyg/server/plugin/macro/XWikiMacroService.java
 
, and filter the list of macro descriptors.

Additionally you'll have to protect pages that use the include macro, 
since otherwise users could edit those pages in WYSIWYG mode and try to 
change the parameters of the include macro.

Hope this helps,
Marius

> 
> So i don't want to disable the include macro completely because i use it in
> my code, just i like to disable  it in GWT WYSIWYG, how i can do that ?
> 
> 2010/1/30 Vincent Massol <[email protected]>
> 
>> On Jan 30, 2010, at 11:27 AM, farouk korteby wrote:
>>
>>> the reason is :
>>>
>> http://jira.xwiki.org/jira/browse/XWIKI-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>>> So i wold like to disabled the include macro just in GWT WYSIWYG because
>> i
>>> use it in ma code .
>> I still don't understand. Can you explain precisely what the problem is in
>> WYSIWYG mode?
>>
>> Thanks
>> -Vincent
>>
>>> 2010/1/30 Vincent Massol <[email protected]>
>>>
>>>> Hi Farouk,
>>>>
>>>> On Jan 30, 2010, at 10:45 AM, Marius Dumitru Florea wrote:
>>>>
>>>>> farouk korteby wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I want to disable some developpement macros in GWT based wysiwyg, how
>>>> can i
>>>>>> do it ?
>>>>> AFAIK there's no way to disable a macro only in WYSIWYG mode. The
>>>>> WYSIWYG editor takes the list of macros from the rendering module, and
>>>>> you can't configure a macro to be enabled just for a specific edit
>> mode.
>>>>> You either have it for all edit modes or for none. Macros are
>> components
>>>>> and are automatically discovered. If you look in the WEB-INF/lib
>>>>> directory you'll see many xwiki-core-rendering-macro-xxx jars. Try
>>>>> removing some of them, but note that some macros like HTML and Velocity
>>>>> (I think) are used internally and are required for the wiki pages to be
>>>>> properly displayed (see http://jira.xwiki.org/jira/browse/XWIKI-3953).
>>>> Marius explained the current status but I would like to know more about
>> the
>>>> reason you wish to disable some macros in the WYSIWYG editor. In
>> addition
>>>> would you also like to disable them in wiki edition mode too?
>>>>
>>>> If you have a generic and valid use case then we could imagine making
>> this
>>>> configurable in XE.
>>>>
>>>> Thanks
>>>> -Vincent
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
> 
> 
> 
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to