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


TypeScript snooker.TableFill類代碼示例

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


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

示例1: getTableFromCell

 getTableFromCell(cell).each((table) => {
   const doc = Element.fromDom(editor.getDoc());
   const generators = TableFill.paste(doc);
   const targets = TableTargets.pasteRows(selections, table, cell, clonedRows, generators);
   execute(table, targets).each((rng) => {
     editor.selection.setRng(rng);
     editor.focus();
     cellSelection.clear(table);
   });
 });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:10,代碼來源:Commands.ts

示例2: function

        TableLookup.table(cell).each((table) => {

          const elements = Arr.filter(Elements.fromHtml(e.content), function (content) {
            return Node.name(content) !== 'meta';
          });

          if (elements.length === 1 && Node.name(elements[0]) === 'table') {
            e.preventDefault();

            const doc = Element.fromDom(editor.getDoc());
            const generators = TableFill.paste(doc);
            const targets = TableTargets.paste(cell, elements[0], generators);
            actions.pasteCells(table, targets).each(function (rng) {
              editor.selection.setRng(rng);
              editor.focus();
              cellSelection.clear(table);
            });
          }
        });
開發者ID:tinymce,項目名稱:tinymce,代碼行數:19,代碼來源:Clipboard.ts

示例3: function

 return function (table, target) {
   Util.removeDataStyle(table);
   const wire = lazyWire();
   const doc = Element.fromDom(editor.getDoc());
   const direction = TableDirection(Direction.directionAt);
   const generators = TableFill.cellOperations(mutate, doc, cloneFormats);
   return guard(table) ? operation(wire, table, target, generators, direction).bind(function (result) {
     Arr.each(result.newRows(), function (row) {
       fireNewRow(editor, row.dom());
     });
     Arr.each(result.newCells(), function (cell) {
       fireNewCell(editor, cell.dom());
     });
     return result.cursor().map(function (cell) {
       const rng = editor.dom.createRng();
       rng.setStart(cell.dom(), 0);
       rng.setEnd(cell.dom(), 0);
       return rng;
     });
   }) : Option.none();
 };
開發者ID:danielpunkass,項目名稱:tinymce,代碼行數:21,代碼來源:TableActions.ts

示例4: function

 return function (table, target) {
   const dataStyleCells = SelectorFilter.descendants(table, 'td[data-mce-style],th[data-mce-style]');
   Arr.each(dataStyleCells, function (cell) {
     Attr.remove(cell, 'data-mce-style');
   });
   const wire = lazyWire();
   const doc = Element.fromDom(editor.getDoc());
   const direction = TableDirection(Direction.directionAt);
   const generators = TableFill.cellOperations(mutate, doc, cloneFormats);
   return guard(table) ? operation(wire, table, target, generators, direction).bind(function (result) {
     Arr.each(result.newRows(), function (row) {
       fireNewRow(row);
     });
     Arr.each(result.newCells(), function (cell) {
       fireNewCell(cell);
     });
     return result.cursor().map(function (cell) {
       const rng = editor.dom.createRng();
       rng.setStart(cell.dom(), 0);
       rng.setEnd(cell.dom(), 0);
       return rng;
     });
   }) : Option.none();
 };
開發者ID:aha-app,項目名稱:tinymce-word-paste-filter,代碼行數:24,代碼來源:TableActions.ts


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