| 1 | <!DOCTYPE html> |
|---|
| 2 | <!-- |
|---|
| 3 | Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. |
|---|
| 4 | For licensing, see LICENSE.html or http://ckeditor.com/license |
|---|
| 5 | --> |
|---|
| 6 | <html> |
|---|
| 7 | <head> |
|---|
| 8 | <title>#10884</title> |
|---|
| 9 | <meta charset="utf-8"> |
|---|
| 10 | <script src="../../ckeditor.js"></script> |
|---|
| 11 | <link href="../sample.css" rel="stylesheet"> |
|---|
| 12 | </head> |
|---|
| 13 | <body> |
|---|
| 14 | <h1 class="samples"> |
|---|
| 15 | <a href="index.html">CKEditor Samples</a> » #10884 |
|---|
| 16 | </h1> |
|---|
| 17 | <textarea cols="80" id="editor1" name="editor1" rows="10"> |
|---|
| 18 | <p>regular paragraph</p> |
|---|
| 19 | <figure data-widget="widget1"> |
|---|
| 20 | <p>non-editable paragraph</p> |
|---|
| 21 | <figcaption> |
|---|
| 22 | <p>editable paragraph</p> |
|---|
| 23 | <blockquote>editable blockquote</blockquote> |
|---|
| 24 | <h3>editable h3</h3> |
|---|
| 25 | </figcaption> |
|---|
| 26 | </figure> |
|---|
| 27 | <p>regular paragraph</p> |
|---|
| 28 | <div data-widget="widget1"> |
|---|
| 29 | <p>non-editable paragraph</p> |
|---|
| 30 | <h2> |
|---|
| 31 | editable h2 |
|---|
| 32 | </h2> |
|---|
| 33 | </div> |
|---|
| 34 | <p>regular paragraph</p> |
|---|
| 35 | </textarea> |
|---|
| 36 | <script> |
|---|
| 37 | |
|---|
| 38 | CKEDITOR.addCss( 'h2 {border: 2px solid red}' ); |
|---|
| 39 | |
|---|
| 40 | var editor = CKEDITOR.replace( 'editor1', { |
|---|
| 41 | extraPlugins: 'widget', |
|---|
| 42 | allowedContent: true, |
|---|
| 43 | startupOutlineBlocks: true, |
|---|
| 44 | // language: 'ar', |
|---|
| 45 | height: 800, |
|---|
| 46 | on: { |
|---|
| 47 | pluginsLoaded: function() { |
|---|
| 48 | this.widgets.add( 'widget1', { |
|---|
| 49 | editables: { |
|---|
| 50 | figcaption: { |
|---|
| 51 | selector: 'figcaption', |
|---|
| 52 | }, |
|---|
| 53 | h2: { |
|---|
| 54 | selector: 'h2', |
|---|
| 55 | } |
|---|
| 56 | } |
|---|
| 57 | } ); |
|---|
| 58 | } |
|---|
| 59 | } |
|---|
| 60 | } ); |
|---|
| 61 | |
|---|
| 62 | </script> |
|---|
| 63 | </body> |
|---|
| 64 | </html> |
|---|