| | |
| | | /**
|
| | | * $Id: editor_template_src.js 766 2008-04-03 20:37:06Z spocke $
|
| | | * $Id: editor_template_src.js 852 2008-05-27 05:52:09Z spocke $
|
| | | *
|
| | | * @author Moxiecode
|
| | | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
|
| | |
| | | return false;
|
| | | },
|
| | |
|
| | | _importClasses : function() {
|
| | | _importClasses : function(e) {
|
| | | var ed = this.editor, c = ed.controlManager.get('styleselect');
|
| | |
|
| | | if (c.getLength() == 0) {
|
| | |
| | | });
|
| | |
|
| | | c.onPostRender.add(function(ed, n) {
|
| | | Event.add(n, 'focus', t._importClasses, t);
|
| | | Event.add(n, 'mousedown', t._importClasses, t);
|
| | | Event.add(n.id + '_text', 'focus', t._importClasses, t);
|
| | | Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | },
|
| | |
|
| | | _createFontSizeSelect : function() {
|
| | | var c, t = this, lo = [
|
| | | var t = this, ed = t.editor, c, lo = [
|
| | | "1 (8 pt)",
|
| | | "2 (10 pt)",
|
| | | "3 (12 pt)",
|
| | |
| | | "7 (36 pt)"
|
| | | ], fz = [8, 10, 12, 14, 18, 24, 36];
|
| | |
|
| | | c = t.editor.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
|
| | | c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
|
| | | if (c) {
|
| | | each(explode(t.settings.theme_advanced_font_sizes), function(v) {
|
| | | c.add(lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
|
| | | each(ed.getParam('theme_advanced_font_sizes', t.settings.theme_advanced_font_sizes, 'hash'), function(v, k) {
|
| | | c.add(k != v ? k : lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | each(explode(s.theme_advanced_containers || ''), function(c, i) {
|
| | | var v = s['theme_advanced_container_' + c] || '';
|
| | |
|
| | | switch (c.toLowerCase()) {
|
| | | switch (v.toLowerCase()) {
|
| | | case 'mceeditor':
|
| | | n = DOM.add(tb, 'tr');
|
| | | n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
| | |
| | | break;
|
| | |
|
| | | default:
|
| | | a = s['theme_advanced_container_' + c + '_align'].toLowerCase();
|
| | | a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
|
| | | a = 'mce' + t._ufirst(a);
|
| | |
|
| | | n = DOM.add(DOM.add(tb, 'tr'), 'td', {
|
| | |
| | | c.select(ed.queryCommandValue('FontName'));
|
| | |
|
| | | if (c = cm.get('fontsizeselect'))
|
| | | c.select(ed.queryCommandValue('FontSize'));
|
| | | c.select('' + ed.queryCommandValue('FontSize'));
|
| | |
|
| | | if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
|
| | | p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
|
| | |
| | | var t = this;
|
| | |
|
| | | this._mceColorPicker(0, {
|
| | | color: t.fgColor,
|
| | | func : function(co) {
|
| | | t.fgColor = co;
|
| | | t.editor.execCommand('ForeColor', false, co);
|
| | | }
|
| | | });
|
| | |
| | | var t = this;
|
| | |
|
| | | this._mceColorPicker(0, {
|
| | | color: t.bgColor,
|
| | | func : function(co) {
|
| | | t.bgColor = co;
|
| | | t.editor.execCommand('HiliteColor', false, co);
|
| | | }
|
| | | });
|