本文整理匯總了TypeScript中wed/caret-manager.CaretManager.move方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript CaretManager.move方法的具體用法?TypeScript CaretManager.move怎麽用?TypeScript CaretManager.move使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wed/caret-manager.CaretManager
的用法示例。
在下文中一共展示了CaretManager.move方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("moves into empty attributes", () => {
// Start label of last paragraph...
const initial = ps[9];
const firstGUIEl = firstGUI(initial)!;
const offset = indexOf(initial.childNodes, firstGUIEl);
caretManager.setCaret(initial, offset);
caretCheck(editor, initial, offset, "initial");
caretManager.move("right");
// It is w located inside the text inside the label which marks the start
// of the TEI element.
caretCheck(editor, getElementNameFor(initial)!, 0, "moved once");
caretManager.move("right");
caretCheck(editor, getAttributeValuesFor(initial)[0].firstChild!, 0,
"moved twice");
});