-
Notifications
You must be signed in to change notification settings - Fork 39
/
demo.html
24 lines (24 loc) · 1.01 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>TinyMCE FontAwesome Plugin Demo</title>
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<textarea></textarea>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.6.3/tinymce.min.js"></script>
<script>
let dirName = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'));
tinymce.PluginManager.load('fontawesome', dirName + '/fontawesome/plugin.min.js');
tinymce.init({
selector:'textarea',
content_css: 'https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
noneditable_noneditable_class: 'fa',
plugins: '-fontawesome noneditable',
toolbar: 'fontawesome',
extended_valid_elements: 'span[*]'
});
</script>
</body>
</html>