Skip to content
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

Integration with Outline's rich-markdown-editor #32

Open
Sadashii opened this issue Dec 27, 2021 · 12 comments
Open

Integration with Outline's rich-markdown-editor #32

Sadashii opened this issue Dec 27, 2021 · 12 comments
Labels
integration For compatibility with another framework / library. question Further information is requested

Comments

@Sadashii
Copy link

How do I integrate prose mirror math?

@benrbray
Copy link
Owner

Are you using ProseMirror? Please take a look at the README file for instructions. You can also see a usage example in the docs-src/ folder.

@Sadashii
Copy link
Author

Are you using ProseMirror? Please take a look at the README file for instructions. You can also see a usage example in the docs-src/ folder.

My bad sorry, I meant how do I integrate it in rich markdown editor

I've gone through a lot of issues and pages but didn't get it tbf

@benrbray
Copy link
Owner

prosemirror-math is a plugin for the ProseMirror rich text editor. It will only work if you are already using ProseMirror. Are you developing an application with ProseMirror?

@Sadashii
Copy link
Author

I have an application making the use of rich markdown editor (https://github.com/outline/rich-markdown-editor) which is a prose mirror based editor and since prose mirror math is a plugin, I wanted to integrate this into my rich markdown editor although after reading a lot of articles/issues I wasn't able to.

@benrbray
Copy link
Owner

The example code here should be all you need to know to integrate this plugin with your ProseMirror instance. I'm not familiar with Outline, so it's possible that prosemirror-math is not compatible with the Outline editor.

@benrbray benrbray added the question Further information is requested label Dec 29, 2021
@Sadashii
Copy link
Author

Oh, uhh, thanks again for the time in that case

@dominiczy
Copy link

dominiczy commented Dec 29, 2021

@Sadashii @benrbray I'm trying to do exactly the same, integrating this in Rich Markdown Editor (https://github.com/outline/rich-markdown-editor).

Tom has already done some good work here outline/rich-markdown-editor#434.

But I can't get hydrating from markdown (e.g. persisting saved equations) to work. Loading markdown with $ delimited equations results in empty math blocks

Help really appreciated, could we please keep this open?

@benrbray
Copy link
Owner

Oh, I get it now, thank you @dominiczy for clarifying the question. I'll reopen the issue.

Contributions are very welcome to improve integration with other tools. I'd also be interested to hear how I can improve prosemirror-math to work in the collaborative setting. I'd be willing to help with this integration, but I'll need to learn more about Outline's rich-markdown-editor first, which I might not have time for until late January.

In the meantime I'm happy to answer any specific questions you might have as you try to get this working.

@benrbray benrbray reopened this Dec 29, 2021
@dominiczy
Copy link

Not sure if this is going to help you, but there'a toDOM function in here (outline/rich-markdown-editor@25bfb19#diff-f8961edc2956977c3248eee0dbfb4f591c9a9dacaf9d2e748d314fde230f0f06R59) which should parse existing equations within the markdown and show them in the DOM, however when debugging the code it seems this is never called, which is probably part of the reason the equations aren't loaded. I don't understand the code deeply enough to make much progress though.

rich-markdown-editor powers our app Traverse.link, and being able to insert Latex within the markdown would be a game changer, helping people learn math, data science etc.
Really awesome to hear you'd be willing to help with the integration - I'd also be happy to pay to get it prioritized

@benrbray benrbray added the integration For compatibility with another framework / library. label Dec 29, 2021
@benrbray benrbray changed the title Prosemirror math integration Integration with Outline's rich-markdown-editor Dec 29, 2021
@Sadashii
Copy link
Author

Sadashii commented Jan 5, 2022

@dominiczy im not sure if I'll be much help since ts isn't really my thing, logic is but is it possible we could have a chat like maybe discord (Sadashi#8370) or such on this topic? I'd love to be able to help with this since having prosemirror math work would be amazing for us as well

@dominiczy
Copy link

@Sadashii I've sent you a request (my username is dominic#7254), I'll tell you where I'm at (I'm also not very experienced in prosemirror/markdown-it etc) and then we can figure it out together :)

@dominiczy
Copy link

I've fixed the basic integration, see my comment outline/rich-markdown-editor#434 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration For compatibility with another framework / library. question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants