Improve text replace in Scribe
- Delete selection content before inserting - Insert correct HTML
This commit is contained in:
@@ -214,4 +214,10 @@ class StringConvert {
|
||||
|
||||
return textContent.trim();
|
||||
}
|
||||
|
||||
static String convertTextContentToHtmlContent(String textContent) {
|
||||
final htmlContent = textContent.replaceAll('\n', '<br>');
|
||||
|
||||
return '<div>$htmlContent</div>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user