mirror of
https://github.com/codex-team/editor.js
synced 2024-06-17 13:15:20 +02:00
getAllInputs refactored
This commit is contained in:
parent
9425e17598
commit
aa383f5a72
|
@ -484,21 +484,8 @@ cEditor.ui = {
|
|||
|
||||
setTimeout(function () {
|
||||
|
||||
var inputs = redactor.querySelectorAll('[contenteditable]');
|
||||
|
||||
for (var key in inputs) {
|
||||
|
||||
/**
|
||||
* querySelectorAll('[contenteditable]') returns object methods like length, keys and so on.
|
||||
* We need to get only DOM elements
|
||||
*/
|
||||
if (cEditor.core.isDomNode(inputs[key])) {
|
||||
elements[key] = inputs[key];
|
||||
}
|
||||
}
|
||||
|
||||
/** Save all inputs in global variable state */
|
||||
cEditor.state.inputs = elements;
|
||||
cEditor.state.inputs = redactor.querySelectorAll('[contenteditable]');
|
||||
|
||||
}, 10);
|
||||
|
||||
|
|
Loading…
Reference in a new issue