ydsad
This commit is contained in:
@@ -15,7 +15,24 @@
|
|||||||
|
|
||||||
static serializeHtml(editor) {
|
static serializeHtml(editor) {
|
||||||
if (!editor || typeof editor.getHtml !== 'function') return '';
|
if (!editor || typeof editor.getHtml !== 'function') return '';
|
||||||
let html = editor.getHtml();
|
let html = editor.getHtml() || '';
|
||||||
|
if (!html) {
|
||||||
|
try {
|
||||||
|
const wrapper = editor.getWrapper && editor.getWrapper();
|
||||||
|
if (wrapper && typeof wrapper.toHTML === 'function') {
|
||||||
|
html = wrapper.toHTML();
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
if (!html) {
|
||||||
|
try {
|
||||||
|
const wrapper = editor.getWrapper && editor.getWrapper();
|
||||||
|
const el = wrapper && wrapper.view && wrapper.view.el ? wrapper.view.el : null;
|
||||||
|
if (el && el.innerHTML) {
|
||||||
|
html = String(el.innerHTML || '');
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const wrapper = editor.getWrapper && editor.getWrapper();
|
const wrapper = editor.getWrapper && editor.getWrapper();
|
||||||
if (wrapper && wrapper.find) {
|
if (wrapper && wrapper.find) {
|
||||||
|
|||||||
Reference in New Issue
Block a user