-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render markdown #7
Comments
I understand markdown is currently displayed by https://github.com/pod-os/PodOS/tree/5debca1f1a50ee1a1a8b5ba2d90fa19fec66a52b/elements/src/apps/pos-app-document-viewer Is the acceptance criterion simply passing it through a markdown to html converter+ sanitising? I'm personally interested in three additional features:
|
Thanks @josephguillaume those are great additions which I like to see supported as well. This user story will focus on the rendering, I will extract new stories for the other stuff as soon as I start working on it |
Building on the concept of dynamic components, my preference for this would now be to create a generic app that is responsible for loading and saving the data, but passes all rendering to a dynamically selected web component. This separates solid-specific handling from generic interaction with data. It would be similar to a version of pos-document with differences:
Specifically, the generic component would allow using something like https://zerodevx.github.io/zero-md/ |
Interesting thoughts. zero-md looks nice, but it expects the markdown in a specific way, either src attribute or script tag. If we want to solve it generically, we need to define an interface between PodOS and the potential apps that can be child component to render markdown. Since other apps won't follow that interface we at least need to provide shims. |
Here's one prototype implementation: https://github.com/josephguillaume/wiki-solid-podos/blob/main/TextLoader.js The interface to the child component is by setting the value property of slots of the component. The same repository includes example implementations of editors and markdown renderers. |
As a user of PodOS browser I want to see the rendered content of a markdown file, when navigating to a markdown resource, because I am primarily interested in the textual content and want to be able to read it easily
The text was updated successfully, but these errors were encountered: