Merge pull request #1973 from burakcakirel/readonly-html-editor

Add readonly attribute for text editor
This commit is contained in:
Cüneyt Şentürk 2021-04-08 10:28:18 +03:00 committed by GitHub
commit db099d64eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -37,6 +37,10 @@ export default {
type: String,
default: 'snow'
},
readonly: {
type: Boolean,
default: false
},
},
data () {
@ -58,7 +62,8 @@ export default {
theme: theme,
modules: {
toolbar: `#${this.toolbarId}`
}
},
readOnly: this.readonly
});
if (this.editorValue.length > 0) {

View File

@ -31,6 +31,10 @@
@if (isset($attributes['disabled']))
:disabled="{{ $attributes['disabled'] }}"
@endif
@if (isset($attributes['readonly']))
:readonly="{{ $attributes['readonly'] }}"
@endif
></akaunting-html-editor>
<div class="invalid-feedback d-block"