Hi I have a problem where users want to highlight text in the WYSIWIG editor and press a button on the toolbar to automatically add the {{code}}, {{warning}} etc. start and end tags to the text. I know how to add a macro button and to style it. But the problem with the macro is that it pops up a form with a text area that you then need to fill in with text you want to put inside the tags. The behaviour I am looking for is similar to highlighting text and then pressing the Bold button on the toolbar.
I have done some digging/searching/googling and found the simpledittoolbar.vm and I’ve customised this and added the copy to my skin. I have added the following code in the relevant sections and it works perfectly when I click Edit>Wiki but it doesn’t show on the toolbar when I click Edit>WYSIWIG. I am running XWiki 7.0 #set($discard = $syntax10Elements.add(['code', '{{code}}', '{{/code}}', 'page_code'])) #set($discard = $syntax20Elements.add(['code', '{{code}}', '{{/code}}', 'page_code'])) #set($discard = $confluence10Elements.add(['code', '{{code}}', '{{/code}}', 'page_code'])) So any idea how I can make the button show on the WYSIWIG toolbar? Alternatively how do I make the macro execute on the highlighted text? Thanks in advance. Kind regards, Mahomed _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users