mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 15:45:47 +01:00
documentation upd
This commit is contained in:
parent
b4d948586f
commit
740349c45c
3 changed files with 8 additions and 8 deletions
|
|
@ -186,7 +186,9 @@ export default class BlockManager extends Module {
|
|||
}
|
||||
|
||||
/**
|
||||
* Create new block below current block and insert extracted content form current block to new block
|
||||
* Split current block
|
||||
* 1. Extract content from caret position to block`s end
|
||||
* 2. Insert new block below current one with extracted content
|
||||
*/
|
||||
split() {
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export default class Caret extends Module {
|
|||
}
|
||||
|
||||
/**
|
||||
* Extract content fragment of current block form caret position
|
||||
* Extract content fragment of current block from caret position to the end of the block
|
||||
*/
|
||||
extractFragmentFromCaretPosition() {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
* @class Keyboard
|
||||
* @classdesc Сlass to handle the keystrokes
|
||||
*
|
||||
* @module Keyboard
|
||||
*
|
||||
* @author CodeX Team (team@ifmo.su)
|
||||
* @copyright CodeX Team 2017
|
||||
* @license The MIT License (MIT)
|
||||
* @version 2.0.0
|
||||
* @version 1.0.0
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -25,7 +23,7 @@ export default class Keyboard extends Module {
|
|||
}
|
||||
|
||||
/**
|
||||
* Handler on Editor for keyboard keys at keydown event
|
||||
* Handler on block for keyboard keys at keydown event
|
||||
*
|
||||
* @param {KeyboardEvent} event
|
||||
*/
|
||||
|
|
@ -74,11 +72,11 @@ export default class Keyboard extends Module {
|
|||
enterPressed(event) {
|
||||
|
||||
/**
|
||||
* @todo check settings of "allowLinebreaks" plugin
|
||||
* @todo check plugin`s configuration for allowLinebreaks property
|
||||
*/
|
||||
event.preventDefault();
|
||||
/**
|
||||
* Insert new block with data below current block
|
||||
* Split current block into two ones
|
||||
*/
|
||||
this.Editor.BlockManager.split();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue