本文整理汇总了TypeScript中@ephox/sugar.Replication类的典型用法代码示例。如果您正苦于以下问题:TypeScript Replication类的具体用法?TypeScript Replication怎么用?TypeScript Replication使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Replication类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: if
const outdentDlItem = (editor: Editor, item: Element): void => {
if (Compare.is(item, 'DD')) {
Replication.mutate(item, 'DT');
} else if (Compare.is(item, 'DT')) {
Traverse.parent(item).each((dl) => SplitList.splitList(editor, dl.dom(), item.dom()));
}
};
示例2: function
const createDomTable = function (table, rows) {
const tableElement = Replication.shallow(table.element());
const tableBody = Element.fromTag('tbody');
InsertAll.append(tableBody, rows);
Insert.append(tableElement, tableBody);
return tableElement;
};
示例3: function
return Step.sync(function () {
const element = Replication.deep(Element.fromDom(editor.getBody()));
// Remove internal selection dom items
Arr.each(SelectorFilter.descendants(element, '*[data-mce-bogus="all"]'), Remove.remove);
Arr.each(SelectorFilter.descendants(element, '*'), function (elm) {
Attr.remove(elm, 'data-mce-selected');
});
Assertions.assertHtml('Should be expected contents', expectedContent, Html.get(element));
});
示例4:
const clonedRows = Arr.map(rows, (row) => {
return Replication.deep(row);
});
示例5:
const indentDlItem = (item: Element): void => {
if (Compare.is(item, 'DT')) {
Replication.mutate(item, 'DD');
}
};
示例6:
return wrapper.get().getOrThunk(() => {
const nu = Replication.shallow(master);
newWrappers.push(nu);
wrapper.set(Option.some(nu));
return nu;
});