[xwiki-users] Adding buttons to WYSIWYG toolbar
Hello, I've tried to add toolbar buttons for fonts and colours to the Syntax 2.0 WYSIWYG toolbar in XWiki 1.9.3 by following the online guide at: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/WysiwygEditor . First, in "macros.vm" (or anywhere else) I didn't find any lines that looked like these: plugins: '$xwiki.getXWikiPreference("wysiwyg.plugins", "submit line separator text list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end")', toolbar: '$xwiki.getXWikiPreference("wysiwyg.toolbar", "bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | hr symbol")', they looked like this: plugins: 'submit line separator text valign list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end', toolbar: 'bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | format | hr symbol | link unlink | importer', I changed the two lines to this: plugins: 'submit line separator text font color valign list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end', toolbar: 'bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | format fontname fontsize forecolor backcolor | hr symbol | link unlink | importer', According to the documentation: "You can reload your web container." and "You don't have to restart the server.". By reloading the web container do you mean refreshing the browser page? Or exiting and re-entering the WYSIWYG editor? I have not tried restarting the server but the buttons are not showing up. Thanks, Trevor
Hi Trevor, Trevor Russ wrote:
Hello,
I've tried to add toolbar buttons for fonts and colours to the Syntax 2.0 WYSIWYG toolbar in XWiki 1.9.3 by following the online guide at: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/WysiwygEditor .
First, in "macros.vm" (or anywhere else) I didn't find any lines that looked like these: plugins: '$xwiki.getXWikiPreference("wysiwyg.plugins", "submit line separator text list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end")', toolbar: '$xwiki.getXWikiPreference("wysiwyg.toolbar", "bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | hr symbol")',
they looked like this: plugins: 'submit line separator text valign list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end', toolbar: 'bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | format | hr symbol | link unlink | importer',
Indeed. These two lines were changed in 2.0RC1 due to http://jira.xwiki.org/jira/browse/XWIKI-4221 but the guide still applies.
I changed the two lines to this: plugins: 'submit line separator text font color valign list indent history format symbol link image table macro importer#if($full && $request.sync) sync#end', toolbar: 'bold italic underline strikethrough | subscript superscript | unorderedlist orderedlist | outdent indent | undo redo | format fontname fontsize forecolor backcolor | hr symbol | link unlink | importer',
Perfect.
According to the documentation: "You can reload your web container." and "You don't have to restart the server.". By reloading the web container do you mean refreshing the browser page? Or exiting and re-entering the WYSIWYG editor? I have not tried restarting the server but the buttons are not showing up.
I've updated the documentation to state this more clearly. "You don't have to restart the server." quote applies only when you edit XWiki preferences (since 2.0RC1) or when you overwrite the skin. Otherwise you have to restart (reload) the server (web container, servlet container, application server) because velocity templates like macros.vm are cached at application startup. In any case (with server restart or not) you have to reload (e.g. refresh, cancel + edit again) the edited page for the changes to take effect. Hope this helps, Marius
Thanks, Trevor _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Marius, I had even looked at "macros.vm" in 2.0 to see if it was any different than 1.9, but I had 2.0M3 installed in our test environment, not RC1. I restarted the server and it worked. Thanks for the reply and the clarifications, I do appreciate it. Trevor On Thu, 12 Nov 2009 10:39:18 +0200 Marius Dumitru Florea wrote: ...
Indeed. These two lines were changed in 2.0RC1 due to http://jira.xwiki.org/jira/browse/XWIKI-4221 but the guide still applies. ... Otherwise you have to restart (reload) the server (web container, servlet container, application server) because velocity templates like macros.vm are cached at application startup.
Marius, It would be cool if we could make this easier. Like already have the pref in the wiki and/or have a yes/no for "Show fonts and colors" in the prefs Ludovic Trevor Russ a écrit :
Hi Marius,
I had even looked at "macros.vm" in 2.0 to see if it was any different than 1.9, but I had 2.0M3 installed in our test environment, not RC1. I restarted the server and it worked.
Thanks for the reply and the clarifications, I do appreciate it.
Trevor
On Thu, 12 Nov 2009 10:39:18 +0200 Marius Dumitru Florea wrote: ...
Indeed. These two lines were changed in 2.0RC1 due to http://jira.xwiki.org/jira/browse/XWIKI-4221 but the guide still applies.
...
Otherwise you have to restart (reload) the server (web container, servlet container, application server) because velocity templates like macros.vm are cached at application startup.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Hi Ludovic, Ludovic Dubost wrote:
Marius,
It would be cool if we could make this easier. Like already have the pref in the wiki and/or have a yes/no for "Show fonts and colors" in the prefs
We already allow the users to configure the plugins and the toolbar from XWiki preferences but the properties are not there by default. I could add them but XWikiPrefereces class has grown a lot and contains all sorts of unrelated properties. Is this the best approach? Also, should we create a WYSIWYG configuration page in the administration? Marius
Ludovic
Trevor Russ a écrit :
Hi Marius,
I had even looked at "macros.vm" in 2.0 to see if it was any different than 1.9, but I had 2.0M3 installed in our test environment, not RC1. I restarted the server and it worked.
Thanks for the reply and the clarifications, I do appreciate it.
Trevor
On Thu, 12 Nov 2009 10:39:18 +0200 Marius Dumitru Florea wrote: ...
Indeed. These two lines were changed in 2.0RC1 due to http://jira.xwiki.org/jira/browse/XWIKI-4221 but the guide still applies.
...
Otherwise you have to restart (reload) the server (web container, servlet container, application server) because velocity templates like macros.vm are cached at application startup.
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Ludovic Dubost -
Marius Dumitru Florea -
Trevor Russ