mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 07:35:48 +01:00
Update description
This commit is contained in:
parent
46e9c89604
commit
b982e34d96
3 changed files with 38 additions and 5 deletions
11
src/codex.js
11
src/codex.js
|
|
@ -26,11 +26,14 @@
|
|||
* }
|
||||
* });
|
||||
*
|
||||
* - tools constist of object with key that is type/name of class constructor
|
||||
* - tools is an object: {
|
||||
* pluginName: PluginClass,
|
||||
* .....
|
||||
* }
|
||||
* - toolsConfig is an additional configuration that uses Codex Editor API
|
||||
* iconClassname - the name of icon class. Icon will be shown in toolbox
|
||||
* iconClassname - CSS classname of toobox icon
|
||||
* displayInToolbox - if you want to see your Tool in toolbox hided in "plus" button, than set "True". By default : "False"
|
||||
* enableLineBreaks - by default enter pastes new block that set as initialblock, but if you set this property "True", you break the lines
|
||||
* enableLineBreaks - by default enter creates new block that set as initialblock, but if you set this property "True", enter will break the lines in current block
|
||||
*
|
||||
* @author CodeX-Team <https://ifmo.su>
|
||||
*
|
||||
|
|
@ -115,7 +118,7 @@ module.exports = class CodexEditor {
|
|||
|
||||
/**
|
||||
* Setting for configuration
|
||||
* @param {object} config
|
||||
* @param {Object} config
|
||||
*/
|
||||
set configuration(config = {}) {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Codex Editor Core
|
||||
*
|
||||
* @author Codex Team
|
||||
* @version 1.1.3
|
||||
* @version 2.0.0
|
||||
*/
|
||||
module.exports = class Core {
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,29 @@
|
|||
* - {Function} on - appends subscriber to the event. If event doesn't exist - creates new one
|
||||
* - {Function} emit - fires all subscribers with data
|
||||
*
|
||||
* @version 1.0.0
|
||||
*/
|
||||
module.exports = class Events {
|
||||
|
||||
/**
|
||||
* Module key name
|
||||
* @returns {string}
|
||||
*/
|
||||
static get name() {
|
||||
return 'Events';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Editor
|
||||
* @param Editor.modules {@link CodexEditor#moduleInstances}
|
||||
* @param Editor.config {@link CodexEditor#configuration}
|
||||
*/
|
||||
set state(Editor) {
|
||||
|
||||
this.Editor = Editor;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
|
|
@ -16,6 +36,7 @@ module.exports = class Events {
|
|||
constructor() {
|
||||
|
||||
this.subscribers = {};
|
||||
this.Editor = null;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -52,4 +73,13 @@ module.exports = class Events {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroyer
|
||||
*/
|
||||
destroy() {
|
||||
|
||||
this.Editor = null;
|
||||
this.subscribers = null;
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue