當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。