本文整理匯總了TypeScript中quill/core.update函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript update函數的具體用法?TypeScript update怎麽用?TypeScript update使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了update函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("does nothing if we don't have a previous list item to merge into", () => {
insertListBlot({ type: ListType.BULLETED, depth: 0 });
const listGroup = quill.scroll.children.head as ListGroup;
const listItem = listGroup.children.head as ListItemWrapper;
const contentBefore = quill.getContents().ops;
listItem.getListContent()!.indent();
quill.update();
expect(quill.getContents().ops).deep.equals(contentBefore);
});
示例2: insertNewLineAtStartOfScroll
export function insertNewLineAtStartOfScroll(quill: Quill) {
const newLineBlot = new BlockBlot(BlockBlot.create(""));
quill.scroll.insertBefore(newLineBlot, quill.scroll.children.head!);
quill.update(Quill.sources.USER);
quill.setSelection(0, 0);
}
示例3: insertNewLineAtEndOfScroll
export function insertNewLineAtEndOfScroll(quill: Quill) {
const newLineBlot = new BlockBlot(BlockBlot.create(""));
quill.scroll.appendChild(newLineBlot);
quill.update(Quill.sources.USER);
quill.setSelection(quill.scroll.length(), 0);
}