Commit b9c9948f authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'copy-markdown-snippet' into 'master'

Fixes issue with markdown snippet not being copyable

On markdown snippets this adds a hidden div with the raw markdown content so that it can be copied

Closes #13882

See merge request !3153
parents 198926dc 704f4683
...@@ -28,3 +28,11 @@ ...@@ -28,3 +28,11 @@
border: 1px solid; border: 1px solid;
line-height: 32px; line-height: 32px;
} }
.markdown-snippet-copy {
position: fixed;
top: -10px;
left: -10px;
max-height: 0;
max-width: 0;
}
- unless @snippet.content.empty? - unless @snippet.content.empty?
- if markup?(@snippet.file_name) - if markup?(@snippet.file_name)
%textarea.markdown-snippet-copy.blob-content{data: {blob_id: @snippet.id}}
= @snippet.data
.file-content.wiki .file-content.wiki
= render_markup(@snippet.file_name, @snippet.data) = render_markup(@snippet.file_name, @snippet.data)
- else - else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment