当前位置: 首页>>代码示例>>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;未经允许,请勿转载。