Skip to content

Commit

Permalink
loading markdown.md as sample editor content
Browse files Browse the repository at this point in the history
Fixes #4
  • Loading branch information
BigBlueHat committed Dec 3, 2013
1 parent cd91fb1 commit a690d9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gruntfile.js
Expand Up @@ -87,6 +87,7 @@ module.exports = function(grunt) {
data += grunt.file.read('editor.css');
grunt.file.write('build/editor.css', data);
grunt.file.copy('docs/index.html', 'build/index.html');
grunt.file.copy('docs/markdown.md', 'build/markdown.md');
grunt.file.copy('docs/markdown.html', 'build/markdown.html');
grunt.file.copy('docs/yue.css', 'build/yue.css');
grunt.file.copy('docs/marked.js', 'build/marked.js');
Expand Down
12 changes: 10 additions & 2 deletions docs/index.html
Expand Up @@ -39,9 +39,17 @@
<input class="title" type="text" placeholder="Title" />
<textarea id="editor" placeholder="Content here ...."></textarea>
</div>
<!-- only required for loading sample markdown into the textarea -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script type="text/javascript">
var editor = new Editor();
editor.render();
(function($) {
$('#editor').load('markdown.md',
function(data) {
var editor = new Editor();
editor.render();
}
);
})(Zepto);
</script>
</body>
</html>

0 comments on commit a690d9d

Please sign in to comment.