Don't destroy formatting when editing previous messages
Adds a few new methods to grab the markdown/slightly rich text from the message, and will intelligently re-insert user mentions as needed.
This commit is contained in:
@@ -170,8 +170,11 @@ QQC2.TextArea {
|
||||
onChatBarCacheChanged: documentHandler.chatBarCache = chatBarCache
|
||||
|
||||
function updateEditText() {
|
||||
// This could possibly be undefined due to some esoteric QtQuick issue. Referencing it somewhere in JS is enough.
|
||||
documentHandler.textDocument;
|
||||
if (chatBarCache?.isEditing && chatBarCache.relationMessage.length > 0) {
|
||||
root.text = chatBarCache.relationMessage;
|
||||
chatBarCache.updateMentions(root.textDocument, documentHandler);
|
||||
root.forceActiveFocus();
|
||||
root.cursorPosition = root.length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user