mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 10:46:09 +01:00
🎨 AI
This commit is contained in:
parent
3a5310375d
commit
68679fa90a
1 changed files with 2 additions and 1 deletions
|
|
@ -4,9 +4,10 @@ import {focusByRange, setLastNodeRange} from "../protyle/util/selection";
|
|||
import {insertHTML} from "../protyle/util/insertHTML";
|
||||
import {Dialog} from "../dialog";
|
||||
import {isMobile} from "../util/functions";
|
||||
import {getContenteditableElement} from "../protyle/wysiwyg/getBlock";
|
||||
|
||||
export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => {
|
||||
setLastNodeRange(elements[elements.length - 1], protyle.toolbar.range);
|
||||
setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range);
|
||||
protyle.toolbar.range.collapse(true);
|
||||
insertHTML(data, protyle, true, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue