File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ module.exports = function(grunt) {
87
87
data += grunt . file . read ( 'editor.css' ) ;
88
88
grunt . file . write ( 'build/editor.css' , data ) ;
89
89
grunt . file . copy ( 'docs/index.html' , 'build/index.html' ) ;
90
+ grunt . file . copy ( 'docs/markdown.md' , 'build/markdown.md' ) ;
90
91
grunt . file . copy ( 'docs/markdown.html' , 'build/markdown.html' ) ;
91
92
grunt . file . copy ( 'docs/yue.css' , 'build/yue.css' ) ;
92
93
grunt . file . copy ( 'docs/marked.js' , 'build/marked.js' ) ;
Original file line number Diff line number Diff line change 39
39
< input class ="title " type ="text " placeholder ="Title " />
40
40
< textarea id ="editor " placeholder ="Content here .... "> </ textarea >
41
41
</ div >
42
+ <!-- only required for loading sample markdown into the textarea -->
43
+ < script type ="text/javascript " src ="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js "> </ script >
42
44
< script type ="text/javascript ">
43
- var editor = new Editor ( ) ;
44
- editor . render ( ) ;
45
+ ( function ( $ ) {
46
+ $ ( '#editor' ) . load ( 'markdown.md' ,
47
+ function ( data ) {
48
+ var editor = new Editor ( ) ;
49
+ editor . render ( ) ;
50
+ }
51
+ ) ;
52
+ } ) ( Zepto ) ;
45
53
</ script >
46
54
</ body >
47
55
</ html >
You can’t perform that action at this time.
0 commit comments