PDA

View Full Version : Qt 4.4 WebKit: WYSIWYG HTML editor?



24pm
26th May 2008, 07:00
I would like to have HTML WYSIWYG editor as a part of my application. WebKit seems to provide such an ability, bacause Qt Assistant says: "HTML documents can be made fully editable to the user through the use of the contenteditable attribute on HTML elements."
But no additional information I could found. Is it an example how to do that?

Brandybuck
26th May 2008, 07:52
The editing facility is new in HTML 5. It is probably not what you are looking for. http://www.w3.org/html/wg/html5/#editing

24pm
26th May 2008, 08:22
Thank you for the link, but it does not help to understand how to use it in Qt. And the following is very interesting: "User agents must support this attribute on all HTML elements."

Brandybuck
26th May 2008, 17:20
QtWebKit already supports this. There is nothing you need to do but give it some HTML5 to edit. But you cannot use it to create a WYSIWYG HTML editor, because that is not what it is for. This lets users edit the content of webpages.

If you don't need full CSS support, you might consider QTextEdit/QTextDocument.

patrik08
26th May 2008, 19:19
I would like to have HTML WYSIWYG editor as a part of my application. WebKit seems to provide such an ability?

WebKit support 50% from javascript && Dom..
Befor WebKit can edit self page it must able to display..

I found a lot of page that WebKit can not display.. and ( big sister ) Safari display correct
if html having error it display blank page

Animated Image format:
http://www.miwa-immobilien-allgaeu.de/privat/Animationen_gif2apng_gif2mng_gif2swf.htm
gif , swf , mng , apng , svg
WebKit display only gif .. + first frame from APNG ( APNG having backward compatibility with non-animated PNG files)
Plug-in mng from QT4 not work on WebKit
SWF flash plug-in i dont know if exist... Adobe not having...


Online edit simple way is only window.getSelection() +
http://mozile.mozdev.org/
xhtml edit:
http://kupu.oscom.org/
http://bitfluxeditor.org/

all other is commercial or not XHTML

Ok you can use QTextedit + and is Api QTextDocument ... and after all <div> or <objekt> tag go destroy , QTextDocument not know all tag...

On QT the unique way to edit a all xhtml tag :
1 - wait first release from http://sourceforge.net/projects/qxsl-fo/ 1-2 week
( from xsl-fo to porting on xhtml is easy all inside QGraphicsView
any tag or append tag has his item on a group )
2 - destroy unknow tag from app http://www.qt-apps.org/content/show.php/XHTML+Wysiwyg+Qeditor?content=59493 Like QTexbrowser
3 - Miniscribus xhtml export http://www.qt-apps.org/content/show.php/Fop+MiniScribus+XSL-Fo?content=67552 layer based <div>
4 - Compose xhtml on http://www.qt-apps.org/content/show.php/GraphicsViewEdit+Layer?content=80234 layer based <div>
3 - build your own application on minimum 20 week

Brandybuck
27th May 2008, 18:37
QtWebKit does not support third party plugins (or Java). Only HTML and native image formats can be shown, with help form CSS and Javscript. You may need to provide some assistance for some image formats (MNG). Flash won't display at all because it is not HTML, but a third party proprietary plugin.

24pm
13th March 2009, 10:08
There is a move from Qt finally:
http://labs.trolltech.com/blogs/2009/03/12/wysiwyg-html-editor/