[PyQt] python bindings around webkit

Aaron Digulla digulla at hepe.com
Wed Oct 15 14:31:54 BST 2008


Quoting Luke Kenneth Casson Leighton <lkcl at lkcl.net>:

>> I'm especially interested if I
>> would be able to get access to the current cursor position in edit
>> mode - that would allow me to use WebKit as the basis to write a very
>> powerful WYSIWYG text editor.
>
> well... you can definitely get access to the cursor position, in a
> textarea, for example, just like you can with javascript.  basically,
> _anything_ that can be done with javascript, you can also do with the
> webkit DOM bindings.

I'd like to use the HTML edit mode of webkit (there is a demo editor  
which comes with the webkit source). My main issue with the editor is  
that I need a way to calculate line and column information and I need  
to do that *fast*. So I probably need access to the word wrap  
information and I'm not sure if you could access that via the official  
C++ API.

>  could
> you possibly implement it according to the "pyjamas" API (which you
> will find more convenient anyway) so implement it as a pyjamas Widget,
> and could you try to test its development simultaneously using
> pyjamas-desktop - http://pyjd.org - as _well_ as under pyjamas -
> http://pyjs.org ?

I guess. I need it as a powerful text editor in Enthought Traits  
(https://svn.enthought.com/enthought/wiki/Traits). Traits itself is a  
thin wrapper around PyQt and WX (so you have the choice of two widget  
sets in your app). Maybe you'll want to have a look at this kit, too.  
If pyjd would be compatible to traits, that would give Python apps a  
real choice.

Regards,

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/



More information about the PyQt mailing list