本文整理汇总了TypeScript中@ephox/sugar.Replication.mutate方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Replication.mutate方法的具体用法?TypeScript Replication.mutate怎么用?TypeScript Replication.mutate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/sugar.Replication
的用法示例。
在下文中一共展示了Replication.mutate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:
const indentDlItem = (item: Element): void => {
if (Compare.is(item, 'DT')) {
Replication.mutate(item, 'DD');
}
};
示例3:
const normalizeSegment = (segment: Segment, entry: Entry): void => {
if (Node.name(segment.list) !== entry.listType) {
segment.list = Replication.mutate(segment.list, entry.listType);
}
Attr.setAll(segment.list, entry.listAttributes);
};
示例4:
const normalizeSection = (section: Section, entry: Entry): void => {
if (Node.name(section.list).toUpperCase() !== entry.listType) {
section.list = Replication.mutate(section.list, entry.listType);
}
Attr.setAll(section.list, entry.listAttributes);
};