| | |
| | | function rcube_text_editor(config, id) |
| | | { |
| | | var ref = this, |
| | | abs_url = location.href.replace(/[?#].*$/, '').replace(/\/$/, ''), |
| | | conf = { |
| | | selector: '#' + ($('#' + id).is('.mce_editor') ? id : 'fake-editor-id'), |
| | | cache_suffix: 's=4010700', |
| | | theme: 'modern', |
| | | language: config.lang, |
| | | content_css: 'program/js/tinymce/roundcube/content.css', |
| | | content_css: rcmail.assets_path('program/js/tinymce/roundcube/content.css'), |
| | | menubar: false, |
| | | statusbar: false, |
| | | toolbar_items_size: 'small', |
| | |
| | | toolbar: 'bold italic underline | alignleft aligncenter alignright alignjustify' |
| | | + ' | bullist numlist outdent indent ltr rtl blockquote | forecolor backcolor | fontselect fontsizeselect' |
| | | + ' | link unlink table | emoticons charmap image media | code searchreplace undo redo', |
| | | spellchecker_rpc_url: '../../../../../?_task=utils&_action=spell_html&_remote=1', |
| | | spellchecker_rpc_url: abs_url + '/?_task=utils&_action=spell_html&_remote=1', |
| | | spellchecker_language: rcmail.env.spell_lang, |
| | | accessibility_focus: false, |
| | | file_browser_callback: function(name, url, type, win) { ref.file_browser_callback(name, url, type); }, |
| | |
| | | content = input.val(); |
| | | |
| | | // replace current text signature with temp mark |
| | | if (is_sig) |
| | | content = content.replace(signature.text, sig_mark); |
| | | if (is_sig) { |
| | | content = content.replace(/\r\n/, "\n"); |
| | | content = content.replace(signature.text.replace(/\r\n/, "\n"), sig_mark); |
| | | } |
| | | |
| | | var init_editor = function(data) { |
| | | // replace signature mark with html version of the signature |