Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NetCommons3/Wysiwyg
Browse files Browse the repository at this point in the history
  • Loading branch information
otokomae committed Mar 16, 2016
2 parents 3daedb3 + f38aa17 commit a951385
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions View/Elements/mathjax_js.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,31 @@
* @license http://www.netcommons.org/license.txt NetCommons License
*/

// skipStartupTypeset: true によって MathJaxの自動読み込みを無効にする
echo $this->Html->scriptStart(array('inline' => false, 'type' => 'text/x-mathjax-config'));
?>
MathJax.Hub.Config({
skipStartupTypeset: true
});

<?php
echo $this->Html->scriptEnd();

// wysiwyg呼び出し
echo $this->NetCommonsHtml->script(
array(
'/components/MathJax/MathJax.js?config=TeX-MML-AM_CHTML',
)
);
?>

<?php
// nc-system-{header | main | footer} 要素に対して
// MathJax の実行を行う
//
echo $this->Html->scriptStart(array('inline' => false));
?>
$(document).ready(function(){
MathJax.Hub.Queue(["Typeset", MathJax.Hub, 'nc-container']);
});
<?php echo $this->Html->scriptEnd();

0 comments on commit a951385

Please sign in to comment.