When QTextEdit will understand tag <strike>?
Solved
General and Desktop
-
@sersver00
the supported HTML subset can be viewed here.
Nevertheless you should ask this question on the developer mailing list. -
Hi
Most likely never as
"<strike> has been deprecated in HTML 4 and XHTML 1, and obsoleted in HTML5. If semantically appropriate, i.e., if it represents deleted content, use the <del> instead; in all other cases use an <s> element." -
@raven-worx Thank you very much.
-
@sersver00 said in When QTextEdit will understand tag <strike>?:
I paste the text to QTextEdit and see ordinar text
But does pasting bold text and other stuff works?
Maybe it strips all HTML ?
(Dont have a QTextEdit to test with right now :) -
@sersver00
Here's a little workaround:void MyTextEdit::insertFromMimeData(const QMimeData *mimeData) { QMimeData mimeDataCopy; // duplicate mimeData foreach( QString format, mimeData.formats() ) { QByteArray data = mimeData->data(format); if( format.startsWith( QLatin1String("text/html"), Qt::CaseInsensitive ) { data.replace(QByteArray("<strike>"), QByteArray("<s>")); data.replace(QByteArray("</strike>"), QByteArray("</s>")); } mimeDataCopy.setData( format, data ); } QTextEdit::insertFromMimeData( &mimeDataCopy ); }
-
@raven-worx Thank you. Your idea works.
The question is solved