* [ui] replace editor with pageEditor in doc-edit page.

This commit is contained in:
sunhao
2024-10-16 08:36:45 +08:00
parent 3b8b93220e
commit f2bf5ddbc6
+14 -1
View File
@@ -142,6 +142,11 @@ $handleSubmitForm = <<<'JS'
return false;
}
$(e.target).removeClass('has-changed').find('input[name=status]').val(isDraft ? 'draft' : 'normal');
const pageEditor = $('#docEditor').zui('pageEditor');
if (pageEditor) {
return pageEditor.syncData().then(() => true);
}
}
JS;
@@ -171,7 +176,15 @@ formBase
set::headingActions($headingActions),
set::headingClass('py-3'),
set::bodyClass('p-0 border-t'),
editor
$doc->contentType === 'doc' ? pageEditor
(
set::_id('docEditor'),
set::name('content'),
set::size('auto'),
set::resizable(false),
set::placeholder($lang->noticePasteImg),
set::value($doc->content)
) : editor
(
set::name('content'),
set::size('full'),