-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
44 lines (39 loc) · 2.03 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CK-Popover Demo</title>
<!-- CKEditor -->
<script src="https://cdn.ckeditor.com/4.11.4/standard/ckeditor.js"></script>
<!-- Bootstrap 3.3.7 CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container" style="padding-top: 2em;">
<textarea name="editor1"></textarea>
<p>Demo needs some setup. Open <code>demo.html</code> file and edit the path of the plugin.</p>
<p id="PreviewBox" class="page-header"></p>
</div>
<!-- jQuery JavaScript Library -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<!-- Bootstrap 3.3.7 JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Setup -->
<script>
// Enable local plugin from ./plugins/ck-popover/ folder.
CKEDITOR.plugins.addExternal( 'ck-popover', 'file:///C:/path/to/webroot/plugins/ck-popover/', 'plugin.js' );
// extraPlugins needs to be set too.
CKEDITOR.replace('editor1', {
extraPlugins: 'ck-popover'
});
// custom javscript for demo.
$(function(){
CKEDITOR.instances.editor1.on('change', function() {
var content = CKEDITOR.instances.editor1.getData();
$("#PreviewBox").html(content);
$('[data-toggle="popover"]').popover();
});
});
</script>
</body>
</html>