From ed08b85c2540d317b9de5b52da28c7eea0e3a030 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 26 Feb 2025 17:48:02 -0600 Subject: [PATCH] Fix that `remote-auto-save` loses markdown formatting by using local `autosave` --- app/views/bubbles/show.html.erb | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/views/bubbles/show.html.erb b/app/views/bubbles/show.html.erb index 6f6bb4e5b..79a0e9172 100644 --- a/app/views/bubbles/show.html.erb +++ b/app/views/bubbles/show.html.erb @@ -103,9 +103,21 @@ <% else %>
-
- <%= tag.house_md @bubble.draft_comment, name: "bubble[draft_comment]", class: "input comment__input", form: "bubble_form", placeholder: new_comment_placeholder(@bubble), - data: { action: "house-md:change->remote-auto-save#change focusout->remote-auto-save#submit", uploads_url: uploads_url(format: "json") } %> + + <%= tag.house_md @bubble.draft_comment, + name: "bubble[draft_comment]", + class: "input comment__input", + form: "bubble_form", + placeholder: new_comment_placeholder(@bubble), + data: { + autosave_target: "input", + action: "house-md:change->remote-auto-save#change house-md:change->autosave#save focusout->remote-auto-save#submit", + uploads_url: uploads_url(format: "json") + } %>