outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 589 forks source link

fix: allow / to be used anywhere, not just a new line #414

Open iamsaumya opened 3 years ago

iamsaumya commented 3 years ago

fixes #218

iamsaumya commented 3 years ago

Hey Tom, Please review this PR whenever you get some time. I don't have much confidence in the PR because I don't understand the codebase yet.

tommoor commented 3 years ago

This allows the menu to be triggered but the issue is more nuanced as previously it expects the current paragraph to be empty, using the same logic on a paragraph or other node that contains content will wipe it away or attempt to insert things in invalid locations.

There just needs to be some care about ensuring that the block insertion works as expected without losing any content whereever it's called from. The hovering menu itself also needs to be visually positioned next to the "/".