rich-markdown-editor | open source React and Prosemirror based markdown editor | Editor library
kandi X-RAY | rich-markdown-editor Summary
kandi X-RAY | rich-markdown-editor Summary
The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rich-markdown-editor
rich-markdown-editor Key Features
rich-markdown-editor Examples and Code Snippets
Community Discussions
Trending Discussions on rich-markdown-editor
QUESTION
I have a prosemirror based editor that I'd like to enable real-time collaboration on. So I've set up a socket server as described here
I set up the WebsocketProvider
as a useRef()
so that we're not constantly re-creating it everytime we render the component (before I was spinning up dozens of websockets). However, now it's not even getting defined, as the console.log(this.yXmlFragment, this.provider)
in get plugins()
is returning both as undefined
My desired behavior is that I want provider
and yXmlFragment
to be updated only when the sectionID
changes, not for any other re-render. But it's not even being set the first time. Can anyone explain how I'm wrong?
ANSWER
Answered 2021-Apr-20 at 20:48This is happening because you are including sectionID
in the dependency list of the useEffect
within EditorContainer
. Because sectionID
doesn't change on initial load, this useEffect
never fires. I've created a minimal example of this here:
https://codesandbox.io/s/focused-babbage-ilx4j?file=/src/App.js
I recommend changing useEffect
to useMemo
because it runs at least once on initial render of EditorContainer
. And you still get the performance benefit because it shouldn't rerun unless sectionID
changes.
QUESTION
I'm working on trying to extend this markdown editor library - which itself extends Prosemirror. I'd like to build my own Node which has the following schema:
...ANSWER
Answered 2021-Mar-03 at 14:42It looks like you are missing a configuration for the markdown rules.
You can add a file in /src/lib/markdown
, something like story.ts
, with this content (copy/paste from notice.ts)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rich-markdown-editor
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page