I did a live editor with docsify. Am I reinventing the wheel? #2513
ed-parsadanyan
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone. I was experimenting with docsify.js recently and wanted to make it a part of one API service (basically you make api requests and get pages with docsify included.
As part of one endpoint, I wanted to give a user an ability to edit the existing file right in a browser (something similar to what stackedit.io offers)
After some wrestling with doscify and creating a tiny plugin, I was able to achieve the goal:
The plugin is passed in the
window.$docsify
then, there's an event listener
editor.addEventListener('input', updatePreview);
which forces the re-rendering:Am I reinventing the wheel? Should I convert this into a separate standalone plugin?
Beta Was this translation helpful? Give feedback.
All reactions