Open nihey opened 1 year ago
place in markdown viewer to update: https://github.com/stoplightio/markdown-viewer/blob/master/src/utils/parse.ts
imho giving users control over what nodes should be kept is also a good solution. e.g. the doc author trying to use custom elements for icons.
This would be fantastic. Is there a workaround in the interim?
I just forked this repo and patched @stoplight/markdown-viewer
. then have vendored the custom build of elements; just works for our docs.
Context
We are starting to use Elements as a Documentation tool and we needed the support to add videos on the Documentation description.
Current Behavior
Currently the video tags are sanitized out of the Markdown so they never appear on the final
Expected Behavior
Video tags would work just like other HTML tags on the documentation
Possible Solution(s)
I've checked your code and it is possible to do it by changing https://www.npmjs.com/package/@stoplight/markdown-viewer (which does not seem to be Open Source).
I would be willing to contribute if the repository was open, the change I've made to workaround it was:
The rebuild the project and serve the files from my rebuilt version.
Example with videos: https://videomatik-editor-git-redoc-kassellabs.vercel.app/#/