Hi Marius,
I have created a sample GWT application and configured it to use the XWiki
editor however I cannot get the editor to show on the page.
My application consists of the following gwt configuration:
<module>
<inherits name='com.google.gwt.user.User' />
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<inherits name='org.xwiki.gwt.wysiwyg.Wysiwyg' />
Can't help more, but there's a typo in the next line, make sure this
isn't the real problem (wysiwUg instead of wysiwyg):
<entry-point
class='platform.ui.wiki.wysiwug.client.Application' />
<stylesheet src='Application.css' />
</module>
the default page consists of the following:
<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<title>Platform - WYSIWYG</title>
<script type="text/javascript"
language="javascript"
src="platform.ui.wiki.wysiwug.Application.nocache.js" />
</script>
</head>
<body>
<iframe src="javascript:''"
id="__gwt_historyFrame"
style="position:absolute;width:0;height:0;border:0">
</iframe>
</body>
</html>
and the Application.java entry point class consists of the following:
public class Application implements EntryPoint {
public void onModuleLoad() {
CommandManagerApi.publish();
WysiwygEditorApi.publish();
}
}
And still nothing shows up, do I need to add the Java script call and
initialize the JsConfig for it to run properly?
I appreciate the assistance.
Cheers,
Fady
On Mon, Feb 22, 2010 at 12:28 PM, Fady Matar<fady.matar(a)gmail.com> wrote:
> Makes sense, I'll be inheriting the modules and checking out what
> needs to be done, if that makes sense for others then I'll update my
> blog to include all the steps in procedure, or probably we can update
> the
dev.xwiki.org to reflect those changes.
>
> Will get back to you soon on the progress.
> Thank you for the great assistance.
>
> Cheers Marius
>
> On 2/22/10, Marius Dumitru Florea<mariusdumitru.florea(a)xwiki.com> wrote:
>> Hi Fady,
>>
>> Fady Matar wrote:
>>> I have tried to get the dependency for the
>>> xwiki-web-gwt-wysiwyg-client module but I couldn't find it anywhere,
>>> is this a new split of the wysiwyg module? for example I would have
>>> wanted to check out xwiki-web-gwt-wysiwyg-client version 2.2 by adding
>>> it as a maven dependency as follows:
>>>
>>> <dependency>
>>> <groupId>com.xpn.xwiki.platform</groupId>
>>> <artifactId>xwiki-gwt-wysiwyg-client</artifactId>
>>
>>> <version>2.2</version>
>>
>> Yes, xwiki-web-gwt-wysiwyg-client is a new split of the wysiwyg module,
>> done only on trunk so you have to use version 2.3-SNAPSHOT for now, at
>> least until we release 2.3M1. If you don't want to be affected by
>> changes happening daily on trunk, you can build locally
>> xwiki-web-gwt-wysiwyg-client and then build your project offline using
>> maven's -o flag.
>>
>>> </dependency>
>>>
>>> but I couldn't find it anywhere in the xwiki maven repository.
>>>
>>> So from what I understand now is that I have to build the module, add
>>> it as a dependency in my maven project and include it in my gwt sample
>>> project.
>>
>> Yes, but you'll have to use the 2.3-SNAPSHOT version for now.
>>
>> Hope this helps,
>> Marius
>>
>>>
>>> Thanks for the assistance,
>>> Fady
>>>
>>> On 2/19/10, Fady Matar<fady.matar(a)gmail.com> wrote:
>>>> Thanks for the information this was helpful
>>>>
>>>> Regards,
>>>> Fady
>>>>
>>>> On Fri, Feb 19, 2010 at 5:43 PM, Marius Dumitru Florea<
>>>> mariusdumitru.florea(a)xwiki.com> wrote:
>>>>
>>>>> Hi Fady,
>>>>>
>>>>> So far we haven't written a demo of the WYSIWYG editor outside
of
> XWiki
>>>>> but it shouldn't be hard to write one:
>>>>>
>>>>> * Create a demo GWT-Maven project
>>>>> * Add a dependency on xwiki-web-gwt-wysiwyg-client (
>>>>>
>>>>>
>
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-cli…
>>>>> )
>>>>> * Inherit the WYSIWYG GWT module in your own GWT module descriptor
>>>>> ** Use the same entry point as the WYSIWYG GWT module, which
publishes
> a
>>>>> JavaScript API you can use to instantiate the editor, or
>>>>> ** Use your own entry point and instantiate the editor in GWT code
>>>>>
>>>>> The only limitation is that you won't be able to use the
>>>>> "switch-to-source" feature (i.e. the tabbed version of the
editor) and
>>>>> XWiki-specific plugins (link, image, macro and importer) unless you
>>>>> implement the GWR-RPC services currently implemented in
>>>>>
>>>>>
>
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-ser…
>>>>> .
>>>>>
>>>>> If you choose to use the same entry point, the JavaScript API that
is
>>>>> being publish is described at
>>>>>
>>>>>
>
http://code.xwiki.org/xwiki/bin/view/Modules/WysiwygEditorModule#HWysiwygEd…
>>>>> . You can find the configuration parameters at
>>>>>
>>>>>
>
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/WysiwygEditor#HConfigur…
>>>>> . Note that we have written a custom GWT script loader (
>>>>>
>>>>>
>
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-cli…
>>>>> ) which allows us to write:
>>>>>
>>>>> Wysiwyg.onModuleLoad(function() {
>>>>> // code here
>>>>> });
>>>>>
>>>>> This way we know for sure that when we try to create a new WYSIWYG
>>>>> editor the GWT module was loaded. The easiest way to create the
editor
>>>>> without the special loader is to use a button and to place the code
on
>>>>> click.
>>>>>
>>>>> Hope this helps,
>>>>> Marius
>>>>>
>>>>> Fady Matar wrote:
>>>>>> I'm aiming to run the wysiwyg component as a standalone GWT
for a
>>>>>> number
>>>>> of
>>>>>> reasons:
>>>>>> 1. To be able to test the component without it being hooked up
to
> XWiki
>>>>>> 2. To be able to expand it or add more features to it as
required.
>>>>>>
>>>>>> I would like to get all the possible assistance in achieving
that
> task
>>>>>> so
>>>>> I
>>>>>> can share it with others and probably update the documentation
if
> it's
>>>>>> beneficial to others.