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

Preview panel support #28

Open
Saul-Mirone opened this issue Aug 18, 2021 · 4 comments · May be fixed by #29
Open

Preview panel support #28

Saul-Mirone opened this issue Aug 18, 2021 · 4 comments · May be fixed by #29
Labels
enhancement New feature or request

Comments

@Saul-Mirone
Copy link
Contributor

Hi Benrbary:

Milkdown uses this awesome project and we have some feed back from users. It would be great if this library can support the preview panel feature like in typora:

image

I tried to just display the render block when math node is selected, but it seems that it won't update when user editing.
So I think maybe it should be supported in this library.

original issue:
Milkdown/milkdown#91

@Saul-Mirone
Copy link
Contributor Author

I think the key is to provide a option to make this check pass even when is editing nodes.
https://github.com/benrbray/prosemirror-math/blob/master/src/math-nodeview.ts#L162

@benrbray
Copy link
Owner

Thanks for the suggestion! This feature has been in the back of my mind for a while. I'll see if I can put something together soon!

@benrbray benrbray linked a pull request Aug 23, 2021 that will close this issue
3 tasks
@benrbray
Copy link
Owner

I started a PR that adds preview support for block math! Inline math might be trickier. The preview pane I implemented appears above the editor pane, rather than below like Typora. Can you think of any reason to prefer one choice over the other? Showing it above is nice because the rendered math stays in the same place, rather than jumping downwards.

@Saul-Mirone
Copy link
Contributor Author

Saul-Mirone commented Aug 23, 2021

@benrbray
Wow, that looks awesome. In fact I also prefer the preview pane above the editor, I think it's more convenient to use.

@benrbray benrbray added the enhancement New feature or request label Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants