mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 15:45:47 +01:00
add todo
This commit is contained in:
parent
ff745760ca
commit
97f04e6152
3 changed files with 25 additions and 23 deletions
|
|
@ -2423,7 +2423,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|||
|
||||
/**
|
||||
* @class BlocksAPI
|
||||
* Provides with methods working with Block
|
||||
* provides with methods working with Block
|
||||
*/
|
||||
var BlocksAPI = function (_Module) {
|
||||
_inherits(BlocksAPI, _Module);
|
||||
|
|
@ -2542,7 +2542,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|||
|
||||
/**
|
||||
* @class EventsAPI
|
||||
* Provides with methods working with Toolbar
|
||||
* provides with methods working with Toolbar
|
||||
*/
|
||||
var EventsAPI = function (_Module) {
|
||||
_inherits(EventsAPI, _Module);
|
||||
|
|
@ -2804,7 +2804,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
|||
|
||||
/**
|
||||
* @class ToolbarsAPI
|
||||
* Provides with methods working with Toolbar
|
||||
* provides with methods working with Toolbar
|
||||
*/
|
||||
var ToolbarsAPI = function (_Module) {
|
||||
_inherits(ToolbarsAPI, _Module);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,15 +1,19 @@
|
|||
/**
|
||||
* @todo cross-tag wrapping []:
|
||||
* @todo remove wrapper if selection () inside it:
|
||||
* s([ample tex])t -> sample text
|
||||
* s[ampl(e t)ex]t -> s[ampl]e t[ex]t @todo create splitter
|
||||
* s(ampl[e t]ex)t -> s[ampl[e t]ex]t do not remove wrapper
|
||||
* s([ampl]e t[ex])t -> s[[ampl]e t[ex]]t do not remove wrapper
|
||||
*
|
||||
* @todo process cross-tag wrapping []:
|
||||
* sam[ple <b>te]xt</b> -> sam[ple ]<b>[te]xt</b>
|
||||
*
|
||||
* @todo optimizer:
|
||||
* @todo create optimizer:
|
||||
* sa[mple t][ex]t -> sa[mple tex]t
|
||||
* sa[mpl[e t]ex]t -> sa[mple tex]t
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Range/commonAncestorContainer
|
||||
*
|
||||
* @todo remove wrapper if selection () inside it:
|
||||
* s(ampl[e t]ex)t -> s[ample tex]t
|
||||
* s[ampl(e t)ex]t -> s[ampl]e t[ex]t
|
||||
* s([ample tex])t -> sample text
|
||||
* @todo save selection after clicking on tool
|
||||
*/
|
||||
|
||||
class Marker {
|
||||
|
|
@ -41,23 +45,21 @@ class Marker {
|
|||
let state = this.checkState();
|
||||
|
||||
if (state) {
|
||||
// let selectedText = range.extractContents();
|
||||
|
||||
console.log('range', range);
|
||||
console.log('state', state);
|
||||
// console.log('selectedText', selectedText);
|
||||
|
||||
// range.insertNode(document.createTextNode('New Node Inserted Here'));
|
||||
/** @todo remove highlighting */
|
||||
|
||||
// /**
|
||||
// *
|
||||
// */
|
||||
// if (range.startContainer === range.endContainer) {
|
||||
// /**
|
||||
// * @todo remove whole wrapper not class
|
||||
// */
|
||||
// state.classList.remove(this.CSS);
|
||||
// }
|
||||
} else {
|
||||
// let selectedText = range.extractContents();
|
||||
// let span = document.createElement('SPAN');
|
||||
//
|
||||
// span.classList.add(this.CSS);
|
||||
// span.appendChild(selectedText);
|
||||
// range.insertNode(span);
|
||||
|
||||
// let selectedText = range.extractContents();
|
||||
|
||||
let span = document.createElement('SPAN');
|
||||
|
||||
span.classList.add(this.CSS);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue