本文整理汇总了TypeScript中tinymce/core/PluginManager.add函数的典型用法代码示例。如果您正苦于以下问题:TypeScript add函数的具体用法?TypeScript add怎么用?TypeScript add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
UnitTest.test('browser.tinymce.plugins.paste.alien.DetectProPluginTest', function () {
// Fake loading of powerpaste
PluginManager.add('powerpaste', function () { });
Assertions.assertEq('Should not have pro plugin', false, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste' }, EditorManager)));
Assertions.assertEq('Should not have pro plugin', false, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: '' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'powerpaste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste powerpaste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'powerpaste paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste powerpaste paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste,powerpaste,paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste powerpaste paste' }, EditorManager)));
});
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:13,代码来源:DetectProPluginTest.ts
示例2: function
function () {
// Fake loading of tinymcespellchecker
PluginManager.add('tinymcespellchecker', function () { });
Assertions.assertEq('Should not have pro plugin', false, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste' }, EditorManager)));
Assertions.assertEq('Should not have pro plugin', false, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: '' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'tinymcespellchecker' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste tinymcespellchecker' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'tinymcespellchecker paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste tinymcespellchecker paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste,tinymcespellchecker,paste' }, EditorManager)));
Assertions.assertEq('Should have pro plugin', true, DetectProPlugin.hasProPlugin(new Editor('id', { plugins: 'paste tinymcespellchecker paste' }, EditorManager)));
}
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:13,代码来源:DetectProPluginTest.ts
示例3: function
/**
* Plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import PluginManager from 'tinymce/core/PluginManager';
import Commands from './api/Commands';
import FilterContent from './core/FilterContent';
import Buttons from './ui/Buttons';
PluginManager.add('template', function (editor) {
Buttons.register(editor);
Commands.register(editor);
FilterContent.setup(editor);
});
export default function () { }
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:22,代码来源:Plugin.ts
示例4: function
/**
* Plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import PluginManager from 'tinymce/core/PluginManager';
import Commands from './api/Commands';
import FilterContent from './core/FilterContent';
import Buttons from './ui/Buttons';
PluginManager.add('image', function (editor) {
FilterContent.setup(editor);
Buttons.register(editor);
Commands.register(editor);
});
export default function () { }
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:22,代码来源:Plugin.ts
示例5: function
/**
* Plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import PluginManager from 'tinymce/core/PluginManager';
import FilterContent from './core/FilterContent';
PluginManager.add('noneditable', function (editor) {
FilterContent.setup(editor);
});
export default function () { }
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:18,代码来源:Plugin.ts
示例6: function
/**
* Plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import { Cell } from '@ephox/katamari';
import PluginManager from 'tinymce/core/PluginManager';
import Commands from './api/Commands';
import Resize from './core/Resize';
/**
* This class contains all core logic for the autoresize plugin.
*
* @class tinymce.autoresize.Plugin
* @private
*/
PluginManager.add('autoresize', function (editor) {
if (!editor.inline) {
const oldSize = Cell(0);
Commands.register(editor, oldSize);
Resize.setup(editor, oldSize);
}
});
export default function () {}
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:31,代码来源:Plugin.ts
示例7: function
/**
* Plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import { Cell } from '@ephox/katamari';
import PluginManager from 'tinymce/core/PluginManager';
import Commands from './api/Commands';
import Bindings from './core/Bindings';
import Buttons from './ui/Buttons';
PluginManager.add('visualblocks', function (editor, pluginUrl) {
const enabledState = Cell(false);
Commands.register(editor, pluginUrl, enabledState);
Buttons.register(editor, enabledState);
Bindings.setup(editor, pluginUrl, enabledState);
});
export default function () { }
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:25,代码来源:Plugin.ts
示例8: function
import PluginManager from 'tinymce/core/PluginManager';
const Plugin = function (editor, url) {
return {
getMetadata () {
return {
name: 'Fake',
url: 'http://www.fake.com'
};
}
};
};
PluginManager.add('fake', Plugin);
export default function () {}
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:16,代码来源:FakePlugin.ts
示例9: function
/**
* PLugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import PluginManager from 'tinymce/core/PluginManager';
import Commands from './api/Commands';
import Buttons from './ui/Buttons';
PluginManager.add('help', function (editor, pluginUrl) {
Buttons.register(editor, pluginUrl);
Commands.register(editor, pluginUrl);
editor.shortcuts.add('Alt+0', 'Open help dialog', 'mceHelp');
});
export default function () {}
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:21,代码来源:Plugin.ts
示例10: function
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
import { Cell } from '@ephox/katamari';
import PluginManager from 'tinymce/core/PluginManager';
import Api from './api/Api';
import BeforeUnload from './core/BeforeUnload';
import Buttons from './ui/Buttons';
/**
* This class contains all core logic for the autosave plugin.
*
* @class tinymce.autosave.Plugin
* @private
*/
PluginManager.add('autosave', function (editor) {
const started = Cell(false);
BeforeUnload.setup(editor);
Buttons.register(editor, started);
return Api.get(editor);
});
export default function () { }
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:31,代码来源:Plugin.ts
注:本文中的tinymce/core/PluginManager.add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论