Skip to content

Commit

Permalink
feat(Tinymce): add dynamics to the read-only state of the rich text e…
Browse files Browse the repository at this point in the history
…ditor (#725)

*富文本目前只支持初始化配置,本次增加了只读状态动态设置,只需更改readonly的值
  • Loading branch information
lzdjack authored Jun 7, 2021
1 parent bcad95d commit efce482
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Tinymce/src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@
const disabled = computed(() => {
const { options } = props;
const getdDisabled = options && Reflect.get(options, 'readonly');
const editor = unref(editorRef);
if (editor) {
editor.setMode(getdDisabled ? 'readonly' : 'design');
}
return getdDisabled ?? false;
});
Expand Down

0 comments on commit efce482

Please sign in to comment.