Hello,
I am trying to control export of RichTextCtrl content, by defining named styles and then looping over the nodes in the buffer, export each into HTML that wouldn't be cluttered by too much mark up like font etc. and also to be able to produce HTML that would have <h1> instead of specified font. But I don't seem to be able to get lower that a paragraph.
buffer = myrichtextctrl.GetBuffer ()
nodes = buffer.GetChildren ()
for para in nodes:
print para
The paragraphs are wx.richtext.RichTextObject. I have also split the paragraph by defining character styles. How do I get to the lower level so I extract character style information?
I am doing this as a test so I understand how it works before I try to write proper RichTextFileHandler.
Hello,
I am trying to control export of RichTextCtrl content, by defining named styles and then looping over the nodes in the buffer, export each into HTML that wouldn't be cluttered by too much mark up like font etc. and also to be able to produce HTML that would have <h1> instead of specified font. But I don't seem to be able to get lower that a paragraph.
buffer = myrichtextctrl.GetBuffer ()
nodes = buffer.GetChildren ()
for para in nodes:
print para
The paragraphs are wx.richtext.RichTextObject. I have also split the paragraph by defining character styles. How do I get to the lower level so I extract character style information?
I am doing this as a test so I understand how it works before I try to write proper RichTextFileHandler.
Since SWIG by default creates new proxy objects for returned pointers, and doesn't do anything to figure out what is the real type being pointed to (it may be of some derived class) then we have to do some work ourselves to make it do what is expected. Please try the attached patch.
Hello,
I am trying to control export of RichTextCtrl content, by defining named styles and then looping over the nodes in the buffer, export each into HTML that wouldn't be cluttered by too much mark up like font etc. and also to be able to produce HTML that would have <h1> instead of specified font. But I don't seem to be able to get lower that a paragraph.
buffer = myrichtextctrl.GetBuffer ()
nodes = buffer.GetChildren ()
for para in nodes:
print para
The paragraphs are wx.richtext.RichTextObject. I have also split the paragraph by defining character styles. How do I get to the lower level so I extract character style information?
I am doing this as a test so I understand how it works before I try to write proper RichTextFileHandler.
Since SWIG by default creates new proxy objects for returned pointers, and doesn't do anything to figure out what is the real type being pointed to (it may be of some derived class) then we have to do some work ourselves to make it do what is expected. Please try the attached patch.
Hello,
I am trying to control export of RichTextCtrl content, by defining named styles and then looping over the nodes in the buffer, export each into HTML that wouldn't be cluttered by too much mark up like font etc. and also to be able to produce HTML that would have <h1> instead of specified font. But I don't seem to be able to get lower that a paragraph.
buffer = myrichtextctrl.GetBuffer ()
nodes = buffer.GetChildren ()
for para in nodes:
print para
The paragraphs are wx.richtext.RichTextObject. I have also split the paragraph by defining character styles. How do I get to the lower level so I extract character style information?
I am doing this as a test so I understand how it works before I try to write proper RichTextFileHandler.
Since SWIG by default creates new proxy objects for returned pointers, and doesn't do anything to figure out what is the real type being pointed to (it may be of some derived class) then we have to do some work ourselves to make it do what is expected. Please try the attached patch.
Since SWIG by default creates new proxy objects for returned pointers, and doesn't do anything to figure out what is the real type being pointed to (it may be of some derived class) then we have to do some work ourselves to make it do what is expected. Please try the attached patch.
Just wanted to ask, will that patch make into the some recent release?
I don't have access to the time machine at the moment, so it won't be in a recent release, but it iwll be in a future one.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Since SWIG by default creates new proxy objects for returned pointers, and doesn't do anything to figure out what is the real type being pointed to (it may be of some derived class) then we have to do some work ourselves to make it do what is expected. Please try the attached patch.
Just wanted to ask, will that patch make into the some recent release?
I don't have access to the time machine at the moment, so it won't be in a recent release, but it iwll be in a future one.