mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -36,6 +36,10 @@
|
||||
let element;
|
||||
let editor;
|
||||
|
||||
const options = {
|
||||
throwOnError: false
|
||||
};
|
||||
|
||||
// Function to find the next template in the document
|
||||
function findNextTemplate(doc, from = 0) {
|
||||
const patterns = [
|
||||
@@ -113,6 +117,7 @@
|
||||
};
|
||||
|
||||
onMount(() => {
|
||||
const content = marked.parse(value);
|
||||
editor = new Editor({
|
||||
element: element,
|
||||
extensions: [
|
||||
@@ -124,7 +129,7 @@
|
||||
Typography,
|
||||
Placeholder.configure({ placeholder })
|
||||
],
|
||||
content: marked.parse(value),
|
||||
content: content,
|
||||
autofocus: true,
|
||||
onTransaction: () => {
|
||||
// force re-render so `editor.isActive` works as expected
|
||||
|
||||
Reference in New Issue
Block a user