@@ -28,32 +28,34 @@ export default {
},
config() {
return {
+ blockAttributes: {default: {tagName: 'p'}},
+ // lang: {bold: this.$strings.ButtonEditorBold}, // this should work but for some reason it doesn't if toolbar.getDefaultHTML is provided
toolbar: {
getDefaultHTML: () => `
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
@@ -65,9 +67,24 @@ export default {
methods: {
trixFileAccept(e) {
e.preventDefault()
- }
+ },
+ blur() {
+ if (this.$refs.input && this.$refs.input.blur) {
+ this.$refs.input.blur()
+ }
+ },
},
mounted() {},
beforeDestroy() {}
}
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/client/components/ui/VueTrix.vue b/client/components/ui/VueTrix.vue
index ace1edd35..f753b1c2d 100644
--- a/client/components/ui/VueTrix.vue
+++ b/client/components/ui/VueTrix.vue
@@ -1,6 +1,6 @@
-
+
@@ -21,6 +21,7 @@ export default {
event: 'update'
},
props: {
+ editorClasses: String, // classes to apply to the editor but not the toolbar
/**
* This prop will put the editor in read-only mode
*/
@@ -224,12 +225,12 @@ export default {
/** Disable toolbar and editor by pointer events styling */
if (editorState) {
this.$refs.trix.toolbarElement.style['pointer-events'] = 'none'
+ this.$refs.trix.toolbarElement.style['display'] = 'none'
this.$refs.trix.contentEditable = false
- this.$refs.trix.style['background'] = '#e9ecef'
} else {
this.$refs.trix.toolbarElement.style['pointer-events'] = 'unset'
+ this.$refs.trix.toolbarElement.style['display'] = 'block'
this.$refs.trix.style['pointer-events'] = 'unset'
- this.$refs.trix.style['background'] = 'transparent'
}
},
overrideConfig(config) {
diff --git a/client/components/widgets/BookDetailsEdit.vue b/client/components/widgets/BookDetailsEdit.vue
index b42082b57..c90f57032 100644
--- a/client/components/widgets/BookDetailsEdit.vue
+++ b/client/components/widgets/BookDetailsEdit.vue
@@ -26,7 +26,7 @@