[Interest] How to develop a WYSIWYG HTML editor based on QtWebkit?
chengliang.soft at gmail.com
Thu Aug 9 04:57:53 CEST 2012
I'll try this JS code. In fact, I feel rather confuse about the HTML code
Say I set content editable and enter some words line by line. Instead of
code (using QWebFrame::toHtml()) is <div> wrapped. I thought it is more
natural to wrap
words line by line with <p>. Of course I could replace all <div>s with
<p>s, but I couldn't
find out which should be <p> and which should be <div>.
2012/8/8 Josiah Bryan <josiahbryan at gmail.com>
> On Tue, Aug 7, 2012 at 11:35 PM, 程梁 <chengliang.soft at gmail.com> wrote:
>> Thanks! I saw this example before. There is the same problem as I met.
>> If you clear editing area and type something, you will got some HTML
>> code like:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>> <title>HTML Editor Demo</title>
>> </head><body style="word-wrap: break-word; -webkit-nbsp-mode: space;
>> -webkit-line-break: after-white-space; ">hey</body></html>
>> in which I just write hey and I want to get
> everything underneath body. Not sure if this works in WebKit, but a
> content of the body. You could wrap it in <p> tags if no tags found in the
> HTML (e.g. just one long string.)
Cheng Liang <http://about.me/devbean>
from: devbean at devbean.info
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest