This commit is contained in:
2020-04-19 19:25:36 +00:00
parent 202526b97e
commit be3126136f

View File

@@ -237,7 +237,7 @@
item-text="name" item-text="name"
item-value="id" item-value="id"
></v-select> ></v-select>
<!-- <!--
<v-file-input <v-file-input
:label="$ay.t('AttachFile')" :label="$ay.t('AttachFile')"
prepend-icon="fa-paperclip" prepend-icon="fa-paperclip"
@@ -712,6 +712,9 @@ export default {
{ {
this.linkMenu = false; this.linkMenu = false;
let url = this.linkUrl; let url = this.linkUrl;
if (!url) {
return;
}
//force it to a full url so it doesn't attempt to open it as a SPA window //force it to a full url so it doesn't attempt to open it as a SPA window
if (!url.includes(":")) { if (!url.includes(":")) {
url = "https://" + url; url = "https://" + url;
@@ -722,10 +725,31 @@ export default {
} }
break; break;
case "image": case "image":
throw "IMAGE LINK NOT IMPLEMENTED"; //![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
);
} else {
this.replaceSelectedText("![](" + url + ")");
}
}
break; break;
default: default:
throw "NOT IMPLEMENTED"; throw editType + " NOT IMPLEMENTED";
break; break;
} }