本文整理汇总了TypeScript中parchment.create函数的典型用法代码示例。如果您正苦于以下问题:TypeScript create函数的具体用法?TypeScript create怎么用?TypeScript create使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it("tabs to the next tabbable element outside the editor if conditions were met", async () => {
// Inserting a couple of focusable items in the editor.
const blot = Parchment.create("embed-loading", stubEmbedData) as LoadingBlot;
const blot2 = Parchment.create("embed-loading", stubEmbedData) as LoadingBlot;
const button1 = document.getElementById("button1")!;
quill.scroll.insertBefore(blot);
quill.scroll.insertBefore(blot2);
blot.focus();
embedFocusModule.handleTab();
expect(document.activeElement === button1).eq(true);
});
示例2: beforeEach
beforeEach(async () => {
embed = Parchment.create("embed-loading", stubEmbedData) as LoadingBlot;
quill.scroll.insertBefore(embed);
embed.focus();
});