1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 " />
5+ < title > Tiny, opensource, Bootstrap WYSIWYG rich text editor</ title >
6+
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
8+
9+ < link href ="../external/google-code-prettify/prettify.css " rel ="stylesheet " />
10+ < link rel ="stylesheet "
11+ href ="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css " />
12+ < link
13+ href ="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css "
14+ rel ="stylesheet " />
15+ < script
16+ src ="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js "> </ script >
17+ < script src ="../external/jquery.hotkeys.js "> </ script >
18+ < script
19+ src ="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js "> </ script >
20+ < script src ="../external/google-code-prettify/prettify.js "> </ script >
21+
22+ < link href ="../css/style.css " rel ="stylesheet " />
23+ < script src ="../src/bootstrap-wysiwyg.js "> </ script >
24+ </ head >
25+
26+ < body >
27+ < div class ="container ">
28+
29+ < h1 > Simple Editor with Toolbar</ h1 >
30+ < div class ="btn-toolbar " data-role ="editor-toolbar "
31+ data-target ="#editor ">
32+ < div class ="btn-group ">
33+ < a class ="btn btn-default dropdown-toggle " data-toggle ="dropdown "
34+ title ="Font Size "> < i class ="icon-text-height "> </ i > < b
35+ class ="caret "> </ b >
36+ </ a >
37+ < ul class ="dropdown-menu ">
38+ < li > < a data-edit ="fontSize 5 "> < font size ="5 "> Huge</ font >
39+ </ a >
40+ </ li >
41+ < li > < a data-edit ="fontSize 3 "> < font size ="3 "> Normal</ font >
42+ </ a >
43+ </ li >
44+ < li > < a data-edit ="fontSize 1 "> < font size ="1 "> Small</ font >
45+ </ a >
46+ </ li >
47+ </ ul >
48+ </ div >
49+ < div class ="btn-group ">
50+ < a class ="btn btn-default " data-edit ="bold "
51+ title ="Bold (Ctrl/Cmd+B) "> < i class ="icon-bold "> </ i >
52+ </ a > < a class ="btn btn-default " data-edit ="italic "
53+ title ="Italic (Ctrl/Cmd+I) "> < i class ="icon-italic "> </ i >
54+ </ a > < a class ="btn btn-default " data-edit ="strikethrough "
55+ title ="Strikethrough "> < i class ="icon-strikethrough "> </ i >
56+ </ a > < a class ="btn btn-default " data-edit ="underline "
57+ title ="Underline (Ctrl/Cmd+U) "> < i class ="icon-underline "> </ i >
58+ </ a >
59+ </ div >
60+ < div class ="btn-group ">
61+ < a class ="btn btn-default " data-edit ="insertunorderedlist "
62+ title ="Bullet list "> < i class ="icon-list-ul "> </ i >
63+ </ a > < a class ="btn btn-default " data-edit ="insertorderedlist "
64+ title ="Number list "> < i class ="icon-list-ol "> </ i >
65+ </ a > < a class ="btn btn-default " data-edit ="outdent "
66+ title ="Reduce indent (Shift+Tab) "> < i class ="icon-indent-left "> </ i >
67+ </ a > < a class ="btn btn-default " data-edit ="indent " title ="Indent (Tab) "> < i
68+ class ="icon-indent-right "> </ i >
69+ </ a >
70+ </ div >
71+ < div class ="btn-group ">
72+ < a class ="btn btn-default " data-edit ="justifyleft "
73+ title ="Align Left (Ctrl/Cmd+L) "> < i class ="icon-align-left "> </ i >
74+ </ a > < a class ="btn btn-default " data-edit ="justifycenter "
75+ title ="Center (Ctrl/Cmd+E) "> < i class ="icon-align-center "> </ i >
76+ </ a > < a class ="btn btn-default " data-edit ="justifyright "
77+ title ="Align Right (Ctrl/Cmd+R) "> < i class ="icon-align-right "> </ i >
78+ </ a > < a class ="btn btn-default " data-edit ="justifyfull "
79+ title ="Justify (Ctrl/Cmd+J) "> < i class ="icon-align-justify "> </ i >
80+ </ a >
81+ </ div >
82+ < div class ="btn-group ">
83+ < a class ="btn btn-default dropdown-toggle " data-toggle ="dropdown "
84+ title ="Hyperlink "> < i class ="icon-link "> </ i >
85+ </ a >
86+ < div class ="dropdown-menu input-append ">
87+ < input class ="span2 " placeholder ="URL " type ="text "
88+ data-edit ="createLink " />
89+ < button class ="btn " type ="button "> Add</ button >
90+ </ div >
91+ </ div >
92+
93+ < div class ="btn-group ">
94+ < a class ="btn btn-default " data-edit ="unlink "
95+ title ="Remove Hyperlink "> < i class ="icon-cut "> </ i >
96+ </ a > < a class ="btn btn-default "
97+ title ="Insert picture (or just drag & drop) " id ="pictureBtn ">
98+ < i class ="icon-picture "> </ i > < input type ="file "
99+ data-role ="magic-overlay " data-target ="#pictureBtn "
100+ data-edit ="insertImage " /> </ a >
101+ </ div >
102+ < div class ="btn-group ">
103+ < a class ="btn btn-default " data-edit ="undo "
104+ title ="Undo (Ctrl/Cmd+Z) "> < i class ="icon-undo "> </ i >
105+ </ a > < a class ="btn btn-default " data-edit ="redo "
106+ title ="Redo (Ctrl/Cmd+Y) "> < i class ="icon-repeat "> </ i >
107+ </ a >
108+
109+ < a class ="btn btn-default " data-edit ="clearformat "
110+ title ="Clear Formatting " onClick ="$('#editor').html($('#editor').text()); "> < i class ='glyphicon glyphicon-fire '> </ i >
111+ </ a >
112+
113+ </ div >
114+ </ div >
115+ < div id ="editor " class ="lead " placeholder ="This is a basic example with a simple toolbar. "> </ div >
116+ < div id ="editorPreview "> </ div >
117+ < p style ="text-align: center; ">
118+ < a class ="btn btn-large btn-default jumbo "
119+ href ="#! " onClick ="$('#editorPreview').html($('#editor').html()); "> Submit</ a >
120+ </ p >
121+ </ div >
122+ < script type ='text/javascript '> $ ( '#editor' ) . wysiwyg ( ) ; </ script >
123+ </ body >
124+ </ html >
0 commit comments