This commit is contained in:
@@ -160,7 +160,10 @@ export default {
|
|||||||
"DataListView",
|
"DataListView",
|
||||||
"FilterUnsaved",
|
"FilterUnsaved",
|
||||||
"Heading",
|
"Heading",
|
||||||
"Table"
|
"Table",
|
||||||
|
"InsertLink",
|
||||||
|
"LinkUrl",
|
||||||
|
"LinkText"
|
||||||
],
|
],
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -149,18 +149,30 @@
|
|||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
<v-btn depressed tile @click="openLinkMenu">
|
||||||
<v-menu v-model="linkMenu" :close-on-content-click="false" offset-y>
|
<v-icon>fa-link</v-icon>
|
||||||
<template v-slot:activator="{ on }">
|
</v-btn>
|
||||||
<v-btn depressed tile v-on="on">
|
<v-menu
|
||||||
<v-icon>fa-link</v-icon>
|
min-width="300"
|
||||||
</v-btn>
|
v-model="linkMenu"
|
||||||
</template>
|
:close-on-content-click="false"
|
||||||
|
offset-y
|
||||||
|
:position-x="linkMenuX"
|
||||||
|
:position-y="linkMenuY"
|
||||||
|
absolute
|
||||||
|
>
|
||||||
<v-card width="300">
|
<v-card width="300">
|
||||||
<v-card-title>{{ $ay.t("InsertLink") }}</v-card-title>
|
<v-card-title>{{ $ay.t("InsertLink") }}</v-card-title>
|
||||||
|
|
||||||
<div class="ma-8">
|
<div class="ma-8">
|
||||||
linkUrl linkText
|
<v-text-field
|
||||||
|
v-model="linkUrl"
|
||||||
|
:label="$ay.t('LinkUrl')"
|
||||||
|
></v-text-field>
|
||||||
|
<v-text-field
|
||||||
|
v-model="linkText"
|
||||||
|
:label="$ay.t('LinkText')"
|
||||||
|
></v-text-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
@@ -249,6 +261,8 @@ export default {
|
|||||||
tableMenuColumns: 2,
|
tableMenuColumns: 2,
|
||||||
tableMenuRows: 2,
|
tableMenuRows: 2,
|
||||||
linkMenu: false,
|
linkMenu: false,
|
||||||
|
linkMenuX: 10,
|
||||||
|
linkMenuY: 10,
|
||||||
linkUrl: "",
|
linkUrl: "",
|
||||||
linkText: ""
|
linkText: ""
|
||||||
};
|
};
|
||||||
@@ -598,7 +612,17 @@ export default {
|
|||||||
|
|
||||||
this.replaceSelectedText(t);
|
this.replaceSelectedText(t);
|
||||||
},
|
},
|
||||||
|
openLinkMenu(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.linkMenu = false;
|
||||||
|
this.getSelectedRange();
|
||||||
|
this.linkText = this.getSelectedText();
|
||||||
|
this.linkMenuX = e.clientX;
|
||||||
|
this.linkMenuY = e.clientY;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.linkMenu = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
clickLink() {
|
clickLink() {
|
||||||
this.linkMenu = false;
|
this.linkMenu = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user