Skip to content

Commit

Permalink
Fix missing Latex preview in the annotation modal.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodo161 committed Sep 27, 2023
1 parent 16f09dc commit ec4fab0
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions app/views/annotations/edit.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -137,38 +137,35 @@ function updatePreview() {
var text = document.getElementById('annotation_comment').value;
$('#annotation-modal-preview').empty();
$('#annotation-modal-preview').append(text.replaceAll('\n', '<br>'));
/*renderMathInElement document.getElementById('annotation-modal-preview'),
renderMathInElement(document.getElementById('annotation-modal-preview'), {
delimiters: [
{
left: '$$'
right: '$$'
left: '$$',
right: '$$',
display: true
}
{
left: '$'
right: '$'
}, {
left: '$',
right: '$',
display: false
}
{
left: '\\('
right: '\\)'
}, {
left: '\\(',
right: '\\)',
display: false
}
{
left: '\\['
right: '\\]'
}, {
left: '\\[',
right: '\\]',
display: true
}
]
throwOnError: false*/
],
throwOnError: false
});
}



/*
* Auxiliary methods
*/

function visibleForTeacher(boolean) {
$('#annotation_visible_for_teacher').prop("checked", boolean);
}
Expand Down

0 comments on commit ec4fab0

Please sign in to comment.