-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MathML Block #47198
Comments
Hi @EldarAgalarov have you given this plugin a try to add a MathML block? https://wordpress.org/plugins/mathml-block/ I'm not sure enough people would use this block for it to be considered for inclusion in Core; the plugin has only 900 active installs. |
@kathrynwp Yes, I know about such plugins, but I prefer to be plugin-independent as much as possible, so i'm using just Custom HTML block at this moment :) MathML is part of HTML 5 standard so it sounds logical that Math ML Block should exists in the Gutenberg, like Heading, Paragraph, Table, Image blocks. |
Having poked around on a math typesetting block myself, I'll share where I kind of left it off, and unfortunately why I think "MathML" isn't well-suited for core (hopefully "yet"). In short, MathML support in browsers is still somewhat abysmal. @adamsilverstein's block loads after page render to handle this by rendering the MathML via JavaScript; mine did the same thing but stored the generated rendered XML as a data URI to avoid a flash on initial page load (and to avoid pushing the cost of rendering to the client). I would love a core formula block, but I think it'll be complicated by needing to serve a lot of different needs, which is good! Some people want to see a formula-builder UI so all they need to do is click buttons to generate a formula; others want LaTex syntax to quickly enter formulas as text. All that is fine I think, but needs people to do the work, plus it involves pulling in third-party libraries to parse the input formulas or present the UI (unless we want to write and maintain our own formula entry and rendering code). So with the plugin space at least for now it's possible to choose your poison, so to speak, which might be much easier in the meantime than finding something that works for everyone. As I have a personal interest in this I'd be happy to review any code submissions or help guide along the project, but at the moment I'm not likely able to dedicate my time to creating such a block. |
One great feature of the block inserter is the plugin search. If you type in /mathml the inserter will offer up the plugin and let you use it immediately. So using mathml currently is very low friction, although I support the idea of using native mathml support - and browser support is improving. |
Firefox supporting MathML for a long time |
Somewhat related Trac ticket: https://core.trac.wordpress.org/ticket/13340 |
See also #35005. I think this would be interesting inline as well. |
Hi. It would be nice to have support for MathML blocks with basic functionality such as formula size, centering, etc.
Now to insert MathML code the Custom HTML block should be used.
The text was updated successfully, but these errors were encountered: