feat: Insert text at cursor for caption
This commit is contained in:
parent
e2dbed7ec7
commit
7e076cff75
3 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "13.0.0",
|
||||
"version": "13.0.1",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||
import { length } from 'stringz';
|
||||
import * as os from '@/os';
|
||||
import MkModal from '@/components/MkModal.vue';
|
||||
|
@ -147,7 +148,7 @@ export default defineComponent({
|
|||
os.api('drive/files/caption-image', {
|
||||
url: img.src,
|
||||
}).then(text => {
|
||||
ta.value += text.slice(0, (512 - ta.value.length));
|
||||
insertTextAtCursor(text.slice(0, (512 - ta.value.length)));
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { watch } from 'vue';
|
||||
import * as misskey from 'calckey-js';
|
||||
import type * as misskey from 'calckey-js';
|
||||
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
|
||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||
import { defaultStore } from '@/store';
|
||||
|
|
Loading…
Reference in a new issue