Closed robert-stuttaford closed 7 years ago
For now I have done this:
$(function() {
setTimeout(function() {
layout.sizePane('east', '100%');
$('.ui-draggable-handle').remove();
}, 1000);
});
But of course that presents the user with the editor for a couple seconds, which is not ideal.
Sorry for the late reply. I am currently busy learning React, Redux and webpack and I am planning to make MDP more modern. :)
If you want preview only, you don't even need toolbar. Do you?
Check this project instead: https://github.com/tylingsoft/markdown-core
Sample code:
var mdc = require('markdown-core/markdown-core-node');
var markdown = '# your markdown here';
var html = mdc.render(markdown);
$('.markdown-body').html(html);
With the code above, you can implement a markdown preview yourself without MDP. https://github.com/tylingsoft/markdown-core also provides CSS.
I have integrated MDP into a web-based CMS (to be open-sourced soon).
Part of its feature-set is that it allows the developer to control whether users can read and edit, or just read. Now I'd like to have MDP do just the Preview part, and not any of the Edit stuff.
Is it possible to do this with the current minified distribution, or do I need to patch together my own variant of
markdown-plus.js
+ dependencies?Thank you for a wonderful editor, Tyler!