| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <meta charset="utf-8"> |
|---|
| 5 | <title>CKEditor</title> |
|---|
| 6 | <!-- |
|---|
| 7 | --> |
|---|
| 8 | <script src="//cdn.ckeditor.com/4.4.8/full/ckeditor.js"></script> |
|---|
| 9 | |
|---|
| 10 | <!-- |
|---|
| 11 | <script src="//cdn.ckeditor.com/4.5.0/full/ckeditor.js"></script> |
|---|
| 12 | --> |
|---|
| 13 | </head> |
|---|
| 14 | <body> |
|---|
| 15 | <textarea name="editor1"></textarea> |
|---|
| 16 | <script> |
|---|
| 17 | var editor = CKEDITOR.replace( 'editor1', { |
|---|
| 18 | // allowedContent: true, // THIS DOES NOT WORK EITHER |
|---|
| 19 | allowedContent: 'div h1 h2 h3 h4 h5 h6 p br sub sup blockquote span pre code img font a i b u del strike em strong tt s ol ul li table caption col colgroup tbody td tfoot th thead tr (*) [*] {*}', |
|---|
| 20 | height: 500, |
|---|
| 21 | pasteFromWordRemoveFontStyles: false, |
|---|
| 22 | pasteFromWordRemoveStyles: false |
|---|
| 23 | }); |
|---|
| 24 | |
|---|
| 25 | editor.on( 'instanceReady', function() { |
|---|
| 26 | console.log( editor.filter.allowedContent ); |
|---|
| 27 | console.log( editor.filter.disallowedContent ); |
|---|
| 28 | } ); |
|---|
| 29 | |
|---|
| 30 | </script> |
|---|
| 31 | </body> |
|---|
| 32 | </html> |
|---|