forked from christiaan/tinymce-codemirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.tinymce5.html
28 lines (28 loc) · 1.3 KB
/
test.tinymce5.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
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>TINYMCE 5 Test</title>
</head>
<body>
<p><textarea id="html" style="width: 100%; height: 200px;" cols="60" rows="10"><h1>TinyMCE 5 with CodeMirror plugin</h1><p>Click the <strong>&lt;&gt;</strong> button in the toolbar, or <strong>Tools -&gt; Source Code</strong> to edit the HTML code of this document.<br>Note that the cursor position is maintained when you switch from WYSIWYG to HTML source, and vice versa.</p><p><img src="/tinymce/tinymce-logo.png" align="left" /> <img src="/tinymce/codemirror-logo.png" align="right" /></p></textarea></p>
<p><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.0.4/tinymce.min.js"></script><br />
<script type="text/javascript">
tinymce.init({
selector: '#html',
height: 200,
plugins: 'codemirror',
external_plugins: {
codemirror: "/plugins/codemirror/plugin.js"
},
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | code',
codemirror: {
indentOnInit: true,
path: '/plugins/codemirror/codemirror-4.8',
config: {
lineNumbers: true
}
}
});
</script></p>
</body>
</html>