Skip to content

Commit

Permalink
correct mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
smmercuri committed Nov 7, 2023
1 parent 8a53c1f commit 1e35e17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stack/cas/castext2/blocks/parsons.block.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public function compile($format, $options): ? MP_Node {
new MP_String('script'),
new MP_String(json_encode(['type' => 'text/javascript', 'src' => $js]))
]);*/
$resizeScript = '<script type="text/javascript">' . "\n";
/*$resizeScript = '<script type="text/javascript">' . "\n";
$resizeScript .= 'function resizeIframe(iframe) {' . "\n";
$resizeScript .= 'iframe.height = iframe.contentWindow.document.body.scrollHeight + "px";}' . "\n";
$resizeScript .= '</script>';
$resizeScript .= '</script>';*/

// We need to define a size for the inner content.
$width = '100%';
Expand Down Expand Up @@ -209,7 +209,7 @@ public function compile($format, $options): ? MP_Node {
$code .= 'sortable.generate_available(proofSteps);' . "\n";

if (count($inputs) > 0) {
//$code .= 'MathJax.typesetPromise();' . "\n";
$code .= 'MathJax.typesetPromise();' . "\n";
};
$code .= 'var opts = {...sortable.options, ...{onSort: () => {sortable.update_state(sortableUsed, sortableAvailable);}}}' . "\n";
$code .= 'var sortableUsed = Sortable.create(usedList, opts);' . "\n";
Expand Down

0 comments on commit 1e35e17

Please sign in to comment.