Skip to content

Commit

Permalink
fix(editor): editorProps, scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
mekery committed May 5, 2020
1 parent 10a60d6 commit 36adc66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = function (ctx) {
'QItemSection',
'QItemLabel',
'QScrollArea',
'QScrollObserver',
'QSeparator',
'QMenu',
'QAvatar',
Expand Down
12 changes: 12 additions & 0 deletions src/components/QuasarTiptap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<o-editor-menu-bubble :editor="editor" :toolbar="editorMenuBubble" :selected-cell-size="selectedCellSize" v-if="editable && showBubble" />

<q-scroll-area ref="editorScroll" class="editor-scroll-area" :class="`view-${pageView}`" v-if="scrollable">
<q-scroll-observer @scroll="onScroll" />
<editor-content class="editor__content o--note-preview note-step-side-editor" :editor="editor" />
</q-scroll-area>
<div v-else>
Expand Down Expand Up @@ -119,6 +120,13 @@ export default {
type: Boolean,
default: false
},
editorProps: {
type: Object,
default: function () {
return {
}
}
},
extensions: {
type: Array,
default: function () {
Expand Down Expand Up @@ -184,6 +192,7 @@ export default {
]
this.editor = new Editor({
editorProps: this.editorProps,
extensions: extensions,
autoFocus: true,
editable: this.editable,
Expand Down Expand Up @@ -276,6 +285,9 @@ export default {
this.editor.clearContent(false)
this.editor.focus()
},
onScroll (scroll) {
this.$emit('scroll', scroll)
},
showSidePanel () {},
onSlideShow () {}
},
Expand Down

0 comments on commit 36adc66

Please sign in to comment.