mirror of
https://github.com/codex-team/editor.js
synced 2024-06-27 09:50:05 +02:00
quote modifications
This commit is contained in:
parent
48438d456e
commit
6e88738c9b
|
@ -422,7 +422,23 @@ var quote = (function(quote) {
|
||||||
data.size = 'small';
|
data.size = 'small';
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(data);
|
var wrapper = document.createElement('DIV');
|
||||||
|
wrapper.innerHTML = data.text;
|
||||||
|
|
||||||
|
var child;
|
||||||
|
|
||||||
|
for (child = 0; child < wrapper.childNodes.length; child++) {
|
||||||
|
// is TEXT node ?
|
||||||
|
if (wrapper.childNodes[child].nodeType === 3) {
|
||||||
|
|
||||||
|
var paragraph = document.createElement('P');
|
||||||
|
paragraph.innerHTML = wrapper.childNodes[child].textContent;
|
||||||
|
|
||||||
|
wrapper.childNodes[child].replaceWith(paragraph);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
data.text = wrapper.innerHTML;
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue