mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Live preview of post editing/replying thanks to TextFormatter 👏
This commit is contained in:
7
js/forum/src/utils/formatText.js
Normal file
7
js/forum/src/utils/formatText.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export default function formatText(text) {
|
||||
const elm = document.createElement('div');
|
||||
|
||||
s9e.TextFormatter.preview(text || '', elm);
|
||||
|
||||
return elm.innerHTML;
|
||||
}
|
Reference in New Issue
Block a user