Skip to content

Commit ffc635e

Browse files
committed
fix: better ui, word wrap
1 parent 3ad648d commit ffc635e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/components/TextareaCopyable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const props = withDefaults(
1616
language?: string
1717
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
1818
copyMessage?: string
19+
wordWrap?: boolean
1920
}>(),
2021
{
2122
followHeightOf: null,
@@ -47,7 +48,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
4748
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
4849
>
4950
<n-config-provider :hljs="hljs">
50-
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
51+
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
5152
</n-config-provider>
5253
</n-scrollbar>
5354
<div absolute right-10px top-10px>

src/tools/gzip-converter/gzip-converter.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const compressedZlibOutput = computed(() => withDefaultOnError(() => Base64.from
3333
<h3>GZIP compressed string</h3>
3434
<TextareaCopyable
3535
:value="compressedGzipOutput"
36+
:word-wrap="true"
37+
multiline
3638
placeholder="The GZip compressed version of your string will be here"
3739
mb-5
3840
/>
@@ -42,6 +44,8 @@ const compressedZlibOutput = computed(() => withDefaultOnError(() => Base64.from
4244
<h3>Zlib compressed string</h3>
4345
<TextareaCopyable
4446
:value="compressedZlibOutput"
47+
:word-wrap="true"
48+
multiline
4549
placeholder="The Zlib compressed version of your string will be here"
4650
mb-5
4751
/>
@@ -51,6 +55,8 @@ const compressedZlibOutput = computed(() => withDefaultOnError(() => Base64.from
5155
<h3>Deflate compressed string</h3>
5256
<TextareaCopyable
5357
:value="compressedDeflateOutput"
58+
:word-wrap="true"
59+
multiline
5460
placeholder="The Deflate compressed version of your string will be here"
5561
mb-5
5662
/>
@@ -71,6 +77,8 @@ const compressedZlibOutput = computed(() => withDefaultOnError(() => Base64.from
7177
<h3>Decompressed string</h3>
7278
<TextareaCopyable
7379
v-model:value="decompressedOutput"
80+
:word-wrap="true"
81+
multiline
7482
placeholder="The decompressed string will be here"
7583
mb-5
7684
/>

0 commit comments

Comments
 (0)