refactory-id / bootstrap-markdown

Bootstrap plugin for markdown editing
Apache License 2.0
1.99k stars 371 forks source link

Dynamically generated content - editor not working #159

Open dornstein opened 9 years ago

dornstein commented 9 years ago

I have a web page that has several textareas, each of which use bootstrap-markdown. This all works fine. I also have an "Add" button on the page that dynamically generates another textarea. After the new text area is generated it needs to have bootstrap-markdown too so I call the markdown function:

 insert.find("textarea[id='TemplateActivity_Description']").markdown();

This does attach the markdown toolbar, etc. So I know it's sorta working.

Unfortunately, most of the functions don't work. Bold, Heading and Preview (for example) don't work (they do nothing and generate no javascript errors in the console). Interestingly, some things partly work. For example, if I click the "link" item int he toolbar it prompts for the URL -- but then doesn't modify the content.

I'm pretty stumped. Any ideas what might be wrong?

toopay commented 9 years ago

I would assume you haven't load the dependency libraries yet. Check again the doc, especially at note section.

dornstein commented 9 years ago

Really? Even though other instances of the same component work fine on the same page?