34 | | } |
35 | | }); |
| 39 | |
| 40 | }, |
| 41 | afterInit : useFake ? function( editor ) |
| 42 | { |
| 43 | // Direct fake objects lang entry to plugin. |
| 44 | editor.lang.fakeobjects.hr = editor.lang.horizontalrule; |
| 45 | |
| 46 | // Add the style that renders the horizontal line. |
| 47 | editor.addCss( |
| 48 | 'img.cke_hr' + |
| 49 | '{' + |
| 50 | 'background-image: url(' + ( CKEDITOR.basePath + 'images/spacer.gif' ) + ');' + |
| 51 | 'clear: both;' + |
| 52 | 'display: block;' + |
| 53 | 'float: none;' + |
| 54 | 'width:100% !important; _width:99.9% !important;' + |
| 55 | 'border-top: #808080 1px solid;' + |
| 56 | 'border-bottom: #808080 1px solid;' + |
| 57 | 'height: 0px !important;' + |
| 58 | '}' ); |
| 59 | |
| 60 | // Register a filter to transform placeholders on data input. |
| 61 | var dataProcessor = editor.dataProcessor, |
| 62 | dataFilter = dataProcessor && dataProcessor.dataFilter; |
| 63 | dataFilter && dataFilter.addRules( { elements : { hr : function( element ) { return editor.createFakeParserElement( element, 'cke_hr', 'hr' ); } } } ); |
| 64 | } : null |
| 65 | } ); |