Skip to content

Commit

Permalink
Merge pull request #8045 from fjordllc/bug/textarea_image_format_mark…
Browse files Browse the repository at this point in the history
…down_to_htmltag_href

textarea に画像をアップロードしたときのプレビュー画面に表示された画像をクリックすると、別タブで開かれるようにしました
  • Loading branch information
komagata authored Sep 12, 2024
2 parents ec02527 + b9bf27c commit ad910a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/javascript/textarea-initializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class {
csrfToken: CSRF.getToken(),
placeholder: '%filenameをアップロード中...',
uploadImageTag:
'<img src="%url" width="%width" height="%height" loading="lazy" decoding="async" alt="%filename">\n',
'<a href="%url" target="_blank" rel="noopener noreferrer"><img src="%url" width="%width" height="%height" alt="%filename"></a>\n',
afterPreview: () => {
autosize.update(textarea)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"sweetalert2": "^11.1.5",
"swr": "^1.3.0",
"tailwindcss": "^3.1.8",
"textarea-markdown": "^1.6.0",
"textarea-markdown": "^1.6.1",
"tributejs": "^5.1.3",
"use-sync-external-store": "^1.2.0",
"vue": "^2.6.10",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8961,10 +8961,10 @@ text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==

textarea-markdown@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/textarea-markdown/-/textarea-markdown-1.6.0.tgz#1689a8beaf17b0b11a440dfbebd4649ba3158018"
integrity sha512-cF4Xh54cu30fb+8a/SaN+r2ol0N8O9m5TKkxiGf7Cvv87FT4WfcQLWGanuwhKCdrZFjf7Vgv5X3XwpefVl8/gw==
textarea-markdown@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/textarea-markdown/-/textarea-markdown-1.6.1.tgz#8b9483c29dc09f0923ca8c5754dd6f5f07344032"
integrity sha512-Dgj4vbPcji6WkXQLIHqr1jgSpK52hZbO6KSylnBOfpbEOqxTD3jaQCO7+EK/+7o6IbSm+wXQqcZRnv22E1+Neg==
dependencies:
file-type "^16.5.4"
filesize "^10.0.5"
Expand Down

0 comments on commit ad910a0

Please sign in to comment.