You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually I think StackEdit may not be the best option we got. Because StackEdit requires a web server to host the service, so we need to use https://stackedit.io/app# as our editor and open it in an iframe. This makes it really hard to customize the editor in many ways, like auto scrolling or customize renderer.
This is an alternative called https://www.npmjs.com/package/@uiw/react-md-editor , which is local npm package without any web server dependency. As the open source component makes it possible to customize the editor as we need. I think we can investigate whether we can use this one instead of StackEdit.
I looked into the react-md-editor package, it could be good replacement of StackEdit.
Because the component allows lots of customization by props. The most important one is modify the renderer of images.
Like for KaiwuDB docs, the images are ../../../images/xxx.png which is a relative path in the repository, but they will not show in markdown editor. And for Docusaurus sites like OpenDigger docs, the images are @site/static/xxx.png which will also not show in markdown editor.
So in this component, we can inject the renderer by customize the components/preview option.
Actually I think StackEdit may not be the best option we got. Because StackEdit requires a web server to host the service, so we need to use https://stackedit.io/app# as our editor and open it in an iframe. This makes it really hard to customize the editor in many ways, like auto scrolling or customize renderer.
This is an alternative called https://www.npmjs.com/package/@uiw/react-md-editor , which is local npm package without any web server dependency. As the open source component makes it possible to customize the editor as we need. I think we can investigate whether we can use this one instead of StackEdit.
Originally posted by @frank-zsy in #921 (comment)
The text was updated successfully, but these errors were encountered: