mirror of
https://github.com/codex-team/editor.js
synced 2024-06-07 00:12:35 +02:00
fix missing jsdoc (#406)
* fix missing jsdoc * add a few words about save and render functions
This commit is contained in:
parent
87ed7ec0ee
commit
a7ebbae7fd
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,8 +31,12 @@ constructor({data, config, api}) {
|
|||
|
||||
### render()
|
||||
|
||||
Method that returns Tool's element {HTMLElement} that will be placed into Editor.
|
||||
|
||||
### save()
|
||||
|
||||
Process Tool's element created by `render()` function in DOM and return Block's data.
|
||||
|
||||
### validate() _optional_
|
||||
|
||||
### merge() _optional_
|
||||
|
|
49
src/codex.js
49
src/codex.js
|
@ -1,44 +1,3 @@
|
|||
/**
|
||||
* Codex Editor
|
||||
*
|
||||
* Short Description (눈_눈;)
|
||||
* @version 2.0.0
|
||||
*
|
||||
* How to start?
|
||||
* Example:
|
||||
* new CodexEditor({
|
||||
* holderId : 'codex-editor',
|
||||
* initialBlock : 'text',
|
||||
* placeholder : 'Write your story....',
|
||||
* tools: {
|
||||
* quote: Quote,
|
||||
* anotherTool : AnotherTool
|
||||
* },
|
||||
* toolsConfig: {
|
||||
* quote: {
|
||||
* iconClassname : 'quote-icon',
|
||||
* displayInToolbox : true,
|
||||
* enableLineBreaks : true
|
||||
* },
|
||||
* anotherTool: {
|
||||
* iconClassname : 'tool-icon'
|
||||
* }
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* - tools is an object: {
|
||||
* pluginName: PluginClass,
|
||||
* .....
|
||||
* }
|
||||
* - toolsConfig is an additional configuration that uses Codex Editor API
|
||||
* iconClassname - CSS classname of toolbox 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 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>
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
@ -49,6 +8,14 @@ import 'babel-polyfill';
|
|||
import 'components/polyfills';
|
||||
import Core from './components/core';
|
||||
|
||||
/**
|
||||
* Codex Editor
|
||||
*
|
||||
* Short Description (눈_눈;)
|
||||
* @version 2.0
|
||||
*
|
||||
* @author CodeX-Team <https://ifmo.su>
|
||||
*/
|
||||
export default class CodexEditor {
|
||||
/** Editor version */
|
||||
static get version() {
|
||||
|
|
Loading…
Reference in a new issue