Uploaded image for project: 'MathJax Macro'
  1. MathJax Macro
  2. MATHJAX-26

Some MathJax formulas break the WYSIWYG editor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Solved By
    • Major
    • None
    • 1.1.3
    • None
    • Unknown

    Description

      The following MathJax macro breaks the standalone WYSIWYG editor if the "Load JavaScript Skin Extensions" configuration is enabled:

      {{mathjax}}
      \begin{equation}
      N_{i_r j k+1} = \prod_{0<= i <= k} \left(1 +r_{j i} \left(t_{i+1}-t_i\right) \right)
      \end{equation}
      {{/mathjax}}
      

      The content is lost when switching to Source or saving. The problem seems to be that when the MathJax macro is rendered some CSS is injected in the HEAD of the document from the iframe used by the editor. This CSS contains unescaped '<' less than symbol, which is valid AFAIK, so this much be a CKEditor bug.

      <style id="MJX-CHTML-styles">
      ...
      mjx-c.mjx-c3C::before {
        padding: 0.54em 0.778em 0.04em 0;
        content: "<";
      }
      ...
      </style>
      

      I reported XWIKI-21803 on the platform side.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: