This repository was archived by the owner on Feb 18, 2023. It is now read-only.
forked from derobins/wmd
-
Notifications
You must be signed in to change notification settings - Fork 11
Installation
tstone edited this page Sep 13, 2010
·
1 revision
- jQUery
- jQuery UI* (Note: jQuery UI is required only if you plan to use the default dialogs.)
jQuery and jQuery UI (if in use) must be loaded before MarkEdit.
To install MarkEdit to your page, include the markedit and showdown javascript and css files. Non-minified files will be shown. Feel free to minify MarkEdit if you plan to use it in a non-development context.
<html><head><script type="text/javascript" src="/js/jquery.min.js"></script> <script type="text/javascript" src="/js/jquery.ui.min.js"></script> <!-- if using jQuery UI --> <script type="text/javascript" src="/js/jquery.markedit.js"></script> <script type="text/javascript" src="/js/showdown.js"></script><link type="text/css" rel="stylesheet" href="/css/jquery.ui.custom.css" /> <!-- if using jQuery UI --> <link type="text/css" rel="stylesheet" href="/css/jquery.markedit.css" /></head></html>
Once the required library files are installed, MarkEdit can be initialized on any tag by calling the $.markedit() function.
<html><head><script type="text/javascript" src="/js/jquery.min.js"></script> <script type="text/javascript" src="/js/jquery.ui.min.js"></script> <!-- if using jQuery UI --> <script type="text/javascript" src="/js/jquery.markedit.js"></script> <script type="text/javascript" src="/js/showdown.js"></script><link type="text/css" rel="stylesheet" href="/css/jquery.ui.custom.css" /> <!-- if using jQuery UI --> <link type="text/css" rel="stylesheet" href="/css/jquery.markedit.css" /><script type="text/javascript"> $(function() { $('#editbox').markedit(); }); </script></head><body><textarea id="editbox"></textarea></body></html>