2023-05-25 14:19:48 +00:00
|
|
|
<script>
|
|
|
|
import BaseComponent from 'primevue/basecomponent';
|
2023-10-02 10:46:09 +00:00
|
|
|
import EditorStyle from 'primevue/editor/style';
|
2023-05-25 14:19:48 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'BaseEditor',
|
|
|
|
extends: BaseComponent,
|
|
|
|
props: {
|
|
|
|
modelValue: String,
|
|
|
|
placeholder: String,
|
|
|
|
readonly: Boolean,
|
|
|
|
formats: Array,
|
|
|
|
editorStyle: null,
|
|
|
|
modules: null
|
|
|
|
},
|
2023-10-02 10:46:09 +00:00
|
|
|
style: EditorStyle,
|
2023-05-30 11:06:57 +00:00
|
|
|
provide() {
|
|
|
|
return {
|
2024-04-25 01:26:06 +00:00
|
|
|
$pcEditor: this,
|
2023-05-30 11:06:57 +00:00
|
|
|
$parentInstance: this
|
|
|
|
};
|
2023-08-22 13:48:00 +00:00
|
|
|
},
|
|
|
|
beforeMount() {
|
2023-10-02 10:46:09 +00:00
|
|
|
EditorStyle.loadStyle({ nonce: this.$primevue?.config?.csp?.nonce });
|
2023-05-25 14:19:48 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|