| 4 | | arguments.callee.applySuper( this, arguments ); |
| 5 | | this.editor.emoticon = this.addComponent( new MT.App.Emoticon( "emoticon", "emoticon" ) ); |
| | 4 | if ( this.constructor.Editor && DOM.getElement( "editor-content" ) ) { |
| | 5 | |
| | 6 | var mode = DOM.getElement( "convert_breaks" ); |
| | 7 | DOM.addEventListener( mode, "change", this.getIndirectEventListener( "setTextareaMode" ) ); |
| | 8 | |
| | 9 | /* special case */ |
| | 10 | window.cur_text_format = mode.value; |
| | 11 | |
| | 12 | this.editorMode = ( mode.value == "richtext" ) ? "iframe" : "textarea"; |
| | 13 | |
| | 14 | this.editor = this.addComponent( new MT.App.Editor.Emoticon( "editor-content", this.editorMode ) ); |
| | 15 | this.editor.textarea.setTextMode( mode.value ); |
| | 16 | this.editor.emoticon = this.addComponent( new MT.App.Emoticon( "emoticon", "emoticon" ) ); |
| | 17 | |
| | 18 | this.editorInput = { |
| | 19 | content: DOM.getElement( "editor-input-content" ), |
| | 20 | extended: DOM.getElement( "editor-input-extended" ) |
| | 21 | }; |
| | 22 | |
| | 23 | if ( this.editorInput.content.value ) |
| | 24 | this.editor.setHTML( this.editorInput.content.value ); |
| | 25 | } |