Skip to content

Commit

Permalink
Revert html body part's wysiwyg toolbar to be always visible (#2905)
Browse files Browse the repository at this point in the history
Fixes #2634
  • Loading branch information
matiasmolleja authored and sebastienros committed Dec 19, 2018
1 parent d8a6e9b commit 74c5763
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,8 @@

<script at="Foot">
$(function () {
var editor = $('#@Html.IdFor(m => m.Source)').trumbowyg();
editor.on('tbwchange', function () {
$('#@Html.IdFor(m => m.Source)').trumbowyg().on('tbwchange', function () {
$(document).trigger('contentpreview:render');
});
// hide toolbar when editor is not in focus (to avoid z-index clashes with dropdown components that may be on the page)
(function toolbarToggler() {
function getButtonPane(textarea) {
return $(textarea).siblings('.trumbowyg-button-pane');
}
editor.on('tbwfocus', function () { getButtonPane(this).fadeIn(); });
editor.on('tbwblur', function () { getButtonPane(this).fadeOut(); });
// hide initially
editor.siblings('.trumbowyg-button-pane').css("display", "none");
}());
});
</script>

0 comments on commit 74c5763

Please sign in to comment.