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


TypeScript Plugin.default函数代码示例

本文整理汇总了TypeScript中tinymce/plugins/lists/Plugin.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: function

UnitTest.asynctest('browser.tinymce.plugins.lists.ApplyListOnParagraphWithStylesTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  ModernTheme();
  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyUi = TinyUi(editor);

    Pipeline.async({}, [
      Logger.t('remove margin from p when applying list on it, but leave other styles', GeneralSteps.sequence([
        tinyApis.sSetContent('<p style="color: blue;margin: 30px;margin-right: 30px;margin-bottom: 30px;margin-left: 30px;margin-top: 30px;">test</p>'),
        tinyApis.sSetCursor([0, 0], 0),
        tinyUi.sClickOnToolbar('click bullist button', 'div[aria-label="Bullet list"] button'),
        tinyApis.sAssertContent('<ul><li style="color: blue;">test</li></ul>')
      ])),
      Logger.t('remove padding from p when applying list on it, but leave other styles', GeneralSteps.sequence([
        tinyApis.sSetContent('<p style="color: red;padding: 30px;padding-right: 30px;padding-bottom: 30px;padding-left: 30px;padding-top: 30px;">test</p>'),
        tinyApis.sSetCursor([0, 0], 0),
        tinyUi.sClickOnToolbar('click bullist button', 'div[aria-label="Bullet list"] button'),
        tinyApis.sAssertContent('<ul><li style="color: red;">test</li></ul>')
      ]))
    ], onSuccess, onFailure);
  }, {
    indent: false,
    plugins: 'lists',
    toolbar: 'numlist bullist',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:abstask,项目名称:tinymce,代码行数:32,代码来源:ApplyListOnParagraphWithStylesTest.ts

示例2: Theme

UnitTest.asynctest('browser.tinymce.plugins.lists.ApplyListOnParagraphWithStylesTest', (success, failure) => {

  Theme();
  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyUi = TinyUi(editor);

    Pipeline.async({}, [
      Log.stepsAsStep('TBA', 'Lists: remove margin from p when applying list on it, but leave other styles', [
        tinyApis.sSetContent('<p style="color: blue;margin: 30px;margin-right: 30px;margin-bottom: 30px;margin-left: 30px;margin-top: 30px;">test</p>'),
        tinyApis.sSetCursor([0, 0], 0),
        tinyUi.sClickOnToolbar('click bullist button', 'button[aria-label="Bullet list"]'),
        tinyApis.sAssertContent('<ul><li style="color: blue;">test</li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: remove padding from p when applying list on it, but leave other styles', [
        tinyApis.sSetContent('<p style="color: red;padding: 30px;padding-right: 30px;padding-bottom: 30px;padding-left: 30px;padding-top: 30px;">test</p>'),
        tinyApis.sSetCursor([0, 0], 0),
        tinyUi.sClickOnToolbar('click bullist button', 'button[aria-label="Bullet list"]'),
        tinyApis.sAssertContent('<ul><li style="color: red;">test</li></ul>')
      ])
    ], onSuccess, onFailure);
  }, {
    indent: false,
    plugins: 'lists',
    toolbar: 'numlist bullist',
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce'
  }, success, failure);
});
开发者ID:tinymce,项目名称:tinymce,代码行数:31,代码来源:ApplyListOnParagraphWithStylesTest.ts

示例3: function

UnitTest.asynctest('browser.tinymce.plugins.lists.TableInListTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  ModernTheme();
  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyUi = TinyUi(editor);

    Pipeline.async({}, [
      Logger.t('unlist table in list then add list inside table', GeneralSteps.sequence([
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td>a</td><td>b</td></tr></tbody></table></li></ul>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 0, 0], 0),
        tinyUi.sClickOnToolbar('click list button', 'div[aria-label="Bullet list"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li>a</li></ul></td><td>b</td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click list button', 'div[aria-label="Bullet list"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><p>a</p></td><td>b</td></tr></tbody></table></li></ul>')
      ])),
      Logger.t('delete list in table test', GeneralSteps.sequence([
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 0, 0], 1),
        Step.sync(function () {
          editor.plugins.lists.backspaceDelete();
          editor.plugins.lists.backspaceDelete();
        }),
        tinyApis.sAssertSelection([0, 0, 0, 0, 0, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0], 0),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><p>&nbsp;</p></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ])),
      Logger.t('focus on table cell in list does not activate button', GeneralSteps.sequence([
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td>a</td><td>b</td></tr></tbody></table></li></ul>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 0, 0], 0),
        UiFinder.sNotExists(TinyDom.fromDom(editor.getContainer()), 'div[aria-label="Bullet list"][aria-pressed="true"]')
      ])),
      Logger.t('indent and outdent li in ul in list in table in list', GeneralSteps.sequence([
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 1),
        tinyUi.sClickOnToolbar('click increase indent', 'div[aria-label="Increase indent"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p><ul><li><p>b</p></li></ul></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click decrease indent', 'div[aria-label="Decrease indent"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click decrease indent', 'div[aria-label="Decrease indent"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li></ul><p>b</p></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ])),
      Logger.t('toggle from UL to OL in list in table in list only changes inner list', GeneralSteps.sequence([
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 1),
        tinyUi.sClickOnToolbar('click numlist button', 'div[aria-label="Numbered list"] button'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ol><li><p>a</p></li><li><p>b</p></li></ol></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ]))
    ], onSuccess, onFailure);
  }, {
    plugins: 'lists',
    toolbar: 'bullist numlist indent outdent',
    indent: false,
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:59,代码来源:TableInListTest.ts

示例4: ListsPlugin

UnitTest.asynctest('browser.tinymce.plugins.lists.TableInListTest', (success, failure) => {

  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyUi = TinyUi(editor);

    Pipeline.async({}, [
      Log.stepsAsStep('TBA', 'Lists: unlist table in list then add list inside table', [
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td>a</td><td>b</td></tr></tbody></table></li></ul>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 0, 0], 0),
        tinyUi.sClickOnToolbar('click list button', 'button[aria-label="Bullet list"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li>a</li></ul></td><td>b</td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click list button', 'button[aria-label="Bullet list"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><p>a</p></td><td>b</td></tr></tbody></table></li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: delete list in table test', [
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 0, 0], 1),
        Step.sync(function () {
          editor.plugins.lists.backspaceDelete();
          editor.plugins.lists.backspaceDelete();
        }),
        tinyApis.sAssertSelection([0, 0, 0, 0, 0, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0], 0),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><p>&nbsp;</p></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: focus on table cell in list does not activate button', [
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td>a</td><td>b</td></tr></tbody></table></li></ul>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 0, 0], 0),
        UiFinder.sNotExists(TinyDom.fromDom(editor.getContainer()), 'div[aria-label="Bullet list"][aria-pressed="true"]')
      ]),
      Log.stepsAsStep('TBA', 'Lists: indent and outdent li in ul in list in table in list', [
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 1),
        tinyUi.sClickOnToolbar('click increase indent', 'button[aria-label="Increase indent"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p><ul><li><p>b</p></li></ul></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click decrease indent', 'button[aria-label="Decrease indent"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyUi.sClickOnToolbar('click decrease indent', 'button[aria-label="Decrease indent"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li></ul><p>b</p></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: toggle from UL to OL in list in table in list only changes inner list', [
        tinyApis.sSetContent('<ul><li><table><tbody><tr><td><ul><li><p>a</p></li><li><p>b</p></li></ul></td><td><p>b</p></td></tr></tbody></table></li></ul>'),
        tinyApis.sSetSelection([0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 0, [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], 1),
        tinyUi.sClickOnToolbar('click numlist button', 'button[aria-label="Numbered list"]'),
        tinyApis.sAssertContent('<ul><li><table><tbody><tr><td><ol><li><p>a</p></li><li><p>b</p></li></ol></td><td><p>b</p></td></tr></tbody></table></li></ul>')
      ])
    ], onSuccess, onFailure);
  }, {
    plugins: 'lists',
    toolbar: 'bullist numlist indent outdent',
    indent: false,
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce'
  }, success, failure);
});
开发者ID:tinymce,项目名称:tinymce,代码行数:57,代码来源:TableInListTest.ts

