* [ui] replace editor with pageEditor in doc-edit page.
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user