TypeScript tinymce-plugins-fullscreen-Plugin.default类(方法)实例源码

TypeScript
阅读 73 收藏 0 点赞 0 评论 0

项目: 作者:
作者:howardjin    项目:tinymc   
export default function () {
  AdvListPlugin();
  AnchorPlugin();
  AutoLinkPlugin();
  AutoResizePlugin();
  AutoSavePlugin();
  BbCodePlugin();
  CharMapPlugin();
  CodePlugin();
  CodeSamplePlugin();
  ColorPickerPlugin();
  ContextMenuPlugin();
  DirectionalityPlugin();
  EmoticonsPlugin();
  FullPagePlugin();
  FullScreenPlugin();
  HrPlugin();
  ImagePlugin();
  ImageToolsPlugin();
  ImportCssPlugin();
  InsertDatetimePlugin();
  LegacyOutputPlugin();
  LinkPlugin();
  ListsPlugin();
  MediaPlugin();
  NonBreakingPlugin();
  NonEditablePlugin();
  PageBreakPlugin();
  PastePlugin();
  PreviewPlugin();
  PrintPlugin();
  SavePlugin();
  SearchReplacePlugin();
  SpellCheckerPlugin();
  TabFocusPlugin();
  TablePlugin();
  TemplatePlugin();
  TextColorPlugin();
  TextPatternPlugin();
  TocPlugin();
  VisualBlocksPlugin();
  VisualCharsPlugin();
  WordCountPlugin();
  ModernTheme();
  MobileTheme();
  HelpPlugin();

  PluginManager.urls.emoticons = '../../../../js/tinymce/plugins/emoticons';

  const settings = {
    skin_url: '../../../../js/tinymce/skins/lightgray',
    codesample_content_css: '../../../../js/tinymce/plugins/codesample/css/prism.css',
    visualblocks_content_css: '../../../../js/tinymce/plugins/visualblocks/css/visualblocks.css',
    images_upload_url: 'd',
    selector: 'textarea',
    // rtl_ui: true,
    link_list: [
      { title: 'My page 1', value: 'http://www.tinymce.com' },
      { title: 'My page 2', value: 'http://www.moxiecode.com' }
    ],
    image_list: [
      { title: 'My page 1', value: 'http://www.tinymce.com' },
      { title: 'My page 2', value: 'http://www.moxiecode.com' }
    ],
    image_class_list: [
      { title: 'None', value: '' },
      { title: 'Some class', value: 'class-name' }
    ],
    importcss_append: true,
    height: 400,
    file_picker_callback (callback, value, meta) {
      // Provide file and text for the link dialog
      if (meta.filetype === 'file') {
        callback('https://www.google.com/logos/google.jpg', { text: 'My text' });
      }

      // Provide image and alt text for the image dialog
      if (meta.filetype === 'image') {
        callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' });
      }

      // Provide alternative source and posted for the media dialog
      if (meta.filetype === 'media') {
        callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' });
      }
    },
    spellchecker_callback (method, text, success, failure) {
      const words = text.match(this.getWordCharPattern());

      if (method === 'spellcheck') {
        const suggestions = {};

        for (let i = 0; i < words.length; i++) {
          suggestions[words[i]] = ['First', 'Second'];
        }

        success(suggestions);
      }

      if (method === 'addToDictionary') {
//.........这里部分代码省略.........

作者:howardjin    项目:tinymc   
export default function () {
  AdvListPlugin();
  AnchorPlugin();
  AutoLinkPlugin();
  AutoResizePlugin();
  AutoSavePlugin();
  BbCodePlugin();
  CharMapPlugin();
  CodePlugin();
  CodeSamplePlugin();
  ColorPickerPlugin();
  ContextMenuPlugin();
  DirectionalityPlugin();
  EmoticonsPlugin();
  FullPagePlugin();
  FullScreenPlugin();
  HrPlugin();
  ImagePlugin();
  ImageToolsPlugin();
  ImportCssPlugin();
  InsertDatetimePlugin();
  LegacyOutputPlugin();
  LinkPlugin();
  ListsPlugin();
  MediaPlugin();
  NonBreakingPlugin();
  NonEditablePlugin();
  PageBreakPlugin();
  PastePlugin();
  PreviewPlugin();
  PrintPlugin();
  SavePlugin();
  SearchReplacePlugin();
  SpellCheckerPlugin();
  TabFocusPlugin();
  TablePlugin();
  TemplatePlugin();
  TextColorPlugin();
  TextPatternPlugin();
  TocPlugin();
  VisualBlocksPlugin();
  VisualCharsPlugin();
  WordCountPlugin();
  ModernTheme();

  const cmd = function (command, value?) {
    return { command, value };
  };

  const commands = [
    cmd('Bold'),
    cmd('Italic'),
    cmd('Underline'),
    cmd('Strikethrough'),
    cmd('Superscript'),
    cmd('Subscript'),
    cmd('Cut'),
    cmd('Copy'),
    cmd('Paste'),
    cmd('Unlink'),
    cmd('JustifyLeft'),
    cmd('JustifyCenter'),
    cmd('JustifyRight'),
    cmd('JustifyFull'),
    cmd('JustifyNone'),
    cmd('InsertUnorderedList'),
    cmd('InsertOrderedList'),
    cmd('ForeColor', 'red'),
    cmd('HiliteColor', 'green'),
    cmd('FontName', 'Arial'),
    cmd('FontSize', 7),
    cmd('RemoveFormat'),
    cmd('mceBlockQuote'),
    cmd('FormatBlock', 'h1'),
    cmd('mceInsertContent', 'abc'),
    cmd('mceToggleFormat', 'bold'),
    cmd('mceSetContent', 'abc'),
    cmd('Indent'),
    cmd('Outdent'),
    cmd('InsertHorizontalRule'),
    cmd('mceToggleVisualAid'),
    cmd('mceInsertLink', 'url'),
    cmd('selectAll'),
    cmd('delete'),
    cmd('mceNewDocument'),
    cmd('Undo'),
    cmd('Redo'),
    cmd('mceAutoResize'),
    cmd('mceShowCharmap'),
    cmd('mceCodeEditor'),
    cmd('mceDirectionLTR'),
    cmd('mceDirectionRTL'),
    cmd('mceFullPageProperties'),
    cmd('mceFullscreen'),
    cmd('mceImage'),
    cmd('mceInsertDate'),
    cmd('mceInsertTime'),
    cmd('InsertDefinitionList'),
    cmd('mceNonBreaking'),
    cmd('mcePageBreak'),
//.........这里部分代码省略.........

作者:tinymc    项目:tinymc   
UnitTest.asynctest('browser.tinymce.plugins.fullscreen.FullScreenPluginInlineEditorTest', (success, failure) => {

  FullscreenPlugin();
  LinkPlugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    Pipeline.async({}, [ Log.step('TBA', 'FullScreen: Assert isFullscreen api function is present and fullscreen button is absent',
      Step.sync(() => {
        RawAssertions.assertEq('should have isFullsceen api function', false, editor.plugins.fullscreen.isFullscreen());
        RawAssertions.assertEq('should not have the fullscreen button', 'undefined', typeof editor.ui.registry.getAll().buttons.fullscreen);
      })
    )], onSuccess, onFailure);
  }, {
    inline: true,
    plugins: 'fullscreen link',
    toolbar: 'fullscreen link',
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce'
  }, success, failure);
});

作者:abstas    项目:tinymc   
UnitTest.asynctest('browser.tinymce.plugins.fullscreen.FullScreenPluginInlineEditorTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  FullscreenPlugin();
  LinkPlugin();
  Theme();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    Pipeline.async({}, [
      Step.sync(() => {
        RawAssertions.assertEq('should have isFullsceen api function', false, editor.plugins.fullscreen.isFullscreen());
        RawAssertions.assertEq('should not have the fullscreen button', 'undefined', typeof editor.buttons.fullscreen);
      })
    ], onSuccess, onFailure);
  }, {
    inline: true,
    plugins: 'fullscreen link',
    toolbar: 'fullscreen link',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});

作者:tinymc    项目:tinymc   
UnitTest.asynctest('browser.tinymce.plugins.fullscreen.FullScreenPluginTest', (success, failure) => {

  LinkPlugin();
  Plugin();

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    const lastEventArgs = Cell(null);

    editor.on('FullscreenStateChanged', function (e) {
      lastEventArgs.set(e);
    });

    const cAssertEditorAndLastEvent = (label, state) =>
      Chain.control(
        Chain.fromChains([
          Chain.op(() => Assertions.assertEq('Editor isFullscreen', state, editor.plugins.fullscreen.isFullscreen())),
          Chain.op(() => Assertions.assertEq('FullscreenStateChanged event', state, lastEventArgs.get().state))
        ]),
        Guard.addLogging(label)
      );

    const cAssertFullscreenClass = (label, shouldExist) => {
      const selector = shouldExist ? 'root:.tox-fullscreen' : 'root::not(.tox-fullscreen)';
      const label2 = `Body and Html should ${shouldExist ? '' : 'not '}have "tox-fullscreen" class`;
      return Chain.control(
        Chain.fromChains([
          Chain.inject(Body.body()),
          UiFinder.cFindIn(selector),
          Chain.inject(Element.fromDom(document.documentElement)),
          UiFinder.cFindIn(selector)
        ]),
        Guard.addLogging(`${label}: ${label2}`)
      );
    };

    const cCloseOnlyWindow =  Chain.control(
      Chain.op(() => {
        const dialogs = () => UiFinder.findAllIn(Body.body(), '[role="dialog"]');
        Assertions.assertEq('One window exists', 1, dialogs().length);
        editor.windowManager.close();
        Assertions.assertEq('No windows exist', 0, dialogs().length);
      }),
      Guard.addLogging('Close window')
    );

    Chain.pipeline(
      Log.chains('TBA', 'FullScreen: Toggle fullscreen on, open link dialog, insert link, close dialog and toggle fullscreen off', [
        cAssertFullscreenClass('Before fullscreen command', false),
        Chain.op(() => editor.execCommand('mceFullScreen', true)),
        cAssertEditorAndLastEvent('After fullscreen command', true),
        cAssertFullscreenClass('After fullscreen command', true),
        Chain.op(() => editor.execCommand('mceLink', true)),
        cWaitForDialog('Insert/Edit Link'),
        cCloseOnlyWindow,
        cAssertFullscreenClass('After window is closed', true),
        Chain.op(() => editor.execCommand('mceFullScreen')),
        cAssertEditorAndLastEvent('After fullscreen toggled', false),
        cAssertFullscreenClass('After fullscreen toggled', false),
      ])
    , onSuccess, onFailure);
  }, {
    plugins: 'fullscreen link',
    theme: 'silver',
    base_url: '/project/tinymce/js/tinymce'
  }, success, failure);
});

作者:danielpunkas    项目:tinymc   
UnitTest.asynctest('browser.tinymce.plugins.fullscreen.FullScreenPluginTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];
  const suite = LegacyUnit.createSuite();

  LinkPlugin();
  Plugin();
  Theme();

  suite.test('Fullscreen class on html and body tag', function (editor) {
    const bodyTag = document.body;
    const htmlTag = document.documentElement;
    let lastEventArgs;

    editor.on('FullscreenStateChanged', function (e) {
      lastEventArgs = e;
    });

    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(bodyTag, 'mce-fullscreen'),
      false,
      'Body tag should not have "mce-fullscreen" class before fullscreen command'
    );
    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(htmlTag, 'mce-fullscreen'),
      false,
      'Html tag should not have "mce-fullscreen" class before fullscreen command'
    );

    editor.execCommand('mceFullScreen');

    LegacyUnit.equal(editor.plugins.fullscreen.isFullscreen(), true, 'Should be true');
    LegacyUnit.equal(lastEventArgs.state, true, 'Should be true');

    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(bodyTag, 'mce-fullscreen'),
      true,
      'Body tag should have "mce-fullscreen" class after fullscreen command'
    );
    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(htmlTag, 'mce-fullscreen'),
      true,
      'Html tag should have "mce-fullscreen" class after fullscreen command'
    );

    editor.execCommand('mceLink', true);

    const windows = editor.windowManager.getWindows();
    const linkWindow = windows[0];

    LegacyUnit.equal(typeof linkWindow, 'object', 'Link window is an object');

    linkWindow.close();

    LegacyUnit.equal(windows.length, 0, 'No windows exist');

    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(bodyTag, 'mce-fullscreen'),
      true,
      'Body tag should still have "mce-fullscreen" class after window is closed'
    );
    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(htmlTag, 'mce-fullscreen'),
      true,
      'Html tag should still have "mce-fullscreen" class after window is closed'
    );

    editor.execCommand('mceFullScreen');

    LegacyUnit.equal(editor.plugins.fullscreen.isFullscreen(), false, 'Should be false');
    LegacyUnit.equal(lastEventArgs.state, false, 'Should be false');
    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(bodyTag, 'mce-fullscreen'),
      false,
      'Body tag should have "mce-fullscreen" class after fullscreen command'
    );
    LegacyUnit.equal(
      DOMUtils.DOM.hasClass(htmlTag, 'mce-fullscreen'),
      false,
      'Html tag should have "mce-fullscreen" class after fullscreen command'
    );
  });

  TinyLoader.setup(function (editor, onSuccess, onFailure) {
    Pipeline.async({}, suite.toSteps(editor), onSuccess, onFailure);
  }, {
    plugins: 'fullscreen link',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});

