當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Fragment.nodesBetween方法代碼示例

本文整理匯總了TypeScript中prosemirror-model.Fragment.nodesBetween方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Fragment.nodesBetween方法的具體用法?TypeScript Fragment.nodesBetween怎麽用?TypeScript Fragment.nodesBetween使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在prosemirror-model.Fragment的用法示例。


在下文中一共展示了Fragment.nodesBetween方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

res1_1.nodesBetween(0, 1, () => true);
res1_1.descendants(() => {});
res1_1.descendants(() => null);
res1_1.descendants(() => undefined);
res1_1.descendants(() => true);
const res1_2: model.Node = res1_1.maybeChild(0)!;
const res1_3: model.Node = res1_1.nodeAt(0)!;

const cm1 = new model.ContentMatch();
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();
開發者ID:CNBoland,項目名稱:DefinitelyTyped,代碼行數:31,代碼來源:prosemirror-model-tests.ts


注:本文中的prosemirror-model.Fragment.nodesBetween方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。