benrbray / prosemirror-math

Schema and plugins for "first-class" math support in ProseMirror!
https://benrbray.com/prosemirror-math/
MIT License
249 stars 35 forks source link

Is there a demo available that can be used to test this functionality? #7

Closed episanty closed 3 years ago

episanty commented 3 years ago

Hi!

This software has been mentioned by Stack Exchange developers as one possible option that they might incorporate into their new text editor.

Is there a demo version (say, like the KaTeX demo) where one can try out the editing style provided by prosemirror-math without requiring any user-side installation?

(If not, it would be very useful!)

benrbray commented 3 years ago

Thanks for reaching out! I don't currently have an easy-to-access demo hosted anywhere, but I will aim to set one up sometime this week since there is some interest.

I will say that this repository is more of a proof-of-concept than a production-ready library. The code is relatively short (a big chunk of it is boilerplate), and anyone familiar with ProseMirror should be able to easily modify my example to suit their needs.

I initially created prosemirror-math to be used for an Electron app I'm working on, which is the reason I haven't tested thoroughly in FireFox / Safari / etc. The fundamental approach is platform-independent, but since prosemirror is based on contenteditable, which is notorious for having no consistent behavior across browsers, there may be some platform-specific rendering and user experience issues to iron out. I'm confident that a smooth cross-browser is possible, with a bit of elbow grease.

In the linked discussion, I also see some questions about KaTeX vs MathJax. I chose KaTeX for performance and ease-of-setup, but it would certainly be possible to use MathJax instead.

I'll update in a few days with a demo!

benrbray commented 3 years ago

It's been more than "a few days", but you can finally see a live demo here! If you notice any bugs or unexpected behavior, please file a bug report!

http://benrbray.com/prosemirror-math/

episanty commented 3 years ago

Thanks for this!

I've posted an announcement on Physics Stack Exchange and on MathOverflow

https://physics.meta.stackexchange.com/questions/13488/how-acceptable-is-prosemirror-math-as-an-editor-style-for-this-site https://meta.mathoverflow.net/questions/4945/how-acceptable-is-prosemirror-math-as-an-editor-style-for-this-site

I hope they produce useful feedback!