Question

I'm working on an ASP.NET MVC project which uses the MarkdownDeep Editor to add a rich editor on top of a basic markdown input textbox (very similar to the Stackoverflow editor window).

Generally it works great. However, in certain scenarios, I would like to disable the preview window. This is automatically generated below the textarea by MDD. Can this be disabled?

Just to be clear, I know I can use CSS to hide the preview. But on some devices it's slow and makes typing painful. I want to entirely turn off that feature. I don't see anything in the docs other than how to customize the preview.

Any ideas?

Was it helpful?

Solution

In the docs it specifically mentions that it is recommended that you have the div preview already in your document because it will be created if it isn't found and consequently, could could a visible page refresh if any re-layout has to occur.

Note: the associated divs are all optional and if missing, the plugin will create them. However... you might experience the page jumping around during load if you do this. ie: it's recommended to explicitly include them.

Thus from the sounds of this, and that there doesn't appear to be any option to turn it off in the API page I would say no, it's not possible.

OTHER TIPS

I am a little confused here: if you don't want the preview, use a regular text area instead of mdd_editor... So, under the scenarios where you don't need the previews, instantiate a plain vanilla editor. What am I missing here?

I know this is old, but I was looking for something else on mdd. I recently had this same requirement. Just comment out the code

// Update the DOM
if (this.m_divHtml)
    this.m_divHtml.innerHTML=output;

in MarkdownDeepEditor.js

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top