1- <!doctype html>
2- < html ng-app ="app ">
1+ <!DOCTYPE html>
2+
3+ <!-- define angular app -->
4+ < html ng-app ="myApp ">
35
46< head >
5- < link href ='
https://cdn.jsdelivr.net/npm/[email protected] /css/froala_editor.pkgd.min.css '
rel ='
stylesheet '
type ='
text/css '
/> 6- < script type ='
text/javascript '
src ='
https://cdn.jsdelivr.net/npm/[email protected] /js/froala_editor.pkgd.min.js '
> </ script > 7- < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.9/angular.min.js "> </ script >
7+ < meta charset ="utf-8 ">
8+ < meta name ="viewport " content ="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0 " />
9+
10+ <!-- Include Froala Editor styles -->
11+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/froala_editor.min.css " />
12+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/froala_style.min.css " />
13+
14+ <!-- Include Froala Editor Plugins styles -->
15+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/char_counter.css ">
16+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/code_view.css ">
17+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/colors.css ">
18+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/emoticons.css ">
19+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/file.css ">
20+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/fullscreen.css ">
21+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/image_manager.css ">
22+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/image.css ">
23+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/line_breaker.css ">
24+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/table.css ">
25+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/video.css ">
26+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/plugins/special_characters.css ">
27+ < link rel ="stylesheet " href ="../node_modules/froala-editor/css/third_party/font_awesome.min.css ">
28+ < link rel ="stylesheet " href ="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css ">
29+
30+ <!-- Include Froala Editor -->
31+ < script src ="../node_modules/froala-editor/js/froala_editor.pkgd.min.js "> </ script >
32+
33+ <!-- Include Froala Editor Plugins -->
34+ < script src ="../node_modules/froala-editor/js/plugins/align.min.js "> </ script >
35+ < script src ="../node_modules/froala-editor/js/plugins/char_counter.min.js "> </ script >
36+ < script src ="../node_modules/froala-editor/js/plugins/code_beautifier.min.js "> </ script >
37+ < script src ="../node_modules/froala-editor/js/plugins/code_view.min.js "> </ script >
38+ < script src ="../node_modules/froala-editor/js/plugins/colors.min.js "> </ script >
39+ < script src ="../node_modules/froala-editor/js/plugins/emoticons.min.js "> </ script >
40+ < script src ="../node_modules/froala-editor/js/plugins/entities.min.js "> </ script >
41+ < script src ="../node_modules/froala-editor/js/plugins/file.min.js "> </ script >
42+ < script src ="../node_modules/froala-editor/js/plugins/font_family.min.js "> </ script >
43+ < script src ="../node_modules/froala-editor/js/plugins/font_size.min.js "> </ script >
44+ < script src ="../node_modules/froala-editor/js/third_party/font_awesome.min.js "> </ script >
45+ < script src ="../node_modules/froala-editor/js/plugins/fullscreen.min.js "> </ script >
46+ < script src ="../node_modules/froala-editor/js/plugins/image.min.js "> </ script >
47+ < script src ="../node_modules/froala-editor/js/plugins/image_manager.min.js "> </ script >
48+ < script src ="../node_modules/froala-editor/js/plugins/inline_style.min.js "> </ script >
49+ < script src ="../node_modules/froala-editor/js/plugins/line_breaker.min.js "> </ script >
50+ < script src ="../node_modules/froala-editor/js/plugins/link.min.js "> </ script >
51+ < script src ="../node_modules/froala-editor/js/plugins/lists.min.js "> </ script >
52+ < script src ="../node_modules/froala-editor/js/plugins/paragraph_format.min.js "> </ script >
53+ < script src ="../node_modules/froala-editor/js/plugins/paragraph_style.min.js "> </ script >
54+ < script src ="../node_modules/froala-editor/js/plugins/quote.min.js "> </ script >
55+ < script src ="../node_modules/froala-editor/js/plugins/save.min.js "> </ script >
56+ < script src ="../node_modules/froala-editor/js/plugins/table.min.js "> </ script >
57+ < script src ="../node_modules/froala-editor/js/plugins/video.min.js "> </ script >
58+ <!-- End Froala -->
59+
60+ < script src ="../bower_components/angular/angular.min.js "> </ script >
861 < script src ="../src/angular-froala.js "> </ script >
9- < script src ="../src/froala-sanitize.js "> </ script >
1062 < script src ="app.js "> </ script >
11- < link rel ="stylesheet " href ="https://netdna.bootstrapcdn.com/twitter-bootstrap/4.4.1/css/bootstrap-combined.min .css ">
63+ < link rel ="stylesheet " href ="app .css ">
1264</ head >
1365
14- < body >
15-
16- < div ng-controller ="ctrl1 ">
17- < button ng-click ="formOpen = !formOpen "> toggle form</ button >
66+ <!-- define angular controller -->
1867
19- < div ng-if ="formOpen ">
20- < form name ="form " class ="css-form " novalidate enctype ="multipart/form-data " ng-submit ="addContent(form) ">
21- < textarea froala ="froalaOptions " ng-model ="content.text "> </ textarea >
68+ < body ng-controller ="mainController ">
69+ < h1 > Angular adapter for the Froala WYSIWYG editor</ h1 >
70+ < div class ="sample ">
71+ < h2 > Sample 1: Inline Edit</ h2 >
72+ < div froala ="titleOptions " ng-model ="myTitle "> </ div >
73+ </ div >
2274
23- < button type ="submit "> submit </ button >
24- </ form >
75+ < div class ="sample ">
76+ < h2 > Sample 2: Full Editor</ h2 >
77+ < textarea id ="froala-sample-2 " froala ng-model ="sample2Text "> </ textarea >
78+ < h4 > Rendered Content:</ h4 >
79+ < div froala-view ="sample2Text "> </ div >
80+ </ div >
2581
26- < div > {{content.text}}</ div >
27- </ div >
82+ < div class ="sample ">
83+ < h2 > Sample 3: Manual Initialization</ h2 >
84+ < button class ="manual " ng-click ="initControls.initialize() "> Initialize Editor</ button >
85+ < button ng-click ="initControls.destroy() " ng-show ="initControls.getEditor() != null "> Close Editor</ button >
86+ < button ng-click ="deleteAll() " ng-show ="initControls.getEditor() != null "> Delete All</ button >
87+ < div id ="froala-sample-3 " froala froala-init ="initialize(initControls) " ng-model ="sample3Text "> </ div >
88+ </ div >
89+
90+ < div class ="sample ">
91+ < h2 > Sample 4: Editor on 'img' tag</ h2 >
92+ < img froala ng-model ="imgModel " />
93+ < h4 > Model Obj:</ h4 >
94+ < div > {{imgModel}}</ div >
95+ </ div >
96+
97+ < div class ="sample ">
98+ < h2 > Sample 5: Editor on 'button' tag</ h2 >
99+ < button froala ng-model ="buttonModel "> </ button >
100+ < h4 > Model Obj:</ h4 >
101+ < div > {{buttonModel}}</ div >
102+ </ div >
28103
104+ < div class ="sample ">
105+ < h2 > Sample 6: Editor on 'input' tag</ h2 >
106+ < input froala ="inputOptions " ng-model ="inputModel " />
107+ < h4 > Model Obj:</ h4 >
108+ < div > {{inputModel}}</ div >
29109 </ div >
110+
111+ < div class ="sample ">
112+ < h2 > Sample 7: Editor on 'a' tag. Manual Initialization</ h2 >
113+ < button class ="manual " ng-click ="linkInitControls.initialize() "> Initialize Editor</ button >
114+ < button ng-click ="linkInitControls.destroy() " ng-show ="linkInitControls.getEditor() != null "> Close Editor</ button >
115+ < div >
116+ < a froala froala-init ="initializeLink(initControls) " ng-model ="linkModel "> Froala Editor</ a >
117+ </ div >
118+ < h4 > Model Obj:</ h4 >
119+ < div > {{linkModel}}</ div >
120+ </ div >
121+
30122</ body >
31123
32- </ html >
124+ </ html >
0 commit comments