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


TypeScript sugar.InsertAll類代碼示例

本文整理匯總了TypeScript中@ephox/sugar.InsertAll的典型用法代碼示例。如果您正苦於以下問題:TypeScript InsertAll類的具體用法?TypeScript InsertAll怎麽用?TypeScript InsertAll使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: 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;
};
開發者ID:abstask,項目名稱:tinymce,代碼行數:9,代碼來源:SimpleTableModel.ts

示例2: indentSelectedEntries

 Arr.each(entrySets, (entrySet) => {
   indentSelectedEntries(entrySet.entries, indentation);
   const composedLists = composeEntries(editor, entrySet.entries);
   Arr.each(composedLists, (composedList) => {
     fireListEvent(editor, indentation === Indentation.Indent ? ListAction.IndentList : ListAction.OutdentList, composedList.dom());
   });
   InsertAll.before(entrySet.sourceList, composedLists);
   Remove.remove(entrySet.sourceList);
 });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:9,代碼來源:ListsIndendation.ts

示例3:

const wrapWithSiblings = (dom: DOMUtils, node: Node, next: boolean, name: string, attrs?): Node => {
  const start = Element.fromDom(node);
  const wrapper = Element.fromDom(dom.create(name, attrs));
  const siblings = next ? Traverse.nextSiblings(start) : Traverse.prevSiblings(start);

  InsertAll.append(wrapper, siblings);
  if (next) {
    Insert.before(start, wrapper);
    Insert.prepend(wrapper, start);
  } else {
    Insert.after(start, wrapper);
    Insert.append(wrapper, start);
  }

  return wrapper.dom();
};
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:16,代碼來源:RemoveFormat.ts

示例4: function

 const update = function () {
   clear();
   const rectangles = Rectangles.getRectangles(win);
   const spans = Arr.map(rectangles, make);
   InsertAll.append(container, spans);
 };
開發者ID:abstask,項目名稱:tinymce,代碼行數:6,代碼來源:FakeSelection.ts

示例5: indentSelectedEntries

 Arr.each(entrySets, (entrySet) => {
   indentSelectedEntries(entrySet.entries, indentation);
   InsertAll.before(entrySet.sourceList, composeEntries(editor, entrySet.entries));
   Remove.remove(entrySet.sourceList);
 });
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:5,代碼來源:ListsIndendation.ts

示例6:

const createItem = (scope: Document, attr: Record<string, any>, content: Element[]): Element => {
  const item = Element.fromTag('li', scope);
  Attr.setAll(item, attr);
  InsertAll.append(item, content);
  return item;
};
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:6,代碼來源:ComposeList.ts


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