Start implementing rich-text editor

This commit is contained in:
Tobias Fella
2024-04-24 01:17:14 +02:00
committed by James Graham
parent 1f723d1fdf
commit 9cbe9f7280
17 changed files with 1683 additions and 182 deletions

View File

@@ -52,8 +52,8 @@ void TextHandler::setData(const QString &string)
QString TextHandler::handleSendText()
{
m_pos = 0;
m_dataBuffer = markdownToHTML(m_data);
m_dataBuffer = customMarkdownToHtml(m_dataBuffer);
m_dataBuffer = customMarkdownToHtml(m_data);
m_dataBuffer = markdownToHTML(m_dataBuffer);
m_nextTokenType = nextTokenType(m_dataBuffer, m_pos, m_nextToken, m_nextTokenType);
@@ -802,6 +802,9 @@ QString TextHandler::customMarkdownToHtml(const QString &stringIn)
// strikethrough
processSyntax(u"~~"_s, u"<del>"_s, u"</del>"_s);
// underline
processSyntax(u"_"_s, u"<u>"_s, u"</u>"_s);
return buffer;
}