Skip to content

Commit

Permalink
feat(editor): image extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mekery committed Apr 21, 2020
1 parent c1d7cbd commit a9e9be1
Show file tree
Hide file tree
Showing 13 changed files with 667 additions and 7 deletions.
1 change: 1 addition & 0 deletions quasar.conf.js
Expand Up @@ -48,6 +48,7 @@ module.exports = function (ctx) {
'QTooltip',
'QBtn',
'QBtnDropdown',
'QBtnToggle',
'QIcon',
'QList',
'QItem',
Expand Down
3 changes: 2 additions & 1 deletion src/components/QuasarTiptap.vue
Expand Up @@ -47,7 +47,7 @@ import {
Focus,
HorizontalRule,
TrailingNode,
Image
// Image
} from 'tiptap-extensions'
import java from 'highlight.js/lib/languages/java'
Expand All @@ -73,6 +73,7 @@ import {
OKatexInline,
OFormatClear,
OPrint,
OImage,
RecommendedExtensions
} from 'src/extentions'
Expand Down
9 changes: 8 additions & 1 deletion src/components/menubars/OEditorMenuBubble.vue
@@ -1,7 +1,10 @@
<template>
<editor-menu-bubble :editor="editor" v-slot="editorContext">
<section class="tiptap-menububble"
:class="{ 'is-active': editorContext.menu.isActive && selectedCellSize === 0 }"
:class="{ 'is-active': editorContext.focused &&
editorContext.menu.isActive &&
selectedCellSize === 0 &&
!editorContext.isActive.image() }"
:style="`left: ${editorContext.menu.left}px; bottom: ${editorContext.menu.bottom + 8}px;`">
<template v-for="(item, index) of bubbleToolbar">
<q-separator vertical inset :key="index" v-if="item==='separator'" />
Expand Down Expand Up @@ -63,6 +66,10 @@ export default {
selectedCellSize: {
type: Number,
default: 0
},
imgSelected: {
type: Boolean,
default: false
}
},
components: {
Expand Down

0 comments on commit a9e9be1

Please sign in to comment.