Home » Archived » EPF » Re-use Rich Text Editor component on Mac?
| | | | | | | | |
Re: Re-use Rich Text Editor component on Mac? [message #42934 is a reply to message #34713] |
Mon, 08 October 2007 20:37   |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
Phillip Beauvoir wrote:
> I've extrapolated the following bundles that are needed for the RTE
> (version 1.2) to work in a RCP application:
>
> org.eclipse.epf.common
> org.eclipse.epf.richtext
> org.eclipse.epf.ui
>
> I have a RichTextEditor class instantiated in an Editor View together
> with a populated RichTextToolBar. This all works fine on Windows XP and
> Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
Can you share the details of how you implemented RichTextEditor in a
non-EPF application? I'm in the process of doing so and would like to
hear any lessons that were learned by someone who has already been down
this path.
Thanks,
Eric
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #42965 is a reply to message #34713] |
Mon, 08 October 2007 20:37   |
Eclipse User |
|
|
|
Originally posted by: eclipse6.rizzoweb.com
Phillip Beauvoir wrote:
> I've extrapolated the following bundles that are needed for the RTE
> (version 1.2) to work in a RCP application:
>
> org.eclipse.epf.common
> org.eclipse.epf.richtext
> org.eclipse.epf.ui
>
> I have a RichTextEditor class instantiated in an Editor View together
> with a populated RichTextToolBar. This all works fine on Windows XP and
> Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
Can you share the details of how you implemented RichTextEditor in a
non-EPF application? I'm in the process of doing so and would like to
hear any lessons that were learned by someone who has already been down
this path.
Thanks,
Eric
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #42996 is a reply to message #42965] |
Mon, 08 October 2007 20:53   |
h1055071 Messages: 335 Registered: July 2009 |
Senior Member |
|
|
Eric Rizzo wrote:
> Phillip Beauvoir wrote:
>> I've extrapolated the following bundles that are needed for the RTE
>> (version 1.2) to work in a RCP application:
>>
>> org.eclipse.epf.common
>> org.eclipse.epf.richtext
>> org.eclipse.epf.ui
>>
>> I have a RichTextEditor class instantiated in an Editor View together
>> with a populated RichTextToolBar. This all works fine on Windows XP
>> and Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
>
> Can you share the details of how you implemented RichTextEditor in a
> non-EPF application? I'm in the process of doing so and would like to
> hear any lessons that were learned by someone who has already been down
> this path.
>
> Thanks,
> Eric
Hi, yes:
For a start it only works on Windows and Linux, the Mac is going to need
some Safari-specific voodoo added to the rte.js and rendering files in
the rte folder.
The plug-in I put together is here in CVS:
Host: tencompetence.cvs.sourceforge.net
Path: /cvsroot/tencompetence
Module: rte/org.eclipse.epf.richtext
I then instantiate a RTE control thus:
class RTE
extends RichTextEditor
{
public RTE(Composite parent, int style, IEditorSite editorSite,
String basePath) {
super(parent, style, editorSite, basePath);
}
public RTE(Composite parent, int style, IEditorSite editorSite) {
super(parent, style, editorSite);
}
@Override
public void fillToolBar(IRichTextToolBar toolBar) {
toolBar.addAction(new FontStyleAction(this));
toolBar.addAction(new FontNameAction(this));
toolBar.addAction(new FontSizeAction(this));
toolBar.addSeparator();
toolBar.addAction(new CutAction(this));
toolBar.addAction(new CopyAction(this));
toolBar.addAction(new PasteAction(this));
toolBar.addSeparator();
toolBar.addAction(new ClearContentAction(this));
toolBar.addSeparator();
toolBar.addAction(new BoldAction(this));
toolBar.addAction(new ItalicAction(this));
toolBar.addAction(new UnderlineAction(this));
toolBar.addSeparator();
toolBar.addAction(new SubscriptAction(this));
toolBar.addAction(new SuperscriptAction(this));
toolBar.addSeparator();
toolBar.addAction(new TidyActionGroup(this));
toolBar.addSeparator();
toolBar.addAction(new AddOrderedListAction(this));
toolBar.addAction(new AddUnorderedListAction(this));
toolBar.addSeparator();
toolBar.addAction(new OutdentAction(this));
toolBar.addAction(new IndentAction(this));
toolBar.addSeparator();
toolBar.addAction(new FindReplaceAction(this) {
@Override
public void execute(IRichText richText) {
richText.getFindReplaceAction().execute(richText);
}
});
toolBar.addSeparator();
toolBar.addAction(new AddLinkAction(this));
toolBar.addAction(new AddImageAction(this));
toolBar.addAction(new AddTableAction(this));
}
}
And then add it to an EditorPart.
PB
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #46307 is a reply to message #42996] |
Wed, 05 December 2007 09:00   |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Phillip Beauvoir a écrit :
> Eric Rizzo wrote:
>> Phillip Beauvoir wrote:
>>> I've extrapolated the following bundles that are needed for the RTE
>>> (version 1.2) to work in a RCP application:
>>>
>>> org.eclipse.epf.common
>>> org.eclipse.epf.richtext
>>> org.eclipse.epf.ui
>>>
>>> I have a RichTextEditor class instantiated in an Editor View together
>>> with a populated RichTextToolBar. This all works fine on Windows XP
>>> and Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
>>
>> Can you share the details of how you implemented RichTextEditor in a
>> non-EPF application? I'm in the process of doing so and would like to
>> hear any lessons that were learned by someone who has already been
>> down this path.
>>
>> Thanks,
>> Eric
>
> Hi, yes:
>
> For a start it only works on Windows and Linux, the Mac is going to need
> some Safari-specific voodoo added to the rte.js and rendering files in
> the rte folder.
>
> The plug-in I put together is here in CVS:
>
> Host: tencompetence.cvs.sourceforge.net
> Path: /cvsroot/tencompetence
> Module: rte/org.eclipse.epf.richtext
>
> I then instantiate a RTE control thus:
>
> class RTE
> extends RichTextEditor
> {
>
> public RTE(Composite parent, int style, IEditorSite editorSite,
> String basePath) {
> super(parent, style, editorSite, basePath);
> }
>
> public RTE(Composite parent, int style, IEditorSite editorSite) {
> super(parent, style, editorSite);
> }
>
> @Override
> public void fillToolBar(IRichTextToolBar toolBar) {
> toolBar.addAction(new FontStyleAction(this));
> toolBar.addAction(new FontNameAction(this));
> toolBar.addAction(new FontSizeAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new CutAction(this));
> toolBar.addAction(new CopyAction(this));
> toolBar.addAction(new PasteAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new ClearContentAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new BoldAction(this));
> toolBar.addAction(new ItalicAction(this));
> toolBar.addAction(new UnderlineAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new SubscriptAction(this));
> toolBar.addAction(new SuperscriptAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new TidyActionGroup(this));
> toolBar.addSeparator();
> toolBar.addAction(new AddOrderedListAction(this));
> toolBar.addAction(new AddUnorderedListAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new OutdentAction(this));
> toolBar.addAction(new IndentAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new FindReplaceAction(this) {
> @Override
> public void execute(IRichText richText) {
> richText.getFindReplaceAction().execute(richText);
> }
> });
> toolBar.addSeparator();
> toolBar.addAction(new AddLinkAction(this));
> toolBar.addAction(new AddImageAction(this));
> toolBar.addAction(new AddTableAction(this));
> }
>
> }
>
> And then add it to an EditorPart.
>
> PB
Hi all,
You may be interested to know that the RichTextEditor seems to work now
with the new the version of Safari (3.0).
I'm also doing an RCP application that reuses the RichTextEditor. The
buttons now works in the wysiwyg tab.
Best regards
Yannick
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #46337 is a reply to message #46307] |
Wed, 05 December 2007 14:27   |
Eclipse User |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
Yannick Lizzi wrote:
>
> Hi all,
>
> You may be interested to know that the RichTextEditor seems to work now
> with the new the version of Safari (3.0).
> I'm also doing an RCP application that reuses the RichTextEditor. The
> buttons now works in the wysiwyg tab.
Yannick,
You might be interested in this Bug report which requests the RTE be
improved for consumability:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209373
Feel free to vote for it and/or add comments.
Eric
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #47888 is a reply to message #46307] |
Sun, 10 February 2008 01:04  |
Sung Ahn Kim Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Buttons work but the editor section fail to refresh its contents.
Also, save and close key binding doesn't work in the editor.
(Of cource, it works fine on Windows)
There can be alternative approach. Use firefox instead of Safari.
Rich text editor uses platform specific web browser instance.
new Borwser(parent, SWT.NONE)
now eclipse 3.3 support firefox everywhere.
new Browser(parent, SWT.MOZILLA)
Unfortunately, when I change its style, my eclipse app. crashes caused by
jni call (3.4M4) or unknow problem (3.3.1.1). SWT mozilla example works
fine ... If SWT fix this unstable behavior, we can use rich text without
pain.
Yes, that is only my hope. But, there is an alternative approach.
1) Support safari on mac
2) Or, support mozilla everywhere
|
|
| | | | | | | | | | |
Re: Re-use Rich Text Editor component on Mac? [message #584387 is a reply to message #42965] |
Mon, 08 October 2007 20:53  |
h1055071 Messages: 335 Registered: July 2009 |
Senior Member |
|
|
Eric Rizzo wrote:
> Phillip Beauvoir wrote:
>> I've extrapolated the following bundles that are needed for the RTE
>> (version 1.2) to work in a RCP application:
>>
>> org.eclipse.epf.common
>> org.eclipse.epf.richtext
>> org.eclipse.epf.ui
>>
>> I have a RichTextEditor class instantiated in an Editor View together
>> with a populated RichTextToolBar. This all works fine on Windows XP
>> and Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
>
> Can you share the details of how you implemented RichTextEditor in a
> non-EPF application? I'm in the process of doing so and would like to
> hear any lessons that were learned by someone who has already been down
> this path.
>
> Thanks,
> Eric
Hi, yes:
For a start it only works on Windows and Linux, the Mac is going to need
some Safari-specific voodoo added to the rte.js and rendering files in
the rte folder.
The plug-in I put together is here in CVS:
Host: tencompetence.cvs.sourceforge.net
Path: /cvsroot/tencompetence
Module: rte/org.eclipse.epf.richtext
I then instantiate a RTE control thus:
class RTE
extends RichTextEditor
{
public RTE(Composite parent, int style, IEditorSite editorSite,
String basePath) {
super(parent, style, editorSite, basePath);
}
public RTE(Composite parent, int style, IEditorSite editorSite) {
super(parent, style, editorSite);
}
@Override
public void fillToolBar(IRichTextToolBar toolBar) {
toolBar.addAction(new FontStyleAction(this));
toolBar.addAction(new FontNameAction(this));
toolBar.addAction(new FontSizeAction(this));
toolBar.addSeparator();
toolBar.addAction(new CutAction(this));
toolBar.addAction(new CopyAction(this));
toolBar.addAction(new PasteAction(this));
toolBar.addSeparator();
toolBar.addAction(new ClearContentAction(this));
toolBar.addSeparator();
toolBar.addAction(new BoldAction(this));
toolBar.addAction(new ItalicAction(this));
toolBar.addAction(new UnderlineAction(this));
toolBar.addSeparator();
toolBar.addAction(new SubscriptAction(this));
toolBar.addAction(new SuperscriptAction(this));
toolBar.addSeparator();
toolBar.addAction(new TidyActionGroup(this));
toolBar.addSeparator();
toolBar.addAction(new AddOrderedListAction(this));
toolBar.addAction(new AddUnorderedListAction(this));
toolBar.addSeparator();
toolBar.addAction(new OutdentAction(this));
toolBar.addAction(new IndentAction(this));
toolBar.addSeparator();
toolBar.addAction(new FindReplaceAction(this) {
@Override
public void execute(IRichText richText) {
richText.getFindReplaceAction().execute(richText);
}
});
toolBar.addSeparator();
toolBar.addAction(new AddLinkAction(this));
toolBar.addAction(new AddImageAction(this));
toolBar.addAction(new AddTableAction(this));
}
}
And then add it to an EditorPart.
PB
|
|
|
Re: Re-use Rich Text Editor component on Mac? [message #585832 is a reply to message #42996] |
Wed, 05 December 2007 09:00  |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Phillip Beauvoir a écrit :
> Eric Rizzo wrote:
>> Phillip Beauvoir wrote:
>>> I've extrapolated the following bundles that are needed for the RTE
>>> (version 1.2) to work in a RCP application:
>>>
>>> org.eclipse.epf.common
>>> org.eclipse.epf.richtext
>>> org.eclipse.epf.ui
>>>
>>> I have a RichTextEditor class instantiated in an Editor View together
>>> with a populated RichTextToolBar. This all works fine on Windows XP
>>> and Ubuntu 7 (apart from a bug I noticed on the Toolbar layout).
>>
>> Can you share the details of how you implemented RichTextEditor in a
>> non-EPF application? I'm in the process of doing so and would like to
>> hear any lessons that were learned by someone who has already been
>> down this path.
>>
>> Thanks,
>> Eric
>
> Hi, yes:
>
> For a start it only works on Windows and Linux, the Mac is going to need
> some Safari-specific voodoo added to the rte.js and rendering files in
> the rte folder.
>
> The plug-in I put together is here in CVS:
>
> Host: tencompetence.cvs.sourceforge.net
> Path: /cvsroot/tencompetence
> Module: rte/org.eclipse.epf.richtext
>
> I then instantiate a RTE control thus:
>
> class RTE
> extends RichTextEditor
> {
>
> public RTE(Composite parent, int style, IEditorSite editorSite,
> String basePath) {
> super(parent, style, editorSite, basePath);
> }
>
> public RTE(Composite parent, int style, IEditorSite editorSite) {
> super(parent, style, editorSite);
> }
>
> @Override
> public void fillToolBar(IRichTextToolBar toolBar) {
> toolBar.addAction(new FontStyleAction(this));
> toolBar.addAction(new FontNameAction(this));
> toolBar.addAction(new FontSizeAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new CutAction(this));
> toolBar.addAction(new CopyAction(this));
> toolBar.addAction(new PasteAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new ClearContentAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new BoldAction(this));
> toolBar.addAction(new ItalicAction(this));
> toolBar.addAction(new UnderlineAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new SubscriptAction(this));
> toolBar.addAction(new SuperscriptAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new TidyActionGroup(this));
> toolBar.addSeparator();
> toolBar.addAction(new AddOrderedListAction(this));
> toolBar.addAction(new AddUnorderedListAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new OutdentAction(this));
> toolBar.addAction(new IndentAction(this));
> toolBar.addSeparator();
> toolBar.addAction(new FindReplaceAction(this) {
> @Override
> public void execute(IRichText richText) {
> richText.getFindReplaceAction().execute(richText);
> }
> });
> toolBar.addSeparator();
> toolBar.addAction(new AddLinkAction(this));
> toolBar.addAction(new AddImageAction(this));
> toolBar.addAction(new AddTableAction(this));
> }
>
> }
>
> And then add it to an EditorPart.
>
> PB
Hi all,
You may be interested to know that the RichTextEditor seems to work now
with the new the version of Safari (3.0).
I'm also doing an RCP application that reuses the RichTextEditor. The
buttons now works in the wysiwyg tab.
Best regards
Yannick
|
|
| |
Re: Re-use Rich Text Editor component on Mac? [message #588395 is a reply to message #46307] |
Sun, 10 February 2008 01:04  |
Sung Ahn Kim Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Buttons work but the editor section fail to refresh its contents.
Also, save and close key binding doesn't work in the editor.
(Of cource, it works fine on Windows)
There can be alternative approach. Use firefox instead of Safari.
Rich text editor uses platform specific web browser instance.
new Borwser(parent, SWT.NONE)
now eclipse 3.3 support firefox everywhere.
new Browser(parent, SWT.MOZILLA)
Unfortunately, when I change its style, my eclipse app. crashes caused by
jni call (3.4M4) or unknow problem (3.3.1.1). SWT mozilla example works
fine ... If SWT fix this unstable behavior, we can use rich text without
pain.
Yes, that is only my hope. But, there is an alternative approach.
1) Support safari on mac
2) Or, support mozilla everywhere
|
|
|
Goto Forum:
Current Time: Mon Dec 04 11:18:35 GMT 2023
Powered by FUDForum. Page generated in 0.03867 seconds
|