Hi, see below,
ArielWang wrote:
>
>
> 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..
>>
>> * 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
>>
>>
>
> Thanks very much for your advice.
> The problem is I am using 1.8 and I want to add the three button in XWIKI
> 1.8.
> I still not understand how to plugin using macro because I find it cannot be
> parsed when I add code to the editor.
> Would you please give me more information or an example of this?
Have you tried to install the Message macro on XE 1.8 by following the
steps I gave you for XE 1.9? I just did this and when I click the Macro
> Insert Macro... menu a dialog is opened and I can see the Error, Info
and Warning macros in the list of available macros. I select one of
them, type in the content and that's it. If I switch to Wiki editor I
can see:
{{error}}This is an error!{{/error}}
{{info}}This is an info!{{/info}}
{{warning}}This is a warning!{{/warning}}
If you don't like how they look after you save the page then it's a
matter of adjusting the style sheet. Here's what I did, by just
comparing the latest toucan.css with the version from XE 1.8:
1) I added this at the end of skins/toucan/toucan.css:
----------8<----------
.errormessage, .warningmessage, .infomessage {
margin: 4px 0;
border: 1px solid #DDD;
padding: 8px 28px;
background: #F5F5F5 6px 8px no-repeat;
text-align: justify;
color: #555;
}
.infomessage {
background-image: url(
$xwiki.getSkinFile('icons/silk/information.gif') );
color: #369;
}
.warningmessage {
background-image: url( $xwiki.getSkinFile('icons/silk/error.gif') );
color: #D5A13D;
}
.errormessage {
background-image: url(
$xwiki.getSkinFile('icons/silk/exclamation.gif') );
color: #e14726;
}
---------->8----------
2) I searched in skins/toucan/toucan.css for:
#xwikimaincontainerinner .box {
and replaced it with only:
.box {
Ans that's it. The error, info and warning messages look great.
Hope this helps,
Marius
>
> I am really hurry.
>
> Thank you so much for your assistant!
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users