From e22fb070bf9edb713fb06f3e1cfba6767d8c0c29 Mon Sep 17 00:00:00 2001 From: Adam DeHaven Date: Tue, 19 Dec 2023 22:02:32 -0500 Subject: [PATCH] fix: insert text --- src/components/MarkdownUi.vue | 2 +- src/composables/useMarkdownActions.ts | 2 +- src/composables/useMarkdownIt.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/MarkdownUi.vue b/src/components/MarkdownUi.vue index 73528f19..e1df9ca2 100644 --- a/src/components/MarkdownUi.vue +++ b/src/components/MarkdownUi.vue @@ -466,7 +466,7 @@ const markdownEditorMaxHeight = computed((): string => `${props.editorMaxHeight} max-width: 100%; outline: none; padding: var(--kui-space-40, $kui-space-40) var(--kui-space-50, $kui-space-50); - resize: vertical; + resize: none; text-wrap: wrap; transition: box-shadow 0.2s ease-in-out; width: 100%; diff --git a/src/composables/useMarkdownActions.ts b/src/composables/useMarkdownActions.ts index 36355742..79a06ae8 100644 --- a/src/composables/useMarkdownActions.ts +++ b/src/composables/useMarkdownActions.ts @@ -94,7 +94,7 @@ export default function useMarkdownActions( } // If no element or wrapper, exit early - if (!textarea || !wrapper || document.activeElement !== textarea) { + if (!textarea || !wrapper) { return } diff --git a/src/composables/useMarkdownIt.ts b/src/composables/useMarkdownIt.ts index 214643ad..7f3f5aba 100644 --- a/src/composables/useMarkdownIt.ts +++ b/src/composables/useMarkdownIt.ts @@ -63,6 +63,7 @@ export default function useMarkdownIt(theme: 'light' | 'dark' = 'light') { .use(superscript) .use(tasklists, { label: true, + enabled: false, // Not enabled since checking the box doesn't update the markdown }) // disable converting email to link