8
0
Просмотр исходного кода

Docs: Clarified how to name plugins. [skip ci]

Piotrek Koszuliński 8 лет назад
Родитель
Сommit
83cd1be064
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      packages/ckeditor5-core/src/plugin.js

+ 4 - 2
packages/ckeditor5-core/src/plugin.js

@@ -62,8 +62,10 @@ export default class Plugin {
 	 * {@link module:core/plugincollection~PluginCollection#get} by its
 	 * name and its constructor. If not, then only by its constructor.
 	 *
-	 * The name should reflect the package name + path to that module. E.g. `ckeditor5-image/src/image.js` plugin
-	 * should be named `image/image` (the `ckeditor5-` prefix is stripped during compilation).
+	 * The name should reflect the package name + the plugin module name. E.g. `ckeditor5-image/src/image.js` plugin
+	 * should be named `image/image` (the `ckeditor5-` prefix is stripped during compilation). If plugin is kept
+	 * deeper in the directory structure, it's recommended to only use the module file name, not the whole path.
+	 * So, e.g. a plugin defined in `ckeditor5-ui/src/notification/notification.js` file may be named `ui/notification`.
 	 *
 	 * To keep a plugin class definition tight it's recommended to define this property as a static getter:
 	 *