| | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | Roundcube editor js library | |
| | | | | |
| | | | This file is part of the Roundcube web development suite | |
| | | | Copyright (C) 2006-2012, The Roundcube Dev Team | |
| | | | | |
| | | | Licensed under the GNU General Public License version 3 or | |
| | | | any later version with exceptions for skins & plugins. | |
| | | | See the README file for a full license statement. | |
| | | | | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Eric Stadtherr <estadtherr@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | */ |
| | | /** |
| | | * Roundcube editor js library |
| | | * |
| | | * This file is part of the Roundcube Webmail client |
| | | * |
| | | * @licstart The following is the entire license notice for the |
| | | * JavaScript code in this file. |
| | | * |
| | | * Copyright (c) 2006-2014, The Roundcube Dev Team |
| | | * |
| | | * The JavaScript code in this page is free software: you can |
| | | * redistribute it and/or modify it under the terms of the GNU |
| | | * General Public License (GNU GPL) as published by the Free Software |
| | | * Foundation, either version 3 of the License, or (at your option) |
| | | * any later version. The code is distributed WITHOUT ANY WARRANTY; |
| | | * without even the implied warranty of MERCHANTABILITY or FITNESS |
| | | * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details. |
| | | * |
| | | * As additional permission under GNU GPL version 3 section 7, you |
| | | * may distribute non-source (e.g., minimized or compacted) forms of |
| | | * that code without the copy of the GNU GPL normally required by |
| | | * section 4, provided you include this license notice and a URL |
| | | * through which recipients can access the Corresponding Source. |
| | | * |
| | | * @licend The above is the entire license notice |
| | | * for the JavaScript code in this file. |
| | | * |
| | | * @author Eric Stadtherr <estadtherr@gmail.com> |
| | | */ |
| | | |
| | | // Initialize HTML editor |
| | | function rcmail_editor_init(config) |
| | |
| | | if (!active) |
| | | rcmail.spellcheck_state(); |
| | | }); |
| | | ed.onKeyPress.add(function(ed, e) { |
| | | rcmail.compose_type_activity++; |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | // react to real individual tinyMCE editor init |
| | | function rcmail_editor_callback() |
| | | { |
| | | var elem = rcube_find_object('_from'), |
| | | var css = {}, |
| | | elem = rcube_find_object('_from'), |
| | | fe = rcmail.env.compose_focus_elem; |
| | | |
| | | if (rcmail.env.default_font) |
| | | $(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-family', rcmail.env.default_font); |
| | | css['font-family'] = rcmail.env.default_font; |
| | | |
| | | if (elem && elem.type == 'select-one' && !rcmail.env.opened_extwin) { |
| | | if (rcmail.env.default_font_size) |
| | | css['font-size'] = rcmail.env.default_font_size; |
| | | |
| | | if (css['font-family'] || css['font-size']) |
| | | $(tinyMCE.get(rcmail.env.composebody).getBody()).css(css); |
| | | |
| | | if (elem && elem.type == 'select-one') { |
| | | rcmail.change_identity(elem); |
| | | // Focus previously focused element |
| | | if (fe && fe.id != rcmail.env.composebody) { |
| | |
| | | |
| | | for (i in files) { |
| | | att = files[i]; |
| | | if (att.complete && att.mimetype.indexOf('image/') == 0) { |
| | | list.push([att.name, rcmail.env.comm_path+'&_action=display-attachment&_file='+i+'&_id='+rcmail.env.compose_id]); |
| | | if (att.complete && att.mimetype.startsWith('image/')) { |
| | | list.push([att.name, rcmail.env.comm_path+'&_id='+rcmail.env.compose_id+'&_action=display-attachment&_file='+i]); |
| | | } |
| | | } |
| | | |