We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey guys. Is there a way to load markdown plain text from a text file using jquery .get?
Here's my code for reference:
<!doctype html> <html> <div id="article"></div> <script src="http://strapdownjs.com/v/0.2/strapdown.js"></script> <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $.get("mytextfile.txt", function(data) { var markdown = "<xmp theme=\"readable\" style=\"display:none;\">"; markdown += data; markdown += "</xmp>"; $("#article").html(markdown); }); }); </script> </html>
This doesn't seem to work. Console log returns TypeError: markdownEl is undefined. Any idea how to fix this?
TypeError: markdownEl is undefined
The text was updated successfully, but these errors were encountered:
strapdown.js must run after. :/
strapdown.js
Sorry, something went wrong.
Hi. I had a similar issue. So I wrapped strapdown.js into a function that I can call when it is convenient. Here is my fork https://github.com/dmelo/strapdown/tree/dmelo .
Now, you have to call window.strapdown() to make it parse the markdown. I will make a PR as soon as I implement it on a backward compatible way.
window.strapdown()
No branches or pull requests
Hey guys. Is there a way to load markdown plain text from a text file using jquery .get?
Here's my code for reference:
This doesn't seem to work. Console log returns
TypeError: markdownEl is undefined
. Any idea how to fix this?The text was updated successfully, but these errors were encountered: