Hi again,

See below,

Marius Dumitru Florea wrote:
Hi,

ArielWang wrote:
I want to add three buttons to the toolbar in WYSIWYG V2.
Now I have XWIKI 1.8 and WYSIWYG V2 with Syntax 2.0.

The problem is:
When I use WYSIWYG V1, the message #error(“some messages”)can be parsed as
error message.

While with Syntax 2.0, the new syntax has been changed to:{{velocity}}{{html
wiki=true}}#error("some messages"){{/html}}{{/velocity}}, which is not
allowed to input WYSIWYG messages for parsing.

Is there any method to make the commands parsed by just inputting them to
the editor?

There is Macro box in the new editor, but I didn’t find the macros of error,
info and warning, how can I add them?

These macros have been added in XE 2.0M1 (see http://jira.xwiki.org/jira/browse/XWIKI-2968 ; I don't know why they weren't included in 1.9.1). So you can:

* upgrade to 2.0M1 (milestone release, beware) and you'll have the info, warning and error macros accessible from the WYSIWYG editor


* or upgrade to 1.9.1 (stable release) and try to install the message macro ( http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-core-rendering-macro-message/2.0-milestone-1/ ) . They should be compatible, but I haven't succeeded installing it..

I think this is the best option for you. Here's what you have to do:

1) upgrade to XE 1.9.1
2) download the Message macro jar from http://tinyurl.com/lztm6y and copy it to WEB-INF/lib directory of your XE installation 3) create a "plexus" directory in WEB-INF/classes/META-INF/ and place the file attached to this mail (components.xml) inside. So you should have: WEB-INF/classes/META-INF/plexus/components.xml
4) restart the server

At this point you should see the info, warning and error macros listed in the "Insert Macro" WYSIWYG dialog.

Hope this helps,
Marius


* or use your current installation and insert a velocity macro from the WYSIWYG editor, setting its content to {{html wiki=true}}#error("some messages"){{/html}} (it's a pain, I know..)

* or, if you have coding skills, you can create your own WYSIWYG plugin; you'll have to take a look at the exiting macro plugin; just checkout the code of the editor from http://svn.xwiki.org/svnroot/xwiki/platform/web/branches/xwiki-web-1.8/wysiwyg/ (for XE 1.8)

Hope this helps,
Marius


_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to