mirror of
https://github.com/codex-team/editor.js
synced 2024-06-11 02:12:31 +02:00
Merge branch 'master' of https://github.com/codex-team/codex.editor
merging
This commit is contained in:
commit
d5540b7834
|
@ -218,16 +218,10 @@ cEditor.ui = {
|
|||
cEditor.callback.redactorInputEvent(event);
|
||||
}, false );
|
||||
|
||||
/** Bind click listeners on toolbar buttons */
|
||||
for (button in cEditor.nodes.toolbarButtons){
|
||||
cEditor.nodes.toolbarButtons[button].addEventListener('click', function (event) {
|
||||
|
||||
console.log(this.dataset.type);
|
||||
|
||||
cEditor.toolbar.current = this.dataset.type;
|
||||
|
||||
cEditor.toolbar.toolClicked(event);
|
||||
cEditor.toolbar.close();
|
||||
|
||||
cEditor.callback.toolbarButtonClicked(event, this);
|
||||
}, false);
|
||||
}
|
||||
|
||||
|
@ -316,6 +310,19 @@ cEditor.callback = {
|
|||
|
||||
},
|
||||
|
||||
/**
|
||||
* Toolbar button click handler
|
||||
* @param this - cursor to the button
|
||||
*/
|
||||
toolbarButtonClicked : function (event, button) {
|
||||
|
||||
cEditor.toolbar.current = button.dataset.type;
|
||||
|
||||
cEditor.toolbar.toolClicked(event);
|
||||
cEditor.toolbar.close();
|
||||
|
||||
},
|
||||
|
||||
redactorInputEvent : function (event) {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue