WYSIWYG-Editor

Hello,

where is the best startpoint to make my own WYSIWYG-Editor, which has
the functionality of a RichTextCtrl and where I can also create some
boxes around some text. These boxes won’t be in the final output. Or is
this also possible with a RichTextCtrl?

Thank You!

Johannes Schönberger

Johannes Schönberger wrote:

Hello,

where is the best startpoint to make my own WYSIWYG-Editor, which has the functionality of a RichTextCtrl and where I can also create some boxes around some text. These boxes won't be in the final output. Or is this also possible with a RichTextCtrl?

Thank You!
Johannes Schönberger

You could take a look at Boa Constructor and see how they do it for wxPython apps: http://boa-constructor.sourceforge.net/

I haven't looked at it, so I don't know which widgets they use. You could probably learn a lot from Editra too (which is now included with wxPython): http://editra.org/

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Johannes Schönberger wrote:

Hello,

where is the best startpoint to make my own WYSIWYG-Editor, which has the functionality of a RichTextCtrl and where I can also create some boxes around some text. These boxes won't be in the final output. Or is this also possible with a RichTextCtrl?

I think at the moment RichTextCtrl is the best,
but AFAIK it can't draw boxes or tables.
I've been looking for a while for such a component,
but I think it's simply not there.
The best I found was to use and embed Open Office, then you've everything you need.

cheers,
Stef

···

Thank You!
Johannes Schönberger
------------------------------------------------------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Stef Mientki wrote:

Johannes Schönberger wrote:

Hello,

where is the best startpoint to make my own WYSIWYG-Editor, which has the functionality of a RichTextCtrl and where I can also create some boxes around some text. These boxes won't be in the final output. Or is this also possible with a RichTextCtrl?

I think at the moment RichTextCtrl is the best,
but AFAIK it can't draw boxes or tables.
I've been looking for a while for such a component,
but I think it's simply not there.
The best I found was to use and embed Open Office, then you've everything you need.

cheers,
Stef

If I had to hazard a guess, I would suppose you'd need to use a DC of some sort to overlay boxes on other widgets or you might just have to draw everything yourself. Robin, Chris and others seem to think this is fairly easy to do, but I have no experience doing it so I can't comment.

Mike

Also, take a look at the Dabo Framework. We wrapped WxPython for the
UI and have a widget called dEditor which subclasses the STC control.
We have an Editor that you can look at that might give you a few ideas
as well.

Nate Lowrie

···

On Wed, Dec 31, 2008 at 9:33 AM, Mike Driscoll <mike@pythonlibrary.org> wrote:

You could take a look at Boa Constructor and see how they do it for wxPython
apps: http://boa-constructor.sourceforge.net/

I haven't looked at it, so I don't know which widgets they use. You could
probably learn a lot from Editra too (which is now included with wxPython):
http://editra.org/

Mike Driscoll wrote:

If I had to hazard a guess, I would suppose you'd need to use a DC of some sort to overlay boxes on other widgets or you might just have to draw everything yourself. Robin, Chris and others seem to think this is fairly easy to do,

Well, it's pretty easy to draw stuff, but writing an entire rich text control is a major task!

I know nothing of the RichTextCtrl, but I'd look to see if it has methods for getting the coordinates of various pieces of text, and if so, you may be able to draw your boxes on top of it.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Christopher Barker wrote:

Mike Driscoll wrote:

If I had to hazard a guess, I would suppose you'd need to use a DC of some sort to overlay boxes on other widgets or you might just have to draw everything yourself. Robin, Chris and others seem to think this is fairly easy to do,

Well, it's pretty easy to draw stuff, but writing an entire rich text control is a major task!

I know nothing of the RichTextCtrl, but I'd look to see if it has methods for getting the coordinates of various pieces of text, and if so, you may be able to draw your boxes on top of it.

-Chris

But you guys are my (wx) heroes! Well, anyway the Dabo idea that Nate mentioned sounds useful too. Have a nice New Years!

Mike

Hi,

Well, it’s pretty easy to draw
stuff, but writing an entire rich text control is a major task!

I know nothing of the RichTextCtrl, but I’d look to see if it has
methods for getting the coordinates of various pieces of text, and if
so, you may be able to draw your boxes on top of it.

Unfortunately I couldn’t find a method to get the coordinates of some
text in wx.richtext.RichTextCtrl… But do you think I could get my
coordinates out of the SelectionRange and LineNumbers?

Also, take a look at the Dabo Framework. We wrapped WxPython for the
UI and have a widget called dEditor which subclasses the STC control.
We have an Editor that you can look at that might give you a few ideas
as well.

But in what way does this Editor use boxes/containers? I couldn’t find
it…

Any other ideas?

Thank You for all your ideas!!



Christopher Barker schrieb:

···

Mike
Driscoll wrote:

If I had to hazard a guess, I would suppose

you’d need to use a DC of some sort to overlay boxes on other widgets
or you might just have to draw everything yourself. Robin, Chris and
others seem to think this is fairly easy to do,

Well, it’s pretty easy to draw stuff, but writing an entire rich text
control is a major task!

I know nothing of the RichTextCtrl, but I’d look to see if it has
methods for getting the coordinates of various pieces of text, and if
so, you may be able to draw your boxes on top of it.

-Chris

just read an article about OLPC.

isn’t embedding of Abiword thé way to go ?

cheers,

Stef

Johannes Schönberger wrote:

···

wxpython-users@lists.wxwidgets.orghttp://lists.wxwidgets.org/mailman/listinfo/wxpython-users

H Stef.

I don't understand the connection between those two sentences but am intrigued.

And I have no sense at all of how one would embed Abiword in wxPython. Would
you mind explaining that a bit? Thanks! Che

···

On Wed, Jan 7, 2009 at 9:39 AM, Stef Mientki <s.mientki@ru.nl> wrote:

just read an article about OLPC.
isn't embedding of Abiword thé way to go ?

C M wrote:

just read an article about OLPC.
isn't embedding of Abiword thé way to go ?
    
H Stef.

I don't understand the connection between those two sentences but am intrigued.
  

The article I read, said OLPC has decided to use Abiword as the wysiwyg editor.

And I have no sense at all of how one would embed Abiword in wxPython. Would
you mind explaining that a bit? Thanks! Che
  

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,
I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in wxPython ?

cheers,
Stef

···

On Wed, Jan 7, 2009 at 9:39 AM, Stef Mientki <s.mientki@ru.nl> wrote:

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

And I have no sense at all of how one would embed Abiword in wxPython. Would

you mind explaining that a bit? Thanks! Che

Well I’m no expert, so maybe my ideas are just nonsense,

but as wxPython is still missing a wysiwyg (full) richedit / html editor,

and there seems to be no plans to create / embed one yet,

I’m still looking for alternatives

