- TinyMCE 3.3.7

release-0.6
alecpl 15 years ago
parent f821fecac8
commit 2011bef155

@ -90,7 +90,9 @@ desc:"Edit CSS Style"
paste:{
paste_text_desc:"Paste as Plain Text",
paste_word_desc:"Paste from Word",
selectall_desc:"Select All"
selectall_desc:"Select All",
plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
},
paste_dlg:{
text_title:"Use CTRL+V on your keyboard to paste the text into the window.",
@ -121,8 +123,8 @@ cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page.",
restore_content: "Restore auto-saved content",
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
restore_content:"Restore auto-saved content.",
warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?."
},
fullscreen:{
desc:"Toggle fullscreen mode"
@ -154,16 +156,15 @@ no_mpell:"No misspellings found."
pagebreak:{
desc:"Insert page break."
},
advlist : {
types : 'Types',
def : 'Default',
lower_alpha : "Lower alpha",
lower_greek : "Lower greek",
lower_roman : "Lower roman",
upper_alpha : "Upper alpha",
upper_roman : "Upper roman",
circle : "Circle",
disc : "Disc",
square : "Square"
}
}});
advlist:{
types:"Types",
def:"Default",
lower_alpha:"Lower alpha",
lower_greek:"Lower greek",
lower_roman:"Lower roman",
upper_alpha:"Upper alpha",
upper_roman:"Upper roman",
circle:"Circle",
disc:"Disc",
square:"Square"
}}});

