Improve text replace in Scribe

- Delete selection content before inserting
- Insert correct HTML
This commit is contained in:
Théo Poizat
2025-12-18 16:46:29 +01:00
committed by Dat H. Pham
parent 1a79445711
commit c78f6b8a76
2 changed files with 13 additions and 2 deletions
+6
View File
@@ -214,4 +214,10 @@ class StringConvert {
return textContent.trim();
}
static String convertTextContentToHtmlContent(String textContent) {
final htmlContent = textContent.replaceAll('\n', '<br>');
return '<div>$htmlContent</div>';
}
}