-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.html
43 lines (40 loc) · 1.63 KB
/
example.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src='https://cloud.tinymce.com/stable/tinymce.min.js'></script>
<script src='bootstrap_utils/plugin.js'></script>
<script>
tinymce.init({
selector: '#mytextarea',
plugins: 'bootstraputils',
toolbar: 'bootstrap-collapse',
setup: function(editor) {
editor.on('change init', function (e){
document.getElementById('result').innerHTML = editor.getContent({format: 'html'});
document.getElementById('code').textContent = editor.getContent({format: 'html'});
});
}
});
</script>
</head>
<body>
<h1>TinyMCE Quick Start Guide</h1>
<form method="post">
<textarea id="mytextarea">
<p>Hello, World!</p>
<p>
<a href="#test" data-toggle="collapse"
aria-expanded="false" aria-controls="test"
data-mce-href="#test">Collapse</a>
</p>
<div id="test" class="collapse">Collapse container</div>
</textarea>
</form>
<h2>Result</h2>
<div id="result"></div>
<div id="code"></div>
</body>
</html>