@ -1 +1 @@
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(g,h){if(!h.ctrlKey){f._getMenu(g).showMenu(h.clientX,h.clientY);a.add(g.getDoc(),"click",e);a.cancel(h)}});function e(){if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(d.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this,g;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(h,i){if(!i.ctrlKey){if(g){h.selection.setRng(g)}f._getMenu(h).showMenu(i.clientX,i.clientY);a.add(h.getDoc(),"click",function(j){e(h,j)});a.cancel(i)}});d.onRemove.add(function(){if(f._menu){f._menu.removeAll()}});function e(h,i){g=null;if(i&&i.button==2){g=h.selection.getRng();return}if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(h.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();

@ -27,7 +27,7 @@
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed) {
var t = this;
var t = this, lastRng;
t.editor = ed;
@ -42,13 +42,33 @@
ed.onContextMenu.add(function(ed, e) {
if (!e.ctrlKey) {
// Restore the last selection since it was removed
if (lastRng)
ed.selection.setRng(lastRng);
t._getMenu(ed).showMenu(e.clientX, e.clientY);
Event.add(ed.getDoc(), 'click', hide);
Event.add(ed.getDoc(), 'click', function(e) {
hide(ed, e);
});
Event.cancel(e);
}
});
function hide() {
ed.onRemove.add(function() {
if (t._menu)
t._menu.removeAll();
});
function hide(ed, e) {
lastRng = null;
// Since the contextmenu event moves
// the selection we need to store it away
if (e && e.button == 2) {
lastRng = ed.selection.getRng();
return;
}
if (t._menu) {
t._menu.removeAll();
t._menu.destroy();

File diff suppressed because one or more lines are too long

@ -113,9 +113,9 @@
if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
if (getParam(ed, "paste_text_sticky")) {
ed.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.");
ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
} else {
ed.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode.");
ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
}
if (!getParam(ed, "paste_text_notifyalways")) {
@ -134,6 +134,13 @@
function grabContent(e) {
var n, or, rng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY;
// Check if browser supports direct plaintext access
if (ed.pasteAsPlainText && (e.clipboardData || dom.doc.dataTransfer)) {
e.preventDefault();
process({content : (e.clipboardData || dom.doc.dataTransfer).getData('Text')}, true);
return;
}
if (dom.get('_mcePaste'))
return;
@ -207,8 +214,12 @@
dom.remove(n, 1);
});
// Contents in WebKit is sometimes wrapped in a apple style span so we need to grab it from that one
h += (dom.select('> span.Apple-style-span div', n)[0] || dom.select('> span.Apple-style-span', n)[0] || n).innerHTML;
// Remove apply style spans
each(dom.select('span.Apple-style-span', n), function(n) {
dom.remove(n, 1);
});
h += n.innerHTML;
});
// Remove the nodes
@ -707,10 +718,10 @@
* Inserts the specified contents at the caret position.
*/
_insert : function(h, skip_undo) {
var ed = this.editor;
var ed = this.editor, r = ed.selection.getRng();
// First delete the contents seems to work better on WebKit
if (!ed.selection.isCollapsed())
// First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
ed.getDoc().execCommand('Delete', false, null);
// It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents

@ -65,7 +65,8 @@ class GoogleSpell extends SpellChecker {
}
// Setup XML request
$xml = '<?xml version="1.0" encoding="utf-8" ?><spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>';
$xml = '<?xml version="1.0" encoding="utf-8" ?>\
<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1"><text>' . $str . '</text></spellrequest>';
$header = "POST ".$path." HTTP/1.0 \r\n";
$header .= "MIME-Version: 1.0 \r\n";

File diff suppressed because one or more lines are too long

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $
* editor_plugin_src.js
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
@ -15,7 +18,7 @@
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
version : "2.0.2"
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
},
@ -24,9 +27,30 @@
t.url = url;
t.editor = ed;
t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
if (t.rpcUrl == '{backend}') {
// Sniff if the browser supports native spellchecking (Don't know of a better way)
if (tinymce.isIE)
return;
t.hasSupport = true;
// Disable the context menu when spellchecking is active
ed.onContextMenu.addToTop(function(ed, e) {
if (t.active)
return false;
});
}
// Register commands
ed.addCommand('mceSpellCheck', function() {
if (t.rpcUrl == '{backend}') {
// Enable/disable native spellchecker
t.editor.getBody().spellcheck = t.active = !t.active;
return;
}
if (!t.active) {
ed.setProgressState(1);
t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
@ -37,7 +61,9 @@
ed.nodeChanged();
} else {
ed.setProgressState(0);
ed.windowManager.alert('spellchecker.no_mpell');
if (ed.getParam('spellchecker_report_no_misspellings', true))
ed.windowManager.alert('spellchecker.no_mpell');
}
});
} else
@ -89,6 +115,15 @@
var t = this, c, ed = t.editor;
if (n == 'spellchecker') {
// Use basic button if we use the native spellchecker
if (t.rpcUrl == '{backend}') {
// Create simple toggle button if we have native support
if (t.hasSupport)
c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
return c;
}
c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
c.onRenderMenu.add(function(c, m) {
@ -141,7 +176,7 @@
},
_getWords : function() {
var ed = this.editor, wl = [], tx = '', lo = {};
var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
// Get area text
this._walk(ed.getBody(), function(n) {
@ -149,12 +184,19 @@
tx += n.nodeValue + ' ';
});
// Split words by separator
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
// split the text up into individual words
if (ed.getParam('spellchecker_word_pattern')) {
// look for words that match the pattern
rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
} else {
// Split words by separator
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
rawWords = tx.split(' ');
}
// Build word array and remove duplicates
each(tx.split(' '), function(v) {
each(rawWords, function(v) {
if (!lo[v]) {
wl.push(v);
lo[v] = 1;
@ -219,7 +261,9 @@
},
_showMenu : function(ed, e) {
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin());
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
e = 0; // Fixes IE memory leak
if (!m) {
p1 = DOM.getPos(ed.getContentAreaContainer());
@ -234,18 +278,20 @@
t._menu = m;
}
if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) {
if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
m.removeAll();
m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) {
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
var ignoreRpc;
m.removeAll();
if (r.length > 0) {
m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
each(r, function(v) {
m.add({title : v, onclick : function() {
dom.replace(ed.getDoc().createTextNode(v), e.target);
dom.replace(ed.getDoc().createTextNode(v), wordSpan);
t._checkDone();
}});
});
@ -254,28 +300,67 @@
} else
m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
m.add({
title : 'spellchecker.ignore_word',
onclick : function() {
dom.remove(e.target, 1);
var word = wordSpan.innerHTML;
dom.remove(wordSpan, 1);
t._checkDone();
// tell the server if we need to
if (ignoreRpc) {
ed.setProgressState(1);
t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
ed.setProgressState(0);
});
}
}
});
m.add({
title : 'spellchecker.ignore_words',
onclick : function() {
t._removeWords(dom.decode(e.target.innerHTML));
var word = wordSpan.innerHTML;
t._removeWords(dom.decode(word));
t._checkDone();
// tell the server if we need to
if (ignoreRpc) {
ed.setProgressState(1);
t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
ed.setProgressState(0);
});
}
}
});
if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
m.add({
title : 'spellchecker.learn_word',
onclick : function() {
var word = wordSpan.innerHTML;
dom.remove(wordSpan, 1);
t._checkDone();
ed.setProgressState(1);
t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
ed.setProgressState(0);
});
}
});
}
m.update();
});
ed.selection.select(e.target);
p1 = dom.getPos(e.target);
m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y);
ed.selection.select(wordSpan);
p1 = dom.getPos(wordSpan);
m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
return tinymce.dom.Event.cancel(e);
} else
@ -312,16 +397,10 @@
},
_sendRPC : function(m, p, cb) {
var t = this, url = t.editor.getParam("spellchecker_rpc_url", this.url+'/rpc.php');
if (url == '{backend}') {
t.editor.setProgressState(0);
alert('Please specify: spellchecker_rpc_url');
return;
}
var t = this;
JSONRequest.sendRPC({
url : url,
url : t.rpcUrl,
method : m,
params : p,
success : cb,
@ -335,4 +414,4 @@
// Register plugin
tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
})();
})();

@ -51,6 +51,7 @@ if (!$raw) {
if (!$raw)
die('{"result":null,"id":null,"error":{"errstr":"Could not get raw post data.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
// Passthrough request to remote server
if (isset($config['general.remote_rpc_url'])) {
$url = parse_url($config['general.remote_rpc_url']);
@ -87,6 +88,7 @@ if (isset($config['general.remote_rpc_url'])) {
die();
}
console($raw);
// Get JSON data
$json = new Moxiecode_JSON();
$input = $json->decode($raw);
@ -105,6 +107,7 @@ $output = array(
"error" => null
);
console($json->encode($output));
// Return JSON encoded string
echo $json->encode($output);

File diff suppressed because one or more lines are too long

@ -25,6 +25,13 @@
selectedCell = getCell(startPos.x, startPos.y);
}
function cloneNode(node, children) {
node = node.cloneNode(children);
node.removeAttribute('id');
return node;
}
function buildGrid() {
var startY = 0;
@ -122,7 +129,7 @@
if (node.nodeType == 3) {
each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
node = node.cloneNode(false);
node = cloneNode(node, false);
if (!formatNode)
formatNode = curNode = node;
@ -140,7 +147,7 @@
}
}, 'childNodes');
cell = cell.cloneNode(false);
cell = cloneNode(cell, false);
cell.rowSpan = cell.colSpan = 1;
if (formatNode) {
@ -309,7 +316,7 @@
if (isCellSelected(cell)) {
cell = cell.elm;
rowElm = cell.parentNode;
newRow = rowElm.cloneNode(false);
newRow = cloneNode(rowElm, false);
posY = y;
if (before)
@ -490,7 +497,7 @@
var rows = getSelectedRows();
each(rows, function(row, i) {
rows[i] = row.cloneNode(true);
rows[i] = cloneNode(row, true);
});
return rows;
@ -879,7 +886,7 @@
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
var sm, se = ed.selection, el = se.getNode() || ed.getBody();
if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th')) {
if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
m.removeAll();
if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {

@ -24,7 +24,7 @@ function init() {
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
var className = ed.dom.getAttrib(tdElm, 'class');
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
var id = ed.dom.getAttrib(tdElm, 'id');
var lang = ed.dom.getAttrib(tdElm, 'lang');
var dir = ed.dom.getAttrib(tdElm, 'dir');

@ -19,7 +19,7 @@ function init() {
var height = trimSize(getStyle(trElm, 'height', 'height'));
var className = dom.getAttrib(trElm, 'class');
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
var id = dom.getAttrib(trElm, 'id');
var lang = dom.getAttrib(trElm, 'lang');
var dir = dom.getAttrib(trElm, 'dir');

@ -316,7 +316,7 @@ function init() {
style = dom.serializeStyle(st);
dir = dom.getAttrib(elm, 'dir');
lang = dom.getAttrib(elm, 'lang');
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
orgTableWidth = width;
@ -425,7 +425,7 @@ function changedStyle() {
var st = dom.parseStyle(formObj.style.value);
if (st['background-image'])
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
else
formObj.backgroundimage.value = '';

@ -2,7 +2,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#advanced_dlg.charmap_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/charmap.js"></script>
</head>

File diff suppressed because one or more lines are too long

@ -203,7 +203,7 @@
ed.formatter.register(name, {
inline : 'span',
classes : o['class'],
attributes : {'class' : o['class']},
selector : '*'
});
@ -219,7 +219,24 @@
ctrl = ctrlMan.createListBox('styleselect', {
title : 'advanced.style_select',
onselect : function(name) {
ed.execCommand('mceToggleFormat', false, name);
var matches, formatNames = [];
each(ctrl.items, function(item) {
formatNames.push(item.value);
});
ed.focus();
ed.undoManager.add();
// Toggle off the current format
matches = ed.formatter.matchAll(formatNames);
if (matches[0] == name)
ed.formatter.remove(name);
else
ed.formatter.apply(name);
ed.undoManager.add();
ed.nodeChanged();
return false; // No auto select
}
@ -251,7 +268,8 @@
ed.formatter.register(name, {
inline : 'span',
classes : val
classes : val,
selector : '*'
});
ctrl.add(t.editor.translate(key), name);
@ -283,6 +301,12 @@
title : 'advanced.fontdefault',
onselect : function(v) {
ed.execCommand('FontName', false, v);
// Fake selection, execCommand will fire a nodeChange and update the selection
c.select(function(sv) {
return v == sv;
});
return false; // No auto select
}
});
@ -300,16 +324,19 @@
var t = this, ed = t.editor, c, i = 0, cl = [];
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
if (v.fontSize)
if (v['class']) {
ed.focus();
ed.undoManager.add();
ed.formatter.toggle('fontsize_class', {value : v['class']});
ed.undoManager.add();
ed.nodeChanged();
} else
ed.execCommand('FontSize', false, v.fontSize);
else {
each(t.settings.theme_advanced_font_sizes, function(v, k) {
if (v['class'])
cl.push(v['class']);
});
ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl});
}
// Fake selection, execCommand will fire a nodeChange and update the selection
c.select(function(sv) {
return v == sv;
});
return false; // No auto select
}});

@ -210,4 +210,4 @@
.defaultSkin span.mce_ins {background-position:-960px -20px}
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px}
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}

@ -212,4 +212,4 @@
.o2k7Skin span.mce_ins {background-position:-960px -20px}
.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px}
.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}

@ -1,6 +1,5 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>{#advanced_dlg.code_title}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/source_editor.js"></script>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save