new LinwitDocEditor({
element: "#aiEditor",
placeholder: "Click to Input Content...",
theme: "light",
content: 'LinwitDocEditor is an Open Source Rich Text Editor Designed for AI. ',
contentIsMarkdown: false,
contentRetention: true,
contentRetentionKey: 'ai-editor-content',
draggable: true,
pasteAsText: false,
textCounter: (text: string) => number,
ai: {
models: {
spark: {
appId: "***",
apiKey: "***",
apiSecret: "***",
}
}
}
})
#editor or .editor, or a DOM node object.true.false by default.ai-editor-content .true, the pasted web page content automatically clears the color, link, font, font size, bold, strikethrough and other styles.Note: Starting from v1.2.0, if the initialized content is
markdowncontent, you need to add thecontentIsMarkdown:trueconfiguration at the same time.