meteor-ghostdown
meteor-ghostdown copied to clipboard
How to init the body content for ghostdown?
Hi Jeremy,
This is a great project for markdown code There's one little thing that I can't figure out: How to init the body content for ghostdown? I use your project to create a blog, so when I edit a blog how can I render the body content, I used set Session for ''editor-markdown" and "editor-html", but it not work
I'm looking forward to hearing from you thank you
You can grab the markdown, html, and word count with the following session variables:
Session.get('editor-markdown');
Session.get('editor-html');
Session.get('editor-word-count');
At that point, it's up to you to insert the content into your database. This package is just the editor functionality.
You can test the session variables on the demo page. Just type something in the markdown pane and then open your browser console and run any of the Session.get()
lines above. They should output each of those values to the console.
hi, I think you missunderstood me example, I use ghostdown editor to create a blog, then I use Session.get('editor-html') to get content then I save it to database. when I edit this blog, I want this content auto fill to markdown area then I can continue edit blog. I used Session.set('editor-markdown', myHtml), but It didn't show my content to markdown area so Would you like show me how to do that? thank you
Yes, I am facing the same problem: How to preload content for ghostdown editor. Just for example, the other editor package epic have the function: http://epiceditor.meteor.com/preload
BTW, I really like the style ghostdown presents.