I'm trying to convert html to bbcode
I try using QRexExp, but I'm not so good with it...
That I try to do is extract the html from a QTextEdit with the function QTextEdit.toHtml().
In my QTextEdit i put the QTextEdit.setFontWeigh(), QTextEdit.setFontItalic() and QTextEdit.setFontUnderline() functions.
Here I have a problem:
The QTextEdit give to me the next html code:
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:4800; font-style:italic; text-decoration: underline;">asdasd</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:4800; font-style:italic; text-decoration: underline;">asdasd</span></p>
To copy to clipboard, switch view to plain text mode
How can I remove it and put the tags that are (In this case [ b], [ i], [ u]) with it respective tag end ([/ b], [/ i], [/ u])
I search a library that help me but I don't found it
Sorry if i don't explain it good... And for my bad englesh...
Bookmarks