toptensoftware / markdowndeep

Open-source implementation of Markdown for C# and Javascript
268 stars 120 forks source link

Multiple markdowndeep editors on the same page #38

Closed Danthar closed 10 years ago

Danthar commented 10 years ago

Currently this is working however the preview pane is not, this is because of a bug in how getting the Preview div is handled.

It fails because it uses a global selector to retrieve the preview div. This is obviously done to maximise the flexibility one has as to where to display the preview div.

However its not very accommodating when you want to display multiple editors on the same page.

cskardon commented 10 years ago

Have you tried using the 'data-mdd-preview' tag? Stick it on the <textarea>

<textarea data-mdd-preview="#preview1" class="mdd_editor"></textarea>
<div id="preview1"></div>

<textarea data-mdd-preview="#preview2" class="mdd_editor"></textarea>
<div id="preview2"></div>

I don't get crossover between the editors / previews.

Danthar commented 10 years ago

Found it, and fixed it, Then totally forgot about this issue. Ill close it now.

PeterSawyer commented 9 years ago

Thanks this worked for me too. :+1: Great tool.