//editor为空会获取 <p><br/></p>使表单为空校验不通过,需要清空
function withEmptyHtml(editor) {
const { getHtml } = editor;
const newEditor = editor;
newEditor.getHtml = () => {
if (newEditor.isEmpty()) {
return "";
}
return getHtml();
};
return newEditor;
}
Boot.registerPlugin(withEmptyHtml);
wangeditor富文本编辑器表单校验为空不通过 解决方法
最新推荐文章于 2024-09-04 11:38:02 发布