本文整理汇总了TypeScript中prosemirror-model.Fragment.toJSON方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Fragment.toJSON方法的具体用法?TypeScript Fragment.toJSON怎么用?TypeScript Fragment.toJSON使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类prosemirror-model.Fragment
的用法示例。
在下文中一共展示了Fragment.toJSON方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
const cm2: model.ContentMatch = cm1.matchType({} as any)!;
const cm3: model.ContentMatch = cm1.matchFragment({} as any)!;
const cm4: model.Fragment = cm1.fillBefore({} as any)!;
const cm5: model.NodeType[] = cm1.findWrapping({} as any)!;
const f1 = new model.Fragment();
f1.nodesBetween(0, 0, () => {});
f1.nodesBetween(0, 0, () => null);
f1.nodesBetween(0, 0, () => undefined);
f1.nodesBetween(0, 0, () => true);
f1.descendants(() => {});
f1.descendants(() => null);
f1.descendants(() => undefined);
f1.descendants(() => true);
const res2_1: model.Node = f1.maybeChild(0)!;
const res2_2: number = f1.findDiffStart(f1)!;
const res2_3: { a: number, b: number } = f1.findDiffEnd({} as any)!;
const res2_4: object = f1.toJSON()!;
const res3_1 = new model.ResolvedPos();
const res3_2: model.Mark[] = res3_1.marksAcross(res3_1)!;
const res3_3: model.NodeRange = res3_1.blockRange(res3_1)!;
const res4_1 = new model.NodeType();
const res4_2: model.Node = res4_1.createAndFill()!;
const res5_1 = new model.MarkType();
const res5_2: model.Mark = res5_1.isInSet([])!;