( for personal use I can create one on basis of an activeX,

but it’s windows only and I’m not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in wxPython ?

Abiword is GPL which might be a problem; additionally while PyGTK may have one the non-GTK ports might be a lot more problematic. Abiword runs fine on Windows and I think mac, but is it readily embedable in either? I’m not sure. It being GPL means i never looked closely at it.

I’m personally having some fairly good success with wxRichTextCtrl for a WYSIWYG editor – only waiting eagerly for the stylesheet controls to be wrapped and I’ll be able to use it. They’re already in wx.

As to the original poster-- I’m don’t think there’s a way with wxRichText to draw “boxes” around text, but you might be able to get a similar effect if you set the background color for a chunk of text to something. Keeping that out of the output… no idea :slight_smile:

–Stephen

And I have no sense at all of how one would embed Abiword in wxPython.
Would
you mind explaining that a bit? Thanks! Che

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,
I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in
wxPython ?

Abiword is GPL which might be a problem; additionally while PyGTK may have
one the non-GTK ports might be a lot more problematic. Abiword runs fine on
Windows and I think mac, but is it readily embedable in either? I'm not
sure. It being GPL means i never looked closely at it.

What about it being GPL makes it problematic for you?

I'm personally having some fairly good success with wxRichTextCtrl for a
WYSIWYG editor -- only waiting eagerly for the stylesheet controls to be
wrapped and I'll be able to use it. They're already in wx.

I'm wondering what changes to the RichTextCtrl are in wx that are not yet
wrapped into wxPython...I got the sense that there was a fair bit more to
go but progress had stopped on it a couple of years ago.

···

On Wed, Jan 7, 2009 at 3:31 PM, Stephen Hansen <apt.shansen@gmail.com> wrote:

The article I read, said OLPC has decided to use Abiword as the wysiwyg
editor.

Abiword is good; I have a laptop from 2000 running Puppy Linux with
Abiword as the word processor. (With OpenOffice.org on Ubuntu on a
brand new computer the fonts looked awful until I figured I needed some
extra packages...a big turnoff for many users firing it up as a Linux newbie,
and they still don't seem quite as good as in Abiword, or maybe I'm imagining
it now).

And I have no sense at all of how one would embed Abiword in wxPython.
Would
you mind explaining that a bit? Thanks! Che

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,
I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

It sounds like a great idea if it could work.

PyGTK has already a Abiword widget, so why not Abiword as a widget in
wxPython ?

I would like to hear how feasible this is in wxPython. I have no sense of this.

Abiword is GPL which might be a problem; additionally while PyGTK may have

one the non-GTK ports might be a lot more problematic. Abiword runs fine on

Windows and I think mac, but is it readily embedable in either? I’m not

sure. It being GPL means i never looked closely at it.

What about it being GPL makes it problematic for you?

Embedding Abiword in one’s app would, according to my understanding of the GPL, not count as “mere aggregation” but instead make the application a derived work. Thus, the application must be GPL to be legally distributed. I do proprietary software development as my day job; when I’m not doing my day job I only really contribute to BSD/MIT style licensed work. So Abiword is impossible for me to use legally in development.

I’m personally having some fairly good success with wxRichTextCtrl for a
WYSIWYG editor – only waiting eagerly for the stylesheet controls to be

wrapped and I’ll be able to use it. They’re already in wx.

I’m wondering what changes to the RichTextCtrl are in wx that are not yet

wrapped into wxPython…I got the sense that there was a fair bit more to

go but progress had stopped on it a couple of years ago.

I don’t have a complete list, but Robin has wrapped quite a bit of it over the last few releases; in 2.8.8.1 printing support was added, 2.8.4.2 had some updates including XML/HTML support. He’s stated he’ll be wrapping more as time goes on. But comparing http://www.wxpython.org/docs/api/wx.richtext-module.html to the regular wx docs seems to indicate quite a bit of it. Stylesheets are the one essential/glaring thing I’m missing, but there’s probably more yet to be wrapped.

–Stephen

Hi Stef,

C M wrote:

just read an article about OLPC.
isn't embedding of Abiword thé way to go ?

H Stef.

I don't understand the connection between those two sentences but am intrigued.

The article I read, said OLPC has decided to use Abiword as the wysiwyg editor.

And I have no sense at all of how one would embed Abiword in wxPython. Would
you mind explaining that a bit? Thanks! Che

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,

No, it's just not a simple task to solve. :wink: In addition to the obvious wxRichTextEditor, I'm working on that functionality for wxWebKit right now actually, and basic stuff is already working (text styles, undo/redo, working on DOM manipulation now). So it is being worked on.

I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in wxPython ?

The question is not whether or not it is possible, as with enough effort anything is possible. The real question is: how much work will it take, what skills will be needed (e.g. C++, SWIG, etc.) and who will do it? FWIW, I've tried embedding both OpenOffice and Mozilla, and neither of them could be reliably embedded cross-platform, even though they both had some degree of "embedding" support. I eventually realized that for this sort of thing to really work with wx, the project we're using must be very serious about supporting cross-platform embedding, which is rarely the case I find. Also, from what I've read, Abiword uses Cocoa on Mac, which for now makes it unusable with wxMac. :frowning:

Regards,

Kevin

···

On Jan 7, 2009, at 11:53 AM, Stef Mientki wrote:

On Wed, Jan 7, 2009 at 9:39 AM, Stef Mientki <s.mientki@ru.nl> wrote:

cheers,
Stef

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

hi Kevin,

Kevin Ollivier wrote:

Hi Stef,

C M wrote:

just read an article about OLPC.
isn't embedding of Abiword thé way to go ?

H Stef.

I don't understand the connection between those two sentences but am intrigued.

The article I read, said OLPC has decided to use Abiword as the wysiwyg editor.

And I have no sense at all of how one would embed Abiword in wxPython. Would
you mind explaining that a bit? Thanks! Che

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,

No, it's just not a simple task to solve. :wink: In addition to the obvious wxRichTextEditor, I'm working on that functionality for wxWebKit right now actually, and basic stuff is already working (text styles, undo/redo, working on DOM manipulation now). So it is being worked on.

Very good to hear you're working on it.
Do you mean, webkit also offers an edit facility,
or will it be done with one of the java-editors like TinyMCE,
which is also perfect,
just interesting.

I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in wxPython ?

The question is not whether or not it is possible, as with enough effort anything is possible. The real question is: how much work will it take, what skills will be needed (e.g. C++, SWIG, etc.) and who will do it? FWIW, I've tried embedding both OpenOffice and Mozilla, and neither of them could be reliably embedded cross-platform, even though they both had some degree of "embedding" support. I eventually realized that for this sort of thing to really work with wx, the project we're using must be very serious about supporting cross-platform embedding, which is rarely the case I find. Also, from what I've read, Abiword uses Cocoa on Mac, which for now makes it unusable with wxMac. :frowning:

thanks for the clarification,
I now get the feeling it's indeed not as easy.

cheers,
Stef

···

On Jan 7, 2009, at 11:53 AM, Stef Mientki wrote:

On Wed, Jan 7, 2009 at 9:39 AM, Stef Mientki <s.mientki@ru.nl> wrote:

Regards,

Kevin

cheers,
Stef

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hi Stef,

hi Kevin,

Kevin Ollivier wrote:

Hi Stef,

C M wrote:

just read an article about OLPC.
isn't embedding of Abiword thé way to go ?

H Stef.

I don't understand the connection between those two sentences but am intrigued.

The article I read, said OLPC has decided to use Abiword as the wysiwyg editor.

And I have no sense at all of how one would embed Abiword in wxPython. Would
you mind explaining that a bit? Thanks! Che

Well I'm no expert, so maybe my ideas are just nonsense,
but as wxPython is still missing a wysiwyg (full) richedit / html editor,
and there seems to be no plans to create / embed one yet,

No, it's just not a simple task to solve. :wink: In addition to the obvious wxRichTextEditor, I'm working on that functionality for wxWebKit right now actually, and basic stuff is already working (text styles, undo/redo, working on DOM manipulation now). So it is being worked on.

Very good to hear you're working on it.
Do you mean, webkit also offers an edit facility,
or will it be done with one of the java-editors like TinyMCE,
which is also perfect,
just interesting.

WebKit provides editing support. It's actually the same functionality used by JavaScript editors like TinyMCE, so it is possible to use those too, but of course JavaScript doesn't have access to the local machine, so you'd have to do things like write a local webserver that receives the save events and saves the documents to get it working that way.

Regards,

Kevin

···

On Jan 8, 2009, at 11:00 AM, Stef Mientki wrote:

On Jan 7, 2009, at 11:53 AM, Stef Mientki wrote:

On Wed, Jan 7, 2009 at 9:39 AM, Stef Mientki <s.mientki@ru.nl> >>>> wrote:

I'm still looking for alternatives
( for personal use I can create one on basis of an activeX,
but it's windows only and I'm not allowed to distribute the active-X)

PyGTK has already a Abiword widget, so why not Abiword as a widget in wxPython ?

The question is not whether or not it is possible, as with enough effort anything is possible. The real question is: how much work will it take, what skills will be needed (e.g. C++, SWIG, etc.) and who will do it? FWIW, I've tried embedding both OpenOffice and Mozilla, and neither of them could be reliably embedded cross-platform, even though they both had some degree of "embedding" support. I eventually realized that for this sort of thing to really work with wx, the project we're using must be very serious about supporting cross-platform embedding, which is rarely the case I find. Also, from what I've read, Abiword uses Cocoa on Mac, which for now makes it unusable with wxMac. :frowning:

thanks for the clarification,
I now get the feeling it's indeed not as easy.

cheers,
Stef

Regards,

Kevin

cheers,
Stef

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users