Skip to content

Phoenix Code alters MathJax markup using Live Preview Edit Mode #2718

@PunyTRexArms

Description

@PunyTRexArms

Describe the bug

When MathJax is present within an HTML element, Phoenix Code alters the source markup substantially when using Live Preview Edit Mode. For example, the markup <label>Density $\rho$:</label> is changed by Phoenix Code to

<label>Density <mjx-container class="MathJax" jax="CHTML" style="font-size: 104.7%; position: relative;"><mjx-math class="MJX-TEX" aria-hidden="true"><mjx-mi class="mjx-i"><mjx-c class="mjx-c1D70C TEX-I"></mjx-c></mjx-mi></mjx-math><mjx-assistive-mml unselectable="on" display="inline"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>ρ</mi></math></mjx-assistive-mml></mjx-container>:</label>

when the content of the label is edited using Live Preview Edit Mode.

Reproduction

Render some MathJax within an HTML element, then edit the content using Live Preview Edit Mode in either Firefox or the native Live Preview Mode. Now click back to the source markup.

Expected behavior

For example, the markup $\rho$ in <label>Density $\rho$:</label> should be unaltered unless explicitly done so by the user.

OS, Browser and Phoenix versions

OS: Ubuntu
Device: Laptop
Browser: Firefox
Version: Release 5.0 build 5.0.5-21948

logs or debug stack trace if any

Additional context

This is not a show-stopper by any means, just wanted to alert the developers of this behavior.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions