Ticket #12927: index.html

File index.html, 1.0 KB (added by Lyuba, 6 years ago)

Minimum code to reproduce

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4   <title>Demo to crash dartium</title>
5   <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
6   <script type="text/javascript" src="http://cdn.ckeditor.com/4.4.7/standard-all/ckeditor.js"></script>
7
8</head>
9<body>
10  <h1>Custom plugin CKEditor</h1>
11  <textarea cols="80" id="test" name="editor1" rows="20">
12  </textarea>
13
14  <script type="text/javascript">
15    CKEDITOR.plugins.add('mywidget', {
16      requires: 'widget',
17   
18      init: function(editor) {
19
20        editor.widgets.add('mywidget', {
21          button: 'Create mywidget',
22          template: '<div>Content...</div>'
23        });
24      }
25    });
26
27    //Add this line so that you can insert new lines before a mywidget widget.
28    CKEDITOR.dtd.$inline['div'] = 1;
29
30    var editor = CKEDITOR.replace('test', {extraPlugins: 'mywidget'});
31     
32  </script>
33</body>
34</html>
35
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy