-
Notifications
You must be signed in to change notification settings - Fork 17
/
app.js
94 lines (90 loc) · 3.38 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
angular.module("ieditor", ['ngSanitize', 'angularFileUpload','ngMeditor']);
angular.module("ieditor").run(function ($http, meditorProvider) {
meditorProvider.config({
qnConfig: {
endPoint: 'http://upload.qiniu.com',
tokenFunc: function () {
return $http.post('/token');
}
}
}
);
})
angular.module("ieditor").controller('EditorCtrl', function ($scope) {
var strVar = "";
strVar += "<h1 style=\"text-align: center;\"><b style=\"line-height: 1.5;\">Medium style editor for AngularJS<\/b><\/h1>";
strVar += "<div style=\"text-align: center;\">";
strVar += " <b style=\"line-height: 1.5;\">using contenteditable API<\/b>";
strVar += "<\/div>";
strVar += "<h1><span style=\"line-height: 1.5;\">Heading 1<\/span><br>";
strVar += "<\/h1>";
strVar += "<h2><span style=\"line-height: 1.5;\">heading 2<\/span><\/h2>";
strVar += "<h3><span style=\"line-height: 1.5;\">heading 3<\/span><\/h3>";
strVar += "<div>";
strVar += " Drop or select image to insert it, or just paste from clipboard. Image are saved to QiniuCloud by default.";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <img src=\"//7xip0c.com1.z0.glb.clouddn.com/1429602250833967304\"><br>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <br>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " Order List";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <ol>";
strVar += " <li>item 1<\/li>";
strVar += " <li>item 2<\/li>";
strVar += " <li>item 3<\/li>";
strVar += " <\/ol>";
strVar += " <div>";
strVar += " Unorder List";
strVar += " <\/div>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <ul>";
strVar += " <li><span style=\"line-height: 1.5em;\">item1<\/span><br>";
strVar += " <\/li>";
strVar += " <li><span style=\"line-height: 1.5em;\">item2<\/span><br>";
strVar += " <\/li>";
strVar += " <li><span style=\"line-height: 1.5em;\">item3<\/span><br>";
strVar += " <\/li>";
strVar += " <\/ul>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <u><b><br>";
strVar += " <\/b><\/u>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <u><b>underLine<\/b><\/u>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <br>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <i>italic<\/i>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <br>";
strVar += "<\/div>";
strVar += "<div>";
strVar += " Code input supported. Just input ``` at line start, or format it.";
strVar += "<\/div>";
strVar += "<div>";
strVar += " <br>";
strVar += "<\/div>";
strVar += "<pre>";
strVar += "<div class=\"editor-wrapper\">\n";
strVar += " <ng-meditor ng-model=\"content\"></ng-meditor>\n";
strVar += "</div>\n";
strVar += "<\/pre>";
strVar += "<br>";
strVar += "<br>";
strVar += "<span class=\"Apple-tab-span\" style=\"white-space:pre\"><\/span><b>Tab key supported<span class=\"Apple-tab-span\" style=\"white-space:pre\"><\/span>!<\/b><br>";
strVar += "Append whitespace to URL to insert link. try the following,";
strVar += "<pre>http://github.com/icattlecoder</pre>";
strVar += "<br>";
strVar += "<br>";
$scope.content = strVar;
});