QtWebKit for WYSIWYG Editor



  • Hi,

    For a project of mine I am planning to create a HTML WYSIWYG editor. I am planning to use QtWebKit as the designer canvas and use standard widgets/controls in my application to configure/create DOM objects in the designer. My application will also have an asset window of some kind to drag and drop predefined HTML objects into the designer canvas. I would very much appreciate if someone could help me answering the following questions.

    [1] Is drag and drop possible on QtWebKit. Is it possible the register and receive these events?

    [2] Is is possible to bind JavaScript objects to Qt objects from a webkit context, or do I have to parse strings from/to webkit in order to have Qt en JS communicate.

    Thanks in advance.



  • Hi,

    HTML WYSIWYG editor, "this":http://maqetta.org/ might be a good reference (IBM just released this tool to opensource) ...

    Meanwhile,

    1. Yes says "html5test":http://developer.qt.nokia.com/wiki/Qt_Webkit_HTML5_Score, No says "QtWebKitSupportedStandards":http://trac.webkit.org/wiki/QtWebKitSupportedStandards page

    2. See this for "integrating with javascript":http://doc.qt.nokia.com/4.7-snapshot/qdeclarativejavascript.html



  • I tried an example, the drag seems ok, drop has issues with ghost text, mixed up variables and refresh issues. The same example works swell in Chrome and FF4 .. so guess we have to wait for a more stabler release



  • [1] Drag and drop surely works as with any other widget.
    [2] You are aware of QWebPage::contentEditable?

    I believe there have been discussions about this topic on the mailing lists some time ago. For sure some people out there are using QtWebKit for WYSIWYG editors.



  • [quote author="unclewerner" date="1303810522"][1] Drag and drop surely works as with any other widget.
    [2] You are aware of QWebPage::contentEditable?

    I believe there have been discussions about this topic on the mailing lists some time ago. For sure some people out there are using QtWebKit for WYSIWYG editors. [/quote]

    even with QWebPage::contentEditable, I'm having an issue getting this "link":http://html5demos.com/drag to work properly after the drop... it works fine on other browsers

    what am I doing wrong?



  • The documentation says about QWebPage::contentEditable: "If this property is enabled the contents of the page can be edited by the user through a visible cursor..." In other words it is not related to HTML5. I wouldn't suggest to use a pure JS solution fo a WYSIWYG editor.



  • Maybe this will be helpfull --> "WYSIWYG HTML Editor":http://labs.qt.nokia.com/2009/03/12/wysiwyg-html-editor/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.