TINY-1195: add info on getMetadata for custom plugins
This commit is contained in:
@@ -85,6 +85,15 @@ tinymce.PluginManager.add('example', function(editor, url) {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
getMetadata: function () {
|
||||
return {
|
||||
title: "Example plugin",
|
||||
url: "http://exampleplugindocsurl.com"
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
@@ -100,6 +109,10 @@ tinymce.init({
|
||||
});
|
||||
```
|
||||
|
||||
## Exposing metadata
|
||||
|
||||
You can expose metadata from your plugin by returning an object with the property `getMetadata` with a function that returns an object with a `title` and `url` property. This metadata will then be used by the [Help Plugin]({{ site.baseurl }}/plugins/help/) to show the correct name and link for your plugin in the Plugins installed tab. See test plugin above for example.
|
||||
|
||||
## Language localization
|
||||
|
||||
If you want to have custom translations for your plugin you need to create a "langs" directory in your plugin directory. TinyMCE will then try to load language files based on the specified language core for example if the language is "sv_SE" it will try to load ```'<your plugin>/langs/sv_SE.js'```.
|
||||
|
||||
@@ -25,3 +25,7 @@ tinymce.init({
|
||||
toolbar: "help"
|
||||
});
|
||||
```
|
||||
|
||||
## Exposing metadata for the help plugin
|
||||
|
||||
For information on how to expose metadata from you custom plugin to add it to the Installed plugins list in the Help plugin, see the [Creating a Plugin page]({{ site.baseurl }}/advanced/creating-a-plugin/#exposingmetadata).
|
||||
Reference in New Issue
Block a user