bootstrap-markdown icon indicating copy to clipboard operation
bootstrap-markdown copied to clipboard

Dynamically generated content - editor not working

Open dornstein opened this issue 9 years ago • 2 comments

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?

dornstein avatar Mar 10 '15 00:03 dornstein

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

toopay avatar Mar 10 '15 10:03 toopay

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

dornstein avatar Mar 10 '15 13:03 dornstein