From 2eba3a18285387478a0961ea63ee0ceeea1cdcd2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 19 Apr 2020 19:41:50 +0000 Subject: [PATCH] --- ayanova/src/components/wiki-control.vue | 110 +++++++++++++----------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/ayanova/src/components/wiki-control.vue b/ayanova/src/components/wiki-control.vue index 8f27142e..5f565d15 100644 --- a/ayanova/src/components/wiki-control.vue +++ b/ayanova/src/components/wiki-control.vue @@ -212,42 +212,44 @@ > {{ $ay.t("InsertImage") }} -
- - URL - {{ $ay.t("Attachments") }} -
- -
-
- - -
+
+ @@ -256,9 +258,12 @@ {{ $ay.t("Cancel") }} - {{ - $ay.t("OK") - }} + {{ $ay.t("OK") }}
@@ -362,6 +367,7 @@ export default { linkUrl: "", linkText: "", imageMenu: false, + imageTab: null, imageUrl: "", imageText: "", selectedImageAttachment: null @@ -727,24 +733,28 @@ export default { case "image": //![alttexthere](https://www.ayanova.com/images/AyaNovaIcon256.png "title text here (tooltip)") { - //todo: ATTACHEDFILEMODE - this.imageMenu = false; - let url = this.imageUrl; - if (!url) { - return; - } - let txt = this.imageText; - //force it to a full url so it doesn't attempt to open it as a SPA window - if (!url.includes(":")) { - url = "https://" + url; - } - - if (txt) { - this.replaceSelectedText( - "![" + txt + "](" + url + ' "' + txt + '") \n' + txt //keep original selected text otherwise it will vanish - ); + if (ex == 1) { + throw "Attachment mode TODO"; + //todo: ATTACHEDFILEMODE//attached file mode? } else { - this.replaceSelectedText("![](" + url + ")"); + this.imageMenu = false; + let url = this.imageUrl; + if (!url) { + return; + } + let txt = this.imageText; + //force it to a full url so it doesn't attempt to open it as a SPA window + if (!url.includes(":")) { + url = "https://" + url; + } + + if (txt) { + this.replaceSelectedText( + "![" + txt + "](" + url + ' "' + txt + '") \n' + txt //keep original selected text otherwise it will vanish + ); + } else { + this.replaceSelectedText("![](" + url + ")"); + } } } break;