Skip to content

Commit

Permalink
Merge pull request #2427 from samvera/codemirror-custom-css-editor-fix
Browse files Browse the repository at this point in the history
🐛 refresh CodeMirror editor when CSS tab is shown
  • Loading branch information
kirkkwang authored Jan 22, 2025
2 parents 984c237 + acaaf6a commit 8b319ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/views/hyrax/admin/appearances/_custom_css_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
theme: 'base16-light',
autoRefresh: true
});

// refresh the editor when the tab is shown
jQuery('[href="#css"]').on('shown.bs.tab', function() {
editor.refresh();
});
</script>
</div>
<div class="card-footer">
Expand Down

0 comments on commit 8b319ca

Please sign in to comment.