| 1 | <!DOCTYPE html> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <script src="http://ckeditor.com/apps/ckeditor/4.2/ckeditor.js"></script> |
|---|
| 5 | <link rel="stylesheet" href="http://ckeditor.com/apps/ckeditor/4.2/samples/sample.css"> |
|---|
| 6 | </head> |
|---|
| 7 | |
|---|
| 8 | <body> |
|---|
| 9 | EDITOR 1 - STANDARD TOOLBAR |
|---|
| 10 | <br> |
|---|
| 11 | <textarea name="standard" id="standard">CKEDITOR.replace( 'standard' );<br/><br/><span class="marker">This is text meant to be highlighted</span></textarea> |
|---|
| 12 | |
|---|
| 13 | <br /> |
|---|
| 14 | <br /> |
|---|
| 15 | <br /> |
|---|
| 16 | |
|---|
| 17 | EDITOR 2 - SHARED INLINE TOOLBAR |
|---|
| 18 | <br> |
|---|
| 19 | <div id="top"></div> |
|---|
| 20 | <textarea name="shared" id="shared"> |
|---|
| 21 | CKEDITOR.inline( 'shared', {<br/> |
|---|
| 22 | extraPlugins: 'sharedspace',<br/> |
|---|
| 23 | removePlugins: 'floatingspace,resize',<br/> |
|---|
| 24 | sharedSpaces: {<br/> |
|---|
| 25 | top: 'top',<br/> |
|---|
| 26 | }<br/> |
|---|
| 27 | });<br/> |
|---|
| 28 | |
|---|
| 29 | <span class="marker">This is text meant to be highlighted, but is not</span> |
|---|
| 30 | </textarea> |
|---|
| 31 | |
|---|
| 32 | <br /> |
|---|
| 33 | <br /> |
|---|
| 34 | <br /> |
|---|
| 35 | |
|---|
| 36 | EDITOR 3 - FLOATING INLINE TOOLBAR |
|---|
| 37 | <br /> |
|---|
| 38 | <textarea name="floating"> |
|---|
| 39 | CKEDITOR.inline( 'floating', {<br/> |
|---|
| 40 | extraPlugins: 'floatingspace',<br/> |
|---|
| 41 | removePlugins: 'sharedspace,resize',<br/> |
|---|
| 42 | <br/> |
|---|
| 43 | });<br/> |
|---|
| 44 | <br /> |
|---|
| 45 | <span class="marker">This text is meant to be highlighted, but is not</span> |
|---|
| 46 | </textarea> |
|---|
| 47 | |
|---|
| 48 | EDITOR 4 - DEFAULT INLINE TOOLBAR |
|---|
| 49 | <br /> |
|---|
| 50 | <textarea name="none"> |
|---|
| 51 | CKEDITOR.inline( 'none' );<br/> |
|---|
| 52 | <br /> |
|---|
| 53 | <span class="marker">This text is meant to be highlighted, but is not</span> |
|---|
| 54 | </textarea> |
|---|
| 55 | |
|---|
| 56 | <script> |
|---|
| 57 | // Turn off automatic editor creation first. |
|---|
| 58 | CKEDITOR.disableAutoInline = true; |
|---|
| 59 | |
|---|
| 60 | CKEDITOR.replace( 'standard' ); |
|---|
| 61 | |
|---|
| 62 | CKEDITOR.inline( 'shared', { |
|---|
| 63 | extraPlugins: 'sharedspace', |
|---|
| 64 | removePlugins: 'floatingspace,resize', |
|---|
| 65 | sharedSpaces: { |
|---|
| 66 | top: 'top', |
|---|
| 67 | } |
|---|
| 68 | }); |
|---|
| 69 | |
|---|
| 70 | CKEDITOR.inline( 'floating', { |
|---|
| 71 | extraPlugins: 'floatingspace', |
|---|
| 72 | removePlugins: 'sharedspace,resize', |
|---|
| 73 | }); |
|---|
| 74 | |
|---|
| 75 | CKEDITOR.inline( 'none' ); |
|---|
| 76 | </script> |
|---|
| 77 | </body> |
|---|
| 78 | </html> |
|---|
| 79 | |
|---|