示例5: function

UnitTest.asynctest('Browser Test: .RemoveTrailingBlockquoteTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  ModernTheme();
  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyActions = TinyActions(editor);

    Pipeline.async({}, [
      Logger.t('backspace from p inside div into li', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><div><p><br /></p></div>'),
        tinyApis.sSetCursor([1, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ])),
      Logger.t('backspace from p inside blockquote into li', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><br /></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ])),
      Logger.t('backspace from b inside p inside blockquote into li', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><b><br /></b></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ])),
      Logger.t('backspace from span inside p inside blockquote into li', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><span class="x"><br /></span></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ])),
      Logger.t('backspace from p into li', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><p><br /></p>'),
        tinyApis.sSetCursor([1, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ]))
    ], onSuccess, onFailure);
  }, {
    indent: false,
    plugins: 'lists',
    toolbar: '',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:55,代码来源:BackspaceDeleteFromBlockIntoLiTest.ts

示例6: ListsPlugin

UnitTest.asynctest('Browser Test: .RemoveTrailingBlockquoteTest', (success, failure) => {

  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyActions = TinyActions(editor);

    Pipeline.async({}, [
      Log.stepsAsStep('TBA', 'Lists: backspace from p inside div into li', [
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><div><p><br /></p></div>'),
        tinyApis.sSetCursor([1, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: backspace from p inside blockquote into li', [
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><br /></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: backspace from b inside p inside blockquote into li', [
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><b><br /></b></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: backspace from span inside p inside blockquote into li', [
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><blockquote><p><span class="x"><br /></span></p></blockquote>'),
        tinyApis.sSetCursor([1, 0, 0, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ]),
      Log.stepsAsStep('TBA', 'Lists: backspace from p into li', [
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li></ul><p><br /></p>'),
        tinyApis.sSetCursor([1, 0], 0),
        tinyActions.sContentKeystroke(Keys.backspace(), { }),
        tinyApis.sAssertContent('<ul><li>a</li></ul>')
      ])
    ], onSuccess, onFailure);
  }, {
    indent: false,
    plugins: 'lists',
    toolbar: '',
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce'
  }, success, failure);
});
开发者ID:tinymce,项目名称:tinymce,代码行数:53,代码来源:BackspaceDeleteFromBlockIntoLiTest.ts

示例7: function

UnitTest.asynctest('tinymce.plugins.table.IndentListsInTableTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  ModernTheme();
  TablePlugin();
  ListsPlugin();

  const sAssertTableInnerHTML = function (editor, expected) {
    return Step.sync(function () {
      const actual = editor.getBody().firstChild.innerHTML;
      RawAssertions.assertEq('Does not have correct html', expected, actual);
    });
  };

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyActions = TinyActions(editor);

    Pipeline.async({}, [
      tinyApis.sFocus,

      Logger.t('ul > li in table', GeneralSteps.sequence([
        tinyApis.sSetContent('<table><tbody><tr><td><ul><li>a</li><li>b</li></ul></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><ul><li>a<ul><li>b</li></ul></li></ul></td></tr></tbody>')
      ])),

      Logger.t('ol > li in table', GeneralSteps.sequence([
        tinyApis.sSetContent('<table><tbody><tr><td><ol><li>a</li><li>b</li></ol></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><ol><li>a<ol><li>b</li></ol></li></ol></td></tr></tbody>')
      ])),

      Logger.t('dl > dt in table', GeneralSteps.sequence([
        tinyApis.sSetContent('<table><tbody><tr><td><dl><dt>a</dt><dt>b</dt></dl></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><dl><dt>a</dt><dd>b</dd></dl></td></tr></tbody>')
      ]))

    ], onSuccess, onFailure);
  }, {
    plugins: 'lists table',
    toolbar: 'table numlist',
    indent: false,
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:abstask,项目名称:tinymce,代码行数:51,代码来源:IndentListsInTableTest.ts

示例8: SilverTheme

UnitTest.asynctest('tinymce.plugins.table.IndentListsInTableTest', (success, failure) => {
  SilverTheme();
  TablePlugin();
  ListsPlugin();

  const sAssertTableInnerHTML = function (editor, expected) {
    return Logger.t('Assert table InnerHTML ' + expected, Step.sync(function () {
      const actual = editor.getBody().firstChild.innerHTML;
      RawAssertions.assertEq('Does not have correct html', expected, actual);
    }));
  };

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyActions = TinyActions(editor);

    Pipeline.async({}, [
      tinyApis.sFocus,

      Log.stepsAsStep('TBA', 'Table: ul > li in table', [
        tinyApis.sSetContent('<table><tbody><tr><td><ul><li>a</li><li>b</li></ul></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><ul><li>a<ul><li>b</li></ul></li></ul></td></tr></tbody>')
      ]),

      Log.stepsAsStep('TBA', 'Table: ol > li in table', [
        tinyApis.sSetContent('<table><tbody><tr><td><ol><li>a</li><li>b</li></ol></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><ol><li>a<ol><li>b</li></ol></li></ol></td></tr></tbody>')
      ]),

      Log.stepsAsStep('TBA', 'Table: dl > dt in table', [
        tinyApis.sSetContent('<table><tbody><tr><td><dl><dt>a</dt><dt>b</dt></dl></td></tr></tbody></table>'),
        tinyApis.sSetCursor([0, 0, 0, 0, 0, 1], 1),
        tinyActions.sContentKeystroke(Keys.tab(), {}),
        sAssertTableInnerHTML(editor, '<tbody><tr><td><dl><dt>a</dt><dd>b</dd></dl></td></tr></tbody>')
      ])

    ], onSuccess, onFailure);
  }, {
    plugins: 'lists table',
    toolbar: 'table numlist',
    indent: false,
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce',
  }, success, failure);
});
开发者ID:tinymce,项目名称:tinymce,代码行数:49,代码来源:IndentListsInTableTest.ts

示例9: function

UnitTest.asynctest('tinymce.lists.browser.IndentTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];
  const suite = LegacyUnit.createSuite();

  Plugin();
  Theme();

  suite.test('Remove UL in inline body element contained in LI', function (editor) {
    editor.setContent('<ul><li>a</li></ul>');
    editor.selection.setCursorLocation();
    editor.execCommand('InsertUnorderedList');
    LegacyUnit.equal(editor.getContent(), '<p>a</p>');
  });

  suite.test('Backspace in LI in UL in inline body element contained within LI', function (editor) {
    editor.setContent('<ul><li>a</li></ul>');
    editor.focus();
    editor.selection.select(editor.getBody(), true);
    editor.selection.collapse(true);
    editor.plugins.lists.backspaceDelete();
    LegacyUnit.equal(editor.getContent(), '<p>a</p>');
  });

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    Pipeline.async({}, suite.toSteps(editor), onSuccess, onFailure);
  }, {
    inline: true,
    plugins: 'lists',
    add_unload_trigger: false,
    disable_nodechange: true,
    indent: false,
    entities: 'raw',
    valid_elements:
      'li[style|class|data-custom],ol[style|class|data-custom],' +
      'ul[style|class|data-custom],dl,dt,dd,em,strong,span,#p,div,br',
    valid_styles: {
      '*': 'color,font-size,font-family,background-color,font-weight,' +
        'font-style,text-decoration,float,margin,margin-top,margin-right,' +
        'margin-bottom,margin-left,display,position,top,left,list-style-type'
    },
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:44,代码来源:InlineTest.ts

示例10: ModernTheme

UnitTest.asynctest('tinymce.lists.browser.ToggleListWithEmptyLiTest', (success, failure) => {
  ModernTheme();
  ListsPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const tinyApis = TinyApis(editor);
    const tinyUi = TinyUi(editor);

    Pipeline.async({}, [
      Logger.t('toggle bullet list on list with two empty LIs', GeneralSteps.sequence([
        tinyApis.sFocus,
        tinyApis.sSetContent('<ul><li>a</li><li>&nbsp;</li><li>&nbsp;</li><li>b</li></ul>'),
        tinyApis.sSetSelection([0, 0, 0], 0, [0, 3, 0], 1),
        tinyUi.sClickOnToolbar('click list', 'div[aria-label="Bullet list"] > button'),
        tinyApis.sAssertContent('<p>a</p><p>&nbsp;</p><p>&nbsp;</p><p>b</p>')
      ])),
    ], onSuccess, onFailure);
  }, {
    indent: false,
    plugins: 'lists',
    toolbar: '',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});
开发者ID:danielpunkass,项目名称:tinymce,代码行数:24,代码来源:ToggleListWithEmptyLiTest.ts


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