Skip to content

ckeditor5-elements / findPlugin

Function: findPlugin() ​

ts
function findPlugin<T>(
   editor, 
   name, 
   isPlugin
): T | null;

Returns the plugin of the name when it is loaded and fits the guard, null otherwise. The features use it to work with another feature without depending on it: they look the plugin up by name, and check it against the interface they use.

Type Parameters ​

Type Parameter
T extends object

Parameters ​

ParameterType
editorEditor
namestring
isPlugin(plugin) => plugin is T

Returns ​

T | null