Closed majimboo closed 9 years ago
I think there is an option to let you initialize the plugin on preview
mode
Yes indeed there is an initialstate option added in #64
Possible values: initialstate: 'editor' or 'preview'
@acrobat thanks for pointing that out :)
Aah, can I ask for a example usage? Thanks.
@majimboo here is an example ;)
@acrobat , cheers, oddly it still shows the editor. I just want to display something from the database. :D
Hmm then I don't understand your question.. This option opens the editor with the preview mode default enabled (you can also disable the other actions) this way the editor is just a preview screen
If you are concerned about the editor "layout" then you should use your markdown parser (not this plugin) to just parse the string and put it in a div
Actually, I have markdown data in the database. That was saved using this library. Now, I want to display that data to the user. Ofcourse I do not want the user to edit the data, nor do I want to show the editor. I just want to show the HTML of the markdown.
@majimboo see my comment above
Additionally, if you want to have an option to edit the div
content, then you can use this plugin. see more example here: http://www.codingdrama.com/bootstrap-markdown/
Yah, I did that problem now is this plugin is saving new lines as special characters and markdownjs seems to expect \n
for new lines. So now all my parsed markdown has no line breaks.
After using the editor to enter data, how about displaying the data without showing the editor? How would one do that?