1 | <!DOCTYPE html> |
---|
2 | <!-- |
---|
3 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. |
---|
4 | For licensing, see LICENSE.md or http://ckeditor.com/license |
---|
5 | --> |
---|
6 | <html> |
---|
7 | <head> |
---|
8 | <meta charset="utf-8"> |
---|
9 | <title>Data Filtering — CKEditor Sample</title> |
---|
10 | <script src="../ckeditor.js"></script> |
---|
11 | <link rel="stylesheet" href="sample.css"> |
---|
12 | <script> |
---|
13 | // Remove advanced tabs for all editors. |
---|
14 | CKEDITOR.config.removeDialogTabs = 'image:advanced;link:advanced;flash:advanced;creatediv:advanced;editdiv:advanced'; |
---|
15 | |
---|
16 | CKEDITOR.plugins.add('foo', |
---|
17 | { |
---|
18 | requires: 'widget' |
---|
19 | ,icons:'image' |
---|
20 | ,init: function(editor){ |
---|
21 | |
---|
22 | editor.widgets.add('foo', { |
---|
23 | allowedContent:'span[foo]' |
---|
24 | ,button:'Add foo' |
---|
25 | }); |
---|
26 | |
---|
27 | } |
---|
28 | }); |
---|
29 | </script> |
---|
30 | </head> |
---|
31 | <body> |
---|
32 | <textarea cols="80" id="editor4" name="editor4" rows="10"> |
---|
33 | <p>Content <span foo="Foo content"> </span></p> |
---|
34 | </textarea> |
---|
35 | <script> |
---|
36 | |
---|
37 | CKEDITOR.replace( 'editor4', { |
---|
38 | extraPlugins: 'foo', |
---|
39 | removePlugins: 'bidi,div,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley,stylesheetparser', |
---|
40 | removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image', |
---|
41 | format_tags: 'p;h1;h2;h3;pre;address', |
---|
42 | toolbar:'Test', |
---|
43 | toolbar_Test:[['Source','foo']] |
---|
44 | } ); |
---|
45 | |
---|
46 | </script> |
---|
47 | </body> |
---|
48 | </html> |
---|