Skip to content

Commit

Permalink
Bugfix: tinymce code syntax higlight - no color was present on note c…
Browse files Browse the repository at this point in the history
…reate via widget, or upon page load via ajax
  • Loading branch information
Volmarg committed Mar 22, 2020
1 parent 6578bee commit e32ff86
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/assets/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/app.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/assets/scripts/prism/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ export default (function () {
this.highlightCode();
},
highlightCode: function(){
let $codeElements = $('code[class^="language-"]');
$.each($codeElements, function(index, codeElement){
let $codeElements = $('code[class^="language-"]');
let $tinyMceCodeElements = $('#tiny-mce-wrapper code');
let $allElements = $.merge($codeElements, $tinyMceCodeElements);

$.each($allElements, function(index, codeElement){
Prism.highlightElement(codeElement);
});
}
Expand Down
4 changes: 4 additions & 0 deletions src/scss/libs/customization-for-liblaries/tinymce.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@
a{
word-break:break-all; // this fixes links thata are to long and therefore are being pushed out of modal
}

code {
background-color: white;
}
}

0 comments on commit e32ff86

Please sign in to comment.