basic question about a "read only" view of an edited document that preserves look-and-feel? #1683
-
Hi. Milkdown is a very cool project that looks like it meets my needs for building a family blogging tool. I have (at least) one basic question. If one of my users edits a blog post with Crepe (for example), how should I deploy that post in "read only" mode for others to read once it is published? I want to preserve the exact look-and-feel that the creator saw while using Crepe, including custom features like how the Image Block component allows for resizing images (using non-standard Markdown syntax.) I can imagine at least two ways to "lock" the document and preserve look and feel. One way might be to display the finished post using Crepe itself, but somehow set it to "read-only" mode so that others cannot edit the content (and no menu pops up with the slash command, etc.) Another approach might be to serialize the custom Markdown to HTML and leverage Crepe's CSS files to match the visual look at feel. What is a good approach? Is there something else to consider? [I am not very familiar with Prose Mirror, so a simple solution would be best 😄] Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
If you don't have SEO or SSR requirements, you can just use an readonly editor. Otherwise you'll need to use html/markdown to make the page static. |
Beta Was this translation helpful? Give feedback.
The editor equal HTML output is a missing part in crepe. I have a issue to track it: #1366
Basically every part of the editor will need to adjust the HTML output to make it works out of box. I'll implement the feature in the future. For now, there's no quick path to do it. I think you can use readonly editor first. Fixing the readonly editor will be much more easier and I'll release a patch version next week.