* Checks that the plugin is in the editor configuration and can optionally check if the plugin has been loaded. * * @method hasPlugin * @param {String} name The name of the plugin, as specified for the TinyMCE `plugins` option. * @param {Boolean} loaded If `true`, will also check that th
(name: string, loaded?: boolean)
| 478 | * tinymce.activeEditor.hasPlugin('table'); |
| 479 | */ |
| 480 | public hasPlugin(name: string, loaded?: boolean): boolean { |
| 481 | const hasPlugin = Arr.contains(Options.getPlugins(this), name); |
| 482 | if (hasPlugin) { |
| 483 | return loaded ? PluginManager.get(name) !== undefined : true; |
| 484 | } else { |
| 485 | return false; |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | /** |
| 490 | * Dispatches out a onNodeChange event to all observers. This method should be called when you |
no test coverage detected