var myEditor = new YAHOO.widget.Editor('msgpost', { css: '* { font-family: "Verdana"; font-size: 11px; color: white; line-height: 16px;} html { background-color: black; } body.gecko, .yui-tmp { background-color: black; height: 300px; width: 280px; font-family: "Verdana"; font-size: 11px; } img, .gecko img { border: 0px; } u, .gecko u, span u, .gecko span u, h1 u, .gecko h1 u, h2 u, .gecko h2 u, h3 u, .gecko h3 u { text-decoration: underline; } span, .gecko span { font-family: Verdana; } div ul, div ol, .gecko div div ul, .gecko div div ol, .gecko div ul, .gecko div ol, span ul, span ol, .gecko span ul, .gecko span ol, ol, .gecko ol, ul, .gecko ul { padding: 10px 0px 10px 10px; margin: 0 0 0 20px; } .gecko li, li { line-height: 16px; font-size: 11px; padding: 0 0 0 0px; margin: 0 0 0 0px; } blockquote, .gecko blockquote { margin: 10px; padding: 0; } p, .gecko p, div, .gecko div, div span, .gecko div a, div a, .gecko div span, pre, .gecko pre, .yui-tmp { line-height: 16px; font-size: 11px; padding: 0 0 5px 0; margin: 0px; } h1, .gecko h1 { line-height: 16px; font-size: 14px; font-weight: bold; padding: 0 0 15px 0; margin: 0px; } h1 a, .gecko h1 a, h1 b, .gecko h1 b, h1 span, .gecko h1 span, h1 u, .gecko h1 u { font-size: 14px !important; font-weight: bold !important; } h2, .gecko h2 { line-height: 16px !important; font-size: 13px !important; padding: 0 0 5px 0; margin: 0px; font-weight: bold; } h2 a, .gecko h2 a, h2 b, .gecko h2 b, h2 span, .gecko h2 span, h2 u, .gecko h2 u { font-size: 13px !important; font-weight: bold !important; } h3, .gecko h3 { line-height: 16px; font-size: 12px; padding: 0 0 5px 0; margin: 0px; font-weight: bold; } h3 a, .gecko h3 a, h3 b, .gecko h3 b, h3 span, .gecko h3 span, h3 u, .gecko h3 u { font-size: 12px !important; font-weight: bold !important; } a, .gecko a { color: #fff !important; text-decoration: underline !important; } a:hover, .gecko a:hover { text-decoration: none; color: #fff; } #logo img, .gecko #logo img { margin: 5px 0; border: 0; }' + YAHOO.widget.SimpleEditor.prototype._defaultCSS, width: '300px', height: '300px', animat: true, dompath: true, focusAtStart: true, toolbar: { titlebar: 'Text bearbeiten', buttonType: 'basic', buttons: [ { group: 'fontstyle', label: 'Schrift bearbeiten', buttons: [ { type: 'spin', label: '10', value: 'fontsize', range: [9, 32], disabled: true }, { type: 'separator' } , { type: 'push', label: 'Fett(bold) CTRL + SHIFT + B', value: 'bold' }, { type: 'push', label: 'Kursiv(italic) CTRL + SHIFT + I', value: 'italic' }, { type: 'push', label: 'Unterstreichen CTRL + SHIFT + U', value: 'underline' }, { type: 'separator' }, { type: 'select', label: 'Normal', value: 'heading', menu: [ { text: 'Normal', value: 'none', checked: true }, { text: 'Text Absatz', value: 'div' }, { text: 'Header 1', value: 'h1' }, { text: 'Header 2', value: 'h2' }, { text: 'Header 3', value: 'h3' } ] } ] }, { group: 'misc', label: 'Aktionen', buttons: [ { type: 'push', label: 'Loeschen', value: 'delete' }, { type: 'push', label: 'Vorschau', value: 'preview' }, { type: 'push', label: 'Speichern', value: 'save' } ] }, { group: 'insert', label: 'Einfügen', buttons: [ { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true }, { type: 'push', label: 'Dokument auswaehlen', value: 'fileselector' }, { type: 'push', label: 'Bild einfuegen', value: 'insertimage' }, { type: 'push', label: 'Bild auswaehlen', value: 'imageselector' } ] }, { group: 'indentlist', label: 'Listen & Co.', buttons: [ { type: 'push', label: 'Unsortierte Liste', value: 'insertunorderedlist' }, { type: 'push', label: 'Sortierte Liste', value: 'insertorderedlist' }, { type: 'separator' }, { type: 'push', label: 'Einruecken', value: 'indent' }, { type: 'push', label: 'Ausruecken', value: 'outdent' } ] } ] } }); myEditor.on( 'toolbarLoaded', function() { this.toolbar.on( 'imageselectorClick', function() { var _sel = this._getSelectedElement(); if (_sel && _sel.tagName && (_sel.tagName.toLowerCase() == 'img')) { } else { win = window.open('./image_selector.php', 'IMAGE_BROWSER', 'left=20,top=20,width=500,height=500,toolbar=0,resizable=yes,status=0,scrollbars=yes'); if (!win) { alert('Bitte stellen Sie Ihren PopUp-Blocker aus oder fügen diese Seite als Ausnahme zur Ausnahmeliste hinzu!!'); } return false; } }, this, true ); }, myEditor, true ); myEditor.on( 'toolbarLoaded', function() { this.toolbar.on( 'fileselectorClick', function() { var _sel = this._getSelectedElement(); if (_sel && _sel.tagName && (_sel.tagName.toLowerCase() == 'img')) { } else { win = window.open('./file_selector.php', 'FILE_BROWSER', 'left=20,top=20,width=500,height=500,toolbar=0,resizable=yes,status=0,scrollbars=yes'); if (!win) { alert('Bitte stellen Sie Ihren PopUp-Blocker aus oder fügen diese Seite als Ausnahme zur Ausnahmeliste hinzu!!'); } return false; } }, this, true ); }, myEditor, true ); myEditor.on( 'toolbarLoaded', function() { this.toolbar.on( 'previewClick', function() { myEditor.saveHTML(); document.getElementById('iframe').innerHTML = myEditor.get('element').value; }, this, true ); }, myEditor, true ); myEditor.on( 'toolbarLoaded', function() { this.toolbar.on( 'saveClick', function() { myEditor.saveHTML(); document.getElementById('iframe').innerHTML = myEditor.get('element').value; if(confirm('Den Inhalt der Seite - ' + document.msgform.id.value + ' - wirklich speichern?')) { var html = myEditor.get('element').value; document.getElementById('iframe').innerHTML = 'Daten werden gespeichert...'; var f = document.getElementById('msgform'); var a = new ajax('iframe', 'fuses/save_data.php', document.getElementById('msgform')); a.request(); } }, this, true ); }, myEditor, true ); myEditor.on( 'toolbarLoaded', function() { this.toolbar.on( 'deleteClick', function() { if(confirm('Diese Seite wirklich entfernen?')) { var a = new ajax('engine', 'fuses/del_data.php', document.getElementById('msgform')); a.request(); } }, this, true ); }, myEditor, true ); myEditor.on( 'afterOpenWindow', function() { var url = Dom.get('imageselector_url'); if (url) { url.disabled = true; } }, myEditor, true );