Can you please directly me to the code for the “examples”? I’m trying to integrate Prose into an existing component and it would be very helpful to see the full html and JavaScript in the example. Thank you..
This is a good start: https://codepen.io/JessieWooten/pen/wYObEX
I did not find in the codepen.io css/editor.css file in any of the main npm pacakges. The layout was very off without this css/editor.css file.
Also, it is not clear to me what is the best way to get data in and out of the editor. That seems pretty important. It is saying something about immutable state so I’ll probably go directly to the DOM. I’m really guessing. And, there is html sanitation and security. All that would make for a very good example, things that nearly everyone needs.
And for data in / out if markdown is a good fit: GitHub - marekdedic/prosemirror-unified: ProseMirror Unified integration
What is your question and what do you want?
I ended up documenting my progress and set it aside. I see you have made progress with the example configuration but still a lot to learn. I still have Prose Mirror as something that is probably the best way to go!
I have it in mind to support MDX and a toolbar in markdown view. I’ll just budget to have more time for this and get back to it when I can or as examples come up that can put a more of the puzzle together.
The ideal editor I have in mind so far:
- Shared toolbar features between WYSIWYG and Markdown
- Be able to handle formats it does not understand like Markdown XML (MDX)
- Have a way to sync the cursor between the two views so plugins can provide
- good end-user experience of not having to scroll when switching (toggle in small view-ports) or scrolling (side-by-side) and
- perhaps provide a way for toolbar actions to implement the action on the view that is not the active one then allowing the change to propagate back into the active view.
.. I’m sure that is a lot of ask for, it would be nice to know there is a path to get some of these basics in place though. Long term this is what I would like to implement using your editor though. Keep in mind, I’m very new and I have not dove into the code much though and I have other thing I need to do first. Any direction you have, I’ll save this thread!