当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript NamedChain.read方法代码示例

本文整理汇总了TypeScript中@ephox/agar.NamedChain.read方法的典型用法代码示例。如果您正苦于以下问题:TypeScript NamedChain.read方法的具体用法?TypeScript NamedChain.read怎么用?TypeScript NamedChain.read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@ephox/agar.NamedChain的用法示例。


在下文中一共展示了NamedChain.read方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: cInsertTable

 const cUnmergeCellsMeasureTableWidth = (label, data) => {
   return Log.chain('TBA', 'Merge and unmerge cells, measure table widths', NamedChain.asChain(
      [
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       Chain.label('Insert table', NamedChain.direct('editor', cInsertTable(label, data.html), 'element')),
       Chain.label('Drag SE (-100, 0)', NamedChain.read('editor', TableTestUtils.cDragHandle('se', -100, 0))),
       Chain.label('Store width before merge', NamedChain.write('widthBefore', TableTestUtils.cGetWidth)),
       Chain.label('Merge table cells', NamedChain.read('editor', TableTestUtils.cMergeCells(data.select))),
       Chain.label('Split table cells', NamedChain.read('editor', TableTestUtils.cSplitCells)),
       Chain.label('Store width after merge/unmerge', NamedChain.write('widthAfter', TableTestUtils.cGetWidth)),
       NamedChain.merge(['widthBefore', 'widthAfter'], 'widths'),
       NamedChain.output('widths')
     ]
   ));
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:15,代码来源:UnmergeCellTableResizeTest.ts

示例2: cInsertTable

 const cInsertColumnMeasureWidth = (label, data) => {
   return Log.chain('TBA', 'Insert column before, insert column after, erase column and measure table widths', NamedChain.asChain(
     [
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       Chain.label('Insert table', NamedChain.direct('editor', cInsertTable(label, data.html), 'element')),
       Chain.label('Drag SE (-100, 0)', NamedChain.read('editor', TableTestUtils.cDragHandle('se', -100, 0))),
       Chain.label('Store width before split', NamedChain.write('widthBefore', TableTestUtils.cGetWidth)),
       Chain.label('Insert column before', NamedChain.read('editor', TableTestUtils.cInsertColumnBefore)),
       Chain.label('Insert column after', NamedChain.read('editor', TableTestUtils.cInsertColumnAfter)),
       Chain.label('Delete column', NamedChain.read('editor', TableTestUtils.cDeleteColumn)),
       Chain.label('Store width after split', NamedChain.write('widthAfter', TableTestUtils.cGetWidth)),
       NamedChain.merge(['widthBefore', 'widthAfter'], 'widths'),
       NamedChain.output('widths')
     ]
   ));
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:16,代码来源:InsertColumnTableResizeTest.ts

示例3: function

 const cDragHandle = function (id, deltaH, deltaV) {
   return NamedChain.asChain([
     NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
     NamedChain.direct('editor', cGetBody, 'editorBody'),
     NamedChain.read('editorBody', Chain.control(
       UiFinder.cFindIn('#mceResizeHandle' + id),
       Guard.tryUntil('wait for resize handlers', 100, 40000)
     )),
     NamedChain.read('editorBody', Chain.fromChains([
       UiFinder.cFindIn('#mceResizeHandle' + id),
       Mouse.cMouseDown,
       Mouse.cMouseMoveTo(deltaH, deltaV),
       Mouse.cMouseUp
     ])),
     NamedChain.outputInput
   ]);
 };
开发者ID:danielpunkass,项目名称:tinymce,代码行数:17,代码来源:ResizeTableTest.ts

示例4:

const cSubmitDialog = () => Chain.control(
  NamedChain.asChain([
    NamedChain.writeValue('body', Body.body()),
    NamedChain.read('body', Mouse.cClickOn('.tox-button:contains("Save")')),
    NamedChain.outputInput
  ]),
  Guard.addLogging('Submit dialog')
);
开发者ID:tinymce,项目名称:tinymce,代码行数:8,代码来源:Helpers.ts

示例5: cInsertColumnMeasureWidth

 const cAssertWidth = (label, data) => {
   return Chain.label(
     `Assert width of table ${label} after inserting column`,
     NamedChain.asChain([
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       NamedChain.direct('editor', cInsertColumnMeasureWidth(label, data), 'widths'),
       NamedChain.read('widths', cAssertWidths)
     ])
   );
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:InsertColumnTableResizeTest.ts

示例6:

 const cAssertWhiteSpace = () => {
   return NamedChain.asChain([
     NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
     NamedChain.direct('editor', cOpenDialog, 'element'),
     NamedChain.direct('element', cGetWhiteSpace, 'whitespace'),
     NamedChain.read('whitespace', Chain.op((whitespace) => {
       Assertions.assertEq('Textarea should have "white-space: pre-wrap"', 'pre-wrap', whitespace);
     }))
   ]);
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:CodeTextareaTest.ts

示例7: cMergeResizeUnmergeMeasureWidth

 const cMergeResizeSplitAssertWidth = (label, data) => {
   return Chain.label(
     `Assert width of table ${label}`,
     NamedChain.asChain([
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       NamedChain.direct('editor', cMergeResizeUnmergeMeasureWidth(label, data), 'widths'),
       NamedChain.read('widths', cAssertWidths)
     ])
   );
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:10,代码来源:UnmergeCellTableResizeTest.ts

示例8: n

 const step = Step.raw((_, next, die, initLogs) => {
   NamedChain.pipeline([
     NamedChain.write('container', Chain.async((input, n, die) => {
       const container = Element.fromTag('div');
       Attr.set(container, 'id', 'test-container-div');
       Html.set(container, containerHtml);
       Insert.append(Body.body(), container);
       n(container);
     })),
     NamedChain.write('editor', cOnSelector('div.tinymce')),
     NamedChain.direct('container', Chain.fromChains([
       UiFinder.cFindIn('div.tinymce'),
       Mouse.cMouseOver,
       cNotExists(Body.body(), 'div[data-row="0"]')
     ]), '_'),
     NamedChain.read('editor', Editor.cRemove),
     NamedChain.read('container', Chain.op((div) => Remove.remove(div)))
   ], next, die, initLogs);
 });
开发者ID:tinymce,项目名称:tinymce,代码行数:19,代码来源:InlineEditorInsideTableTest.ts

示例9: cGetImageSources

 const sAssertImageFlip = (label) => {
   return Chain.asStep({editor}, [
     Chain.label(`Assert ${label}`,
     NamedChain.asChain([
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       NamedChain.direct('editor', cGetImageSources(label), 'urls'),
       NamedChain.read('urls', Chain.op((urls) => {
         Assertions.assertEq(`Image should be flipped: ${label}`, true, ( urls.srcBeforeFlip !== urls.srcAfterFlip ));
       }))
     ]))
   ]);
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:12,代码来源:ContextToolbarTest.ts

示例10: cClickContextToolbarButton

 const cGetImageSources = (label) => {
   return NamedChain.asChain(
     [
       NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
       Chain.label('Store img src before flip', NamedChain.write('srcBeforeFlip', cGetImageSrc)),
       Chain.label('Flip image', NamedChain.read('editor', cClickContextToolbarButton(label))),
       // Wait for image to flip
       Chain.wait(500),
       Chain.label('Store img src after flip', NamedChain.write('srcAfterFlip', cGetImageSrc)),
       NamedChain.merge(['srcBeforeFlip', 'srcAfterFlip'], 'urls'),
       NamedChain.output('urls')
     ]
   );
 };
开发者ID:tinymce,项目名称:tinymce,代码行数:14,代码来源:ContextToolbarTest.ts


注:本文中的@ephox/agar.NamedChain.read方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。