作者:tinymc    项目:tinymc   
UnitTest.asynctest('browser.tinymce.plugins.autoresize.AutoresizePluginTest', (success, failure) => {

  AutoresizePlugin();
  FullscreenPlugin();

  const sAssertEditorHeightAbove = (editor: Editor, minHeight: number) => {
    return Logger.t(`Assert editor height is above ${minHeight}`, Step.sync(() => {
      const editorHeight = editor.getContainer().offsetHeight;
      RawAssertions.assertEq(`should be above: ${editorHeight}>=${minHeight}`, true, editorHeight >= minHeight);
    }));
  };

  const sAssertEditorHeightBelow = (editor: Editor, minHeight: number) => {
    return Logger.t(`Assert editor height is below ${minHeight}`, Step.sync(() => {
      const editorHeight = editor.getContainer().offsetHeight;
      RawAssertions.assertEq(`should be below: ${editorHeight}<=${minHeight}`, true, editorHeight <= minHeight);
    }));
  };

  const sAssertEditorContentApproxHeight = (editor: Editor, height: number, expectedDiff: number = 5) => {
    return Logger.t(`Assert editor content height is approx ${height}`, Step.sync(() => {
      // Get the editor height, but exclude the 10px margin from the calculations
      const editorContentHeight = editor.getContentAreaContainer().offsetHeight - 10;
      const actualDiff = Math.abs(editorContentHeight - height);
      RawAssertions.assertEq(`should be approx (within ${expectedDiff}px): ${editorContentHeight} ~= ${height}`, true,  actualDiff <= expectedDiff);
    }));
  };

  const sAssertScroll = (editor, state) => {
    return Logger.t(`Assert scroll ${state}`, Step.sync(function () {
      const body = editor.getBody();
      Assertions.assertEq('', !state, body.style.overflowY === 'hidden');
    }));
  };

  TinyLoader.setup((editor, onSuccess, onFailure) => {
    const tinyApis = TinyApis(editor);

    Pipeline.async({},
      // These tests doesn't work on phantom since measuring things seems broken there
      navigator.userAgent.indexOf('PhantomJS') === -1 ?
      [
        Log.stepsAsStep('TBA', 'AutoResize: Fullscreen toggle scroll state', [
          tinyApis.sExecCommand('mceFullScreen'),
          sAssertScroll(editor, true),
          tinyApis.sExecCommand('mceFullScreen'),
          sAssertScroll(editor, false)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size increase based on content size', [
          tinyApis.sSetContent('<div style="height: 5000px;">a</div>'),
          // Content height + bottom margin = 5050
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 5050), 10, 3000),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 5050), 10, 3000)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size increase with floated content', [
          tinyApis.sSetContent('<div style="height: 5500px; float: right;">a</div>'),
          // Content height + bottom margin = 5550
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 5550), 10, 3000),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 5550), 10, 3000)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size increase with async loaded content', [
          // Note: Use a min-height here to account for different browsers rendering broken images differently
          tinyApis.sSetContent('<div style="min-height: 35px;"><img src="#" /></div><div style="height: 5500px;"></div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 5585), 10, 3000),
          Step.sync(() => {
            // Update the img element to load an image
            editor.$('img').attr('src', 'http://moxiecode.cachefly.net/tinymce/v9/images/logo.png');
          }),
          // Content height + div image height (84px) + bottom margin = 5634
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 5634), 10, 3000),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 5634), 10, 3000)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size decrease based on content size', [
          tinyApis.sSetContent('<div style="height: 1000px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 1050), 10, 3000),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightBelow(editor, 1200), 10, 3000)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size content set to 10 and autoresize_bottom_margin set to 100', [
          tinyApis.sSetSetting('autoresize_bottom_margin', 100),
          tinyApis.sSetContent('<div style="height: 10px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorContentApproxHeight(editor, 110), 10, 3000),
          tinyApis.sSetSetting('autoresize_bottom_margin', 50)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size increase content to 1000 based and restrict by max height', [
          tinyApis.sSetSetting('max_height', 200),
          tinyApis.sSetContent('<div style="height: 1000px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightBelow(editor, 200), 10, 3000),
          tinyApis.sSetSetting('max_height', 0)
        ]),
        Log.stepsAsStep('TBA', 'AutoResize: Editor size decrease content to 10 and set min height to 500', [
          tinyApis.sSetSetting('min_height', 500),
          tinyApis.sSetContent('<div style="height: 10px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 500), 10, 3000),
          tinyApis.sSetSetting('min_height', 0)
        ])
      ] : []
    , onSuccess, onFailure);
  }, {
    plugins: 'autoresize fullscreen',
    toolbar: 'autoresize',
//.........这里部分代码省略.........

作者:aha-ap    项目:tinymce-word-paste-filte   
UnitTest.asynctest('browser.tinymce.plugins.autoresize.AutoresizePluginTest', function () {
  const success = arguments[arguments.length - 2];
  const failure = arguments[arguments.length - 1];

  AutoresizePlugin();
  FullscreenPlugin();
  ModernTheme();

  const sAssertEditorHeightAbove = function (editor, minHeight) {
    return Step.sync(function () {
      const editorHeight = editor.getContainer().clientHeight;
      RawAssertions.assertEq('should be above: ' + editorHeight + '>=' + minHeight, true, editorHeight >= minHeight);
    });
  };

  const sAssertEditorHeightBelow = function (editor, minHeight) {
    return Step.sync(function () {
      const editorHeight = editor.getContainer().clientHeight;
      RawAssertions.assertEq('should be below: ' + editorHeight + '<=' + minHeight, true, editorHeight <= minHeight);
    });
  };

  const sAssertScroll = function (editor, state) {
    return Step.sync(function () {
      const body = editor.getBody();
      Assertions.assertEq('', !state, body.style.overflowY === 'hidden');
    });
  };

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

    Pipeline.async({}, Arr.flatten([
      [
        Logger.t('Fullscreen toggle scroll state', GeneralSteps.sequence([
          tinyApis.sExecCommand('mceFullScreen'),
          sAssertScroll(editor, true),
          tinyApis.sExecCommand('mceFullScreen'),
          sAssertScroll(editor, false)
        ])),
        Logger.t('Editor size increase based on content size', GeneralSteps.sequence([
          tinyApis.sSetContent('<div style="height: 5000px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 5000), 10, 3000)
        ])),
        Logger.t('Editor size decrease based on content size', GeneralSteps.sequence([
          tinyApis.sSetContent('<div style="height: 1000px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightBelow(editor, 2000), 10, 3000)
        ]))
      ],

      // These tests doesn't work on phantom since measuring things seems broken there
      navigator.userAgent.indexOf('PhantomJS') === -1 ? [
        Logger.t('Editor size decrease content to 1000 based and restrict by max height', GeneralSteps.sequence([
          tinyApis.sSetSetting('autoresize_max_height', 200),
          tinyApis.sSetContent('<div style="height: 1000px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightBelow(editor, 500), 10, 3000),
          tinyApis.sSetSetting('autoresize_max_height', 0)
        ])),
        Logger.t('Editor size decrease content to 10 and set min height to 500', GeneralSteps.sequence([
          tinyApis.sSetSetting('autoresize_min_height', 500),
          tinyApis.sSetContent('<div style="height: 10px;">a</div>'),
          Waiter.sTryUntil('wait for editor height', sAssertEditorHeightAbove(editor, 300), 10, 3000),
          tinyApis.sSetSetting('autoresize_min_height', 0)
        ]))
      ] : []
    ]), onSuccess, onFailure);
  }, {
    plugins: 'autoresize fullscreen',
    toolbar: 'autoresize',
    skin_url: '/project/js/tinymce/skins/lightgray'
  }, success, failure);
});

作者:howardjin    项目:tinymc   
AdvListPlugin();
AnchorPlugin();
AutoLinkPlugin();
AutoResizePlugin();
AutoSavePlugin();
BbCodePlugin();
CharMapPlugin();
CodePlugin();
CodeSamplePlugin();
ColorPickerPlugin();
ContextMenuPlugin();
DirectionalityPlugin();
EmoticonsPlugin();
FullPagePlugin();
FullScreenPlugin();
HrPlugin();
ImagePlugin();
ImageToolsPlugin();
ImportCssPlugin();
InsertDatetimePlugin();
LegacyOutputPlugin();
LinkPlugin();
ListsPlugin();
MediaPlugin();
NonBreakingPlugin();
NonEditablePlugin();
PageBreakPlugin();
PastePlugin();
PreviewPlugin();
PrintPlugin();

作者:howardjin    项目:tinymc   
/**
 * Demo.js
 *
 * Released under LGPL License.
 * Copyright (c) 1999-2016 Ephox Corp. All rights reserved
 *
 * License: http://www.tinymce.com/license
 * Contributing: http://www.tinymce.com/contributing
 */

import FullscreenPlugin from 'tinymce/plugins/fullscreen/Plugin';

declare let tinymce: any;

FullscreenPlugin();

tinymce.init({
  selector: 'textarea.tinymce',
  theme: 'modern',
  skin_url: '../../../../../js/tinymce/skins/lightgray',
  plugins: 'fullscreen code',
  toolbar: 'fullscreen code',
  height: 600
});

评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号