- TinyMCE 3.3.1

release-0.6
alecpl 14 years ago
parent 258a043a31
commit 69d05c3710

@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
- TinyMCE 3.3.1
- Implemented messages copying using drag&drop + SHIFT (#1484086)
- Improved performance of folders operations (#1486525)
- Fix blocked.gif attachment is not attached to the message (#1486516)

@ -120,7 +120,9 @@ col:"Column",
cell:"Cell"
},
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page."
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?"
},
fullscreen:{
desc:"Toggle fullscreen mode"
@ -151,4 +153,17 @@ 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"
}
}});

@ -1,18 +1,43 @@
/**
* $Id: editor_plugin_src.js 848 2008-05-15 11:54:40Z 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() {
var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
/**
* This plugin a context menu to TinyMCE editor instances.
*
* @class tinymce.plugins.ContextMenu
*/
tinymce.create('tinymce.plugins.ContextMenu', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @method init
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed) {
var t = this;
t.editor = ed;
/**
* This event gets fired when the context menu is shown.
*
* @event onContextMenu
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
*/
t.onContextMenu = new tinymce.util.Dispatcher(this);
ed.onContextMenu.add(function(ed, e) {
@ -35,6 +60,13 @@
ed.onKeyDown.add(hide);
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @method getInfo
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Contextmenu',

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z 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() {

@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.EmotionsPlugin",{init:function(a,b){a.addCommand("mceEmotion",function(){a.windowManager.open({file:b+"/emotions.htm",width:250+parseInt(a.getLang("emotions.delta_width",0)),height:160+parseInt(a.getLang("emotions.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("emotions",tinymce.plugins.EmotionsPlugin)})();
(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce);

@ -1,11 +1,14 @@
/**
* $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z 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() {
(function(tinymce) {
tinymce.create('tinymce.plugins.EmotionsPlugin', {
init : function(ed, url) {
// Register commands
@ -37,4 +40,4 @@
// Register plugin
tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
})();
})(tinymce);

File diff suppressed because one or more lines are too long

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 1222 2009-09-03 17:26:47Z 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() {
@ -234,7 +237,7 @@
if (stc) {
ob = dom.create('span', {
id : p.id,
mce_name : 'object',
_mce_name : 'object',
type : 'application/x-shockwave-flash',
data : p.src,
style : dom.getAttrib(n, 'style'),
@ -244,7 +247,7 @@
} else {
ob = dom.create('span', {
id : p.id,
mce_name : 'object',
_mce_name : 'object',
classid : "clsid:" + o.classid,
style : dom.getAttrib(n, 'style'),
codebase : o.codebase,
@ -260,12 +263,12 @@
k = 'url';
if (v)
dom.add(ob, 'span', {mce_name : 'param', name : k, '_mce_value' : v});
dom.add(ob, 'span', {_mce_name : 'param', name : k, '_mce_value' : v});
}
});
if (!stc)
dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p));
dom.add(ob, 'span', tinymce.extend({_mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p));
return ob;
},

@ -809,13 +809,8 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z 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() {

File diff suppressed because one or more lines are too long

@ -1,16 +1,46 @@
/**
* $Id: editor_plugin_src.js 1225 2009-09-07 19:06:19Z 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() {
var each = tinymce.each;
var each = tinymce.each,
entities = null,
defs = {
paste_auto_cleanup_on_paste : true,
paste_block_drop : false,
paste_retain_style_properties : "none",
paste_strip_class_attributes : "mso",
paste_remove_spans : false,
paste_remove_styles : false,
paste_remove_styles_if_webkit : true,
paste_convert_middot_lists : true,
paste_convert_headers_to_strong : false,
paste_dialog_width : "450",
paste_dialog_height : "400",
paste_text_use_dialog : false,
paste_text_sticky : false,
paste_text_notifyalways : false,
paste_text_linebreaktype : "p",
paste_text_replacements : [
[/\u2026/g, "..."],
[/[\x93\x94\u201c\u201d]/g, '"'],
[/[\x60\x91\x92\u2018\u2019]/g, "'"]
]
};
function getParam(ed, name) {
return ed.getParam(name, defs[name]);
}
tinymce.create('tinymce.plugins.PastePlugin', {
init : function(ed, url) {
var t = this, cb;
var t = this;
t.editor = ed;
t.url = url;
@ -33,8 +63,12 @@
ed.execCallback('paste_postprocess', pl, o);
});
// Initialize plain text flag
ed.pasteAsPlainText = false;
// This function executes the process handlers and inserts the contents
function process(o) {
// force_rich overrides plain text mode set by user, important for pasting with execCommand
function process(o, force_rich) {
var dom = ed.dom;
// Execute pre process handlers
@ -49,18 +83,51 @@
// Serialize content
o.content = ed.serializer.serialize(o.node, {getInner : 1});
// Insert cleaned content. We need to handle insertion of contents containing block elements separately
if (/<(p|h[1-6]|ul|ol)/.test(o.content))
// Plain text option active?
if ((!force_rich) && (ed.pasteAsPlainText)) {
t._insertPlainText(ed, dom, o.content);
if (!getParam(ed, "paste_text_sticky")) {
ed.pasteAsPlainText = false;
ed.controlManager.setActive("pastetext", false);
}
} else if (/<(p|h[1-6]|ul|ol)/.test(o.content)) {
// Handle insertion of contents containing block elements separately
t._insertBlockContent(ed, dom, o.content);
else
} else {
t._insert(o.content);
};
}
}
// Add command for external usage
ed.addCommand('mceInsertClipboardContent', function(u, o) {
process(o);
process(o, true);
});
if (!getParam(ed, "paste_text_use_dialog")) {
ed.addCommand('mcePasteText', function(u, v) {
var cookie = tinymce.util.Cookie;
ed.pasteAsPlainText = !ed.pasteAsPlainText;
ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
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.");
} else {
ed.windowManager.alert("Paste is now in plain text mode. Click again to toggle back to regular paste mode.");
}
if (!getParam(ed, "paste_text_notifyalways")) {
cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
}
}
});
}
ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
// This function grabs the contents from the clipboard by adding a
// hidden div and placing the caret inside it and after the browser paste
// is done it grabs that contents and processes that
@ -71,7 +138,7 @@
return;
// Create container to paste into
n = dom.add(body, 'div', {id : '_mcePaste'}, '\uFEFF');
n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste'}, '\uFEFF');
// If contentEditable mode we need to find out the position of the closest element
if (body != ed.getDoc().body)
@ -112,6 +179,14 @@
// Block the real paste event
return tinymce.dom.Event.cancel(e);
} else {
function block(e) {
e.preventDefault();
};
// Block mousedown and click to prevent selection change
dom.bind(ed.getDoc(), 'mousedown', block);
dom.bind(ed.getDoc(), 'keydown', block);
or = ed.selection.getRng();
// Move caret into hidden div
@ -123,10 +198,16 @@
// Wait a while and grab the pasted contents
window.setTimeout(function() {
var h = '', nl = dom.select('div[id=_mcePaste]');
var h = '', nl = dom.select('div.mcePaste');
// WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
each(nl, function(n) {
// WebKit duplicates the divs so we need to remove them
each(dom.select('div.mcePaste', n), function(n) {
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;
});
@ -140,12 +221,16 @@
sel.setRng(or);
process({content : h});
// Unblock events ones we got the contents
dom.unbind(ed.getDoc(), 'mousedown', block);
dom.unbind(ed.getDoc(), 'keydown', block);
}, 0);
}
};
}
// Check if we should use the new auto process method
if (ed.getParam('paste_auto_cleanup_on_paste', true)) {
if (getParam(ed, "paste_auto_cleanup_on_paste")) {
// Is it's Opera or older FF use key handler
if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
ed.onKeyDown.add(function(ed, e) {
@ -161,7 +246,7 @@
}
// Block all drag/drop events
if (ed.getParam('paste_block_drop')) {
if (getParam(ed, "paste_block_drop")) {
ed.onInit.add(function() {
ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
e.preventDefault();
@ -187,10 +272,15 @@
},
_preProcess : function(pl, o) {
var ed = this.editor, h = o.content, process, stripClass;
//console.log('Before preprocess:' + o.content);
var ed = this.editor,
h = o.content,
grep = tinymce.grep,
explode = tinymce.explode,
trim = tinymce.trim,
len, stripClass;
function process(items) {
each(items, function(v) {
// Remove or replace
@ -199,81 +289,203 @@
else
h = h.replace(v[0], v[1]);
});
};
}
// Detect Word content and process it more aggressive
if (/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h) || o.wordContent) {
o.wordContent = true; // Mark the pasted contents as word specific content
if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
o.wordContent = true; // Mark the pasted contents as word specific content
//console.log('Word contents detected.');
// Process away some basic content
process([
/^\s*(&nbsp;)+/g, // nbsp entities at the start of contents
/(&nbsp;|<br[^>]*>)+\s*$/g // nbsp entities at the end of contents
/^\s*(&nbsp;)+/gi, // &nbsp; entities at the start of contents
/(&nbsp;|<br[^>]*>)+\s*$/gi // &nbsp; entities at the end of contents
]);
if (ed.getParam('paste_convert_middot_lists', true)) {
if (getParam(ed, "paste_convert_headers_to_strong")) {
h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
}
if (getParam(ed, "paste_convert_middot_lists")) {
process([
[/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
[/(<span[^>]+:\s*symbol[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert symbol spans to list items
[/(<span[^>]+mso-list:[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list to item marker
[/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol spans to item markers
]);
}
process([
/<!--[\s\S]+?-->/gi, // Word comments
/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi, // Remove some tags including VML content
/<\\?\?xml[^>]*>/gi, // XML namespace declarations
/<\/?o:[^>]*>/gi, // MS namespaced elements <o:tag>
/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi, // on.., class, style and language attributes with quotes
/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi, // on.., class, style and language attributes without quotes (IE)
[/<(\/?)s>/gi, '<$1strike>'], // Convert <s> into <strike> for line-though
/<script[^>]+>[\s\S]*?<\/script>/gi, // All scripts elements for msoShowComment for example
[/&nbsp;/g, '\u00a0'] // Replace nsbp entites to char since it's easier to handle
// Word comments like conditional comments etc
/<!--[\s\S]+?-->/gi,
// Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
// Convert <s> into <strike> for line-though
[/<(\/?)s>/gi, "<$1strike>"],
// Replace nsbp entites to char since it's easier to handle
[/&nbsp;/gi, "\u00a0"]
]);
// Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
// If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
do {
len = h.length;
h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
} while (len != h.length);
// Remove all spans if no styles is to be retained
if (!ed.getParam('paste_retain_style_properties')) {
if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
h = h.replace(/<\/?span[^>]*>/gi, "");
} else {
// We're keeping styles, so at least clean them up.
// CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
process([
/<\/?(span)[^>]*>/gi
// Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
function(str, spaces) {
return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
}
],
// Examine all styles: delete junk, transform some, and keep the rest
[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
function(str, tag, style) {
var n = [],
i = 0,
s = explode(trim(style).replace(/&quot;/gi, "'"), ";");
// Examine each style definition within the tag's style attribute
each(s, function(v) {
var name, value,
parts = explode(v, ":");
function ensureUnits(v) {
return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
}
if (parts.length == 2) {
name = parts[0].toLowerCase();
value = parts[1].toLowerCase();
// Translate certain MS Office styles into their CSS equivalents
switch (name) {
case "mso-padding-alt":
case "mso-padding-top-alt":
case "mso-padding-right-alt":
case "mso-padding-bottom-alt":
case "mso-padding-left-alt":
case "mso-margin-alt":
case "mso-margin-top-alt":
case "mso-margin-right-alt":
case "mso-margin-bottom-alt":
case "mso-margin-left-alt":
case "mso-table-layout-alt":
case "mso-height":
case "mso-width":
case "mso-vertical-align-alt":
n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
return;
case "horiz-align":
n[i++] = "text-align:" + value;
return;
case "vert-align":
n[i++] = "vertical-align:" + value;
return;
case "font-color":
case "mso-foreground":
n[i++] = "color:" + value;
return;
case "mso-background":
case "mso-highlight":
n[i++] = "background:" + value;
return;
case "mso-default-height":
n[i++] = "min-height:" + ensureUnits(value);
return;
case "mso-default-width":
n[i++] = "min-width:" + ensureUnits(value);
return;
case "mso-padding-between-alt":
n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
return;
case "text-line-through":
if ((value == "single") || (value == "double")) {
n[i++] = "text-decoration:line-through";
}
return;
case "mso-zero-height":
if (value == "yes") {
n[i++] = "display:none";
}
return;
}
// Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
return;
}
// If it reached this point, it must be a valid CSS style
n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
}
});
// If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
if (i > 0) {
return tag + ' style="' + n.join(';') + '"';
} else {
return tag;
}
}
]
]);
}
}
// Allow for class names to be retained if desired; either all, or just the ones from Word
// Note that the paste_strip_class_attributes: 'none, verify_css_classes: true is also a good variation.
stripClass = ed.getParam('paste_strip_class_attributes');
if (stripClass != 'none') {
// Cleans everything but mceItem... classes
function cleanClasses(str, cls) {
var i, out = '';
// Replace headers with <strong>
if (getParam(ed, "paste_convert_headers_to_strong")) {
process([
[/<h[1-6][^>]*>/gi, "<p><strong>"],
[/<\/h[1-6][^>]*>/gi, "</strong></p>"]
]);
}
// Remove all classes
if (stripClass == 'all')
return '';
// Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
// Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
stripClass = getParam(ed, "paste_strip_class_attributes");
cls = tinymce.explode(cls, ' ');
if (stripClass !== "none") {
function removeClasses(match, g1) {
if (stripClass === "all")
return '';
for (i = cls.length - 1; i >= 0; i--) {
// Remove Mso classes
if (!/^(Mso)/i.test(cls[i]))
out += (!out ? '' : ' ') + cls[i];
}
var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
function(v) {
return (/^(?!mso)/i.test(v));
}
);
return ' class="' + out + '"';
return cls.length ? ' class="' + cls.join(" ") + '"' : '';
};
process([
[/ class=\"([^\"]*)\"/gi, cleanClasses], // class attributes with quotes
[/ class=(\w+)/gi, cleanClasses] // class attributes without quotes (IE)
]);
h = h.replace(/ class="([^"]+)"/gi, removeClasses);
h = h.replace(/ class=(\w+)/gi, removeClasses);
}
// Remove spans option
if (ed.getParam('paste_remove_spans')) {
process([
/<\/?(span)[^>]*>/gi
]);
if (getParam(ed, "paste_remove_spans")) {
h = h.replace(/<\/?span[^>]*>/gi, "");
}
//console.log('After preprocess:' + h);
@ -294,56 +506,58 @@
dom.remove(a, 1);
});
if (t.editor.getParam('paste_convert_middot_lists', true))
if (getParam(ed, "paste_convert_middot_lists")) {
t._convertLists(pl, o);
}
// Process styles
styleProps = ed.getParam('paste_retain_style_properties'); // retained properties
styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
// If string property then split it
if (tinymce.is(styleProps, 'string'))
styleProps = tinymce.explode(styleProps);
// Process only if a string was specified and not equal to "all" or "*"
if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
// Retains some style properties
each(dom.select('*', o.node), function(el) {
var newStyle = {}, npc = 0, i, sp, sv;
// Store a subset of the existing styles
if (styleProps) {
for (i = 0; i < styleProps.length; i++) {
sp = styleProps[i];
sv = dom.getStyle(el, sp);
if (sv) {
newStyle[sp] = sv;
npc++;
// Retains some style properties
each(dom.select('*', o.node), function(el) {
var newStyle = {}, npc = 0, i, sp, sv;
// Store a subset of the existing styles
if (styleProps) {
for (i = 0; i < styleProps.length; i++) {
sp = styleProps[i];
sv = dom.getStyle(el, sp);
if (sv) {
newStyle[sp] = sv;
npc++;
}
}
}
}
// Remove all of the existing styles
dom.setAttrib(el, 'style', '');
// Remove all of the existing styles
dom.setAttrib(el, 'style', '');
if (styleProps && npc > 0)
dom.setStyles(el, newStyle); // Add back the stored subset of styles
else // Remove empty span tags that do not have class attributes
if (el.nodeName == 'SPAN' && !el.className)
dom.remove(el, true);
});
if (styleProps && npc > 0)
dom.setStyles(el, newStyle); // Add back the stored subset of styles
else // Remove empty span tags that do not have class attributes
if (el.nodeName == 'SPAN' && !el.className)
dom.remove(el, true);
});
}
}
// Remove all style information or only specifically on WebKit to avoid the style bug on that browser
if (ed.getParam("paste_remove_styles") || (ed.getParam("paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
each(dom.select('*[style]', o.node), function(el) {
el.removeAttribute('style');
el.removeAttribute('mce_style');
el.removeAttribute('_mce_style');
});
} else {
if (tinymce.isWebKit) {
// We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
// Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
each(dom.select('*', o.node), function(el) {
el.removeAttribute('mce_style');
el.removeAttribute('_mce_style');
});
}
}
@ -435,7 +649,7 @@
* This logic can be improved so text nodes at the start/end remain in the start/end block elements
*/
_insertBlockContent : function(ed, dom, content) {
var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight;
var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight, markerId = 'mce_marker';
function select(n) {
var r;
@ -449,11 +663,11 @@
sel.select(n, 1);
sel.collapse(false);
}
};
}
// Insert a marker for the caret position
this._insert('<span id="_marker">&nbsp;</span>', 1);
marker = dom.get('_marker');
this._insert('<span id="' + markerId + '">&nbsp;</span>', 1);
marker = dom.get(markerId);
parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td');
// If it's a parent block but not a table cell
@ -474,7 +688,9 @@
sel.collapse(0);
}
dom.remove('_marker'); // Remove marker if it's left
// Remove marker if it's left
while (elm = dom.get(markerId))
dom.remove(elm);
// Get element, position and height
elm = sel.getStart();
@ -501,31 +717,213 @@
ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo});
},
/**
* Instead of the old plain text method which tried to re-create a paste operation, the
* new approach adds a plain text mode toggle switch that changes the behavior of paste.
* This function is passed the same input that the regular paste plugin produces.
* It performs additional scrubbing and produces (and inserts) the plain text.
* This approach leverages all of the great existing functionality in the paste
* plugin, and requires minimal changes to add the new functionality.
* Speednet - June 2009
*/
_insertPlainText : function(ed, dom, h) {
var i, len, pos, rpos, node, breakElms, before, after,
w = ed.getWin(),
d = ed.getDoc(),
sel = ed.selection,
is = tinymce.is,
inArray = tinymce.inArray,
linebr = getParam(ed, "paste_text_linebreaktype"),
rl = getParam(ed, "paste_text_replacements");
function process(items) {
each(items, function(v) {
if (v.constructor == RegExp)
h = h.replace(v, "");
else
h = h.replace(v[0], v[1]);
});
};
if ((typeof(h) === "string") && (h.length > 0)) {
if (!entities)
entities = ("34,quot,38,amp,39,apos,60,lt,62,gt," + ed.serializer.settings.entities).split(",");
// If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) {
process([
/[\n\r]+/g
]);
} else {
// Otherwise just get rid of carriage returns (only need linefeeds)
process([
/\r+/g
]);
}
process([
[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
[/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
[/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
/<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
[/&nbsp;/gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
[
// HTML entity
/&(#\d+|[a-z0-9]{1,10});/gi,
// Replace with actual character
function(e, s) {
if (s.charAt(0) === "#") {
return String.fromCharCode(s.slice(1));
}
else {
return ((e = inArray(entities, s)) > 0)? String.fromCharCode(entities[e-1]) : " ";
}
}
],
[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars.
[/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks
/^\s+|\s+$/g // Trim the front & back
]);
h = dom.encode(h);
// Delete any highlighted text before pasting
if (!sel.isCollapsed()) {
d.execCommand("Delete", false, null);
}
// Perform default or custom replacements
if (is(rl, "array") || (is(rl, "array"))) {
process(rl);
}
else if (is(rl, "string")) {
process(new RegExp(rl, "gi"));
}
// Treat paragraphs as specified in the config
if (linebr == "none") {
process([
[/\n+/g, " "]
]);
}
else if (linebr == "br") {
process([
[/\n/g, "<br />"]
]);
}
else {
process([
/^\s+|\s+$/g,
[/\n\n/g, "</p><p>"],
[/\n/g, "<br />"]
]);
}
// This next piece of code handles the situation where we're pasting more than one paragraph of plain
// text, and we are pasting the content into the middle of a block node in the editor. The block
// node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining).
// The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the
// pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between
// "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and
// now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the
// plain text take the same style as the existing paragraph.)
if ((pos = h.indexOf("</p><p>")) != -1) {
rpos = h.lastIndexOf("</p><p>");
node = sel.getNode();
breakElms = []; // Get list of elements to break
do {
if (node.nodeType == 1) {
// Don't break tables and break at body
if (node.nodeName == "TD" || node.nodeName == "BODY") {
break;
}
breakElms[breakElms.length] = node;
}
} while (node = node.parentNode);
// Are we in the middle of a block node?
if (breakElms.length > 0) {
before = h.substring(0, pos);
after = "";
for (i=0, len=breakElms.length; i<len; i++) {
before += "</" + breakElms[i].nodeName.toLowerCase() + ">";
after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">";
}
if (pos == rpos) {
h = before + after + h.substring(pos+7);
}
else {
h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7);
}
}
}
// Insert content at the caret, plus add a marker for repositioning the caret
ed.execCommand("mceInsertRawHTML", false, h + '<span id="_plain_text_marker">&nbsp;</span>');
// Reposition the caret to the marker, which was placed immediately after the inserted content.
// Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers.
// The second part of the code scrolls the content up if the caret is positioned off-screen.
// This is only necessary for WebKit browsers, but it doesn't hurt to use for all.
window.setTimeout(function() {
var marker = dom.get('_plain_text_marker'),
elm, vp, y, elmHeight;
sel.select(marker, false);
d.execCommand("Delete", false, null);
marker = null;
// Get element, position and height
elm = sel.getStart();
vp = dom.getViewPort(w);
y = dom.getPos(elm).y;
elmHeight = elm.clientHeight;
// Is element within viewport if not then scroll it into view
if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) {
d.body.scrollTop = y < vp.y ? y : y - vp.h + 25;
}
}, 0);
}
},
/**
* This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
*/
_legacySupport : function() {
var t = this, ed = t.editor;
// Register commands for backwards compatibility
each(['mcePasteText', 'mcePasteWord'], function(cmd) {
ed.addCommand(cmd, function() {
// Register command(s) for backwards compatibility
ed.addCommand("mcePasteWord", function() {
ed.windowManager.open({
file: t.url + "/pasteword.htm",
width: parseInt(getParam(ed, "paste_dialog_width")),
height: parseInt(getParam(ed, "paste_dialog_height")),
inline: 1
});
});
if (getParam(ed, "paste_text_use_dialog")) {
ed.addCommand("mcePasteText", function() {
ed.windowManager.open({
file : t.url + (cmd == 'mcePasteText' ? '/pastetext.htm' : '/pasteword.htm'),
width : parseInt(ed.getParam("paste_dialog_width", "450")),
height : parseInt(ed.getParam("paste_dialog_height", "400")),
file : t.url + "/pastetext.htm",
width: parseInt(getParam(ed, "paste_dialog_width")),
height: parseInt(getParam(ed, "paste_dialog_height")),
inline : 1
});
});
});
}
// Register buttons for backwards compatibility
ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText'});
ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord'});
ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'selectall'});
// Register button for backwards compatibility
ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
}
});
// Register plugin
tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin);
})();
tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
})();

@ -1,7 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{#paste.paste_text_desc}</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/pastetext.js"></script>
</head>
@ -20,13 +19,8 @@
<textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" name="insert" value="{#insert}" id="insert" />
</div>
<div style="float: right">
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
</div>
<input type="submit" name="insert" value="{#insert}" id="insert" />
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
</div>
</form>
</body>

@ -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>{#paste.paste_word_desc}</title>
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/pasteword.js"></script>
@ -14,13 +13,8 @@
<div id="iframecontainer"></div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:160+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();
(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z 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() {
@ -12,7 +15,7 @@
ed.windowManager.open({
file : url + '/searchreplace.htm',
width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
inline : 1,
auto_focus : 0
}, {

@ -75,6 +75,10 @@ var SearchReplaceDialog = {
r.select();
replace();
fo = 1;
if (b) {
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
}
}
tinyMCEPopup.storeSelection();

@ -89,15 +89,10 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -170,13 +170,8 @@
</select>
</div>
<div style="float: left">
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -11,7 +11,7 @@ function init() {
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
var inst = ed;
var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th");
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
var formObj = document.forms[0];
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
@ -34,38 +34,55 @@ function init() {
addClassesToList('class', 'table_cell_styles');
TinyMCE_EditableSelects.init();
formObj.bordercolor.value = bordercolor;
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.width.value = width;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = ed.dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'celltype', celltype);
selectByValue(formObj, 'dir', dir);
selectByValue(formObj, 'scope', scope);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bordercolor_pick', 'bordercolor');
updateColor('bgcolor_pick', 'bgcolor');
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
formObj.bordercolor.value = bordercolor;
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.width.value = width;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = ed.dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'celltype', celltype);
selectByValue(formObj, 'dir', dir);
selectByValue(formObj, 'scope', scope);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bordercolor_pick', 'bordercolor');
updateColor('bgcolor_pick', 'bgcolor');
} else
tinyMCEPopup.dom.hide('action');
}
function updateAction() {
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
tinyMCEPopup.restoreSelection();
el = ed.selection.getNode();
el = ed.selection.getStart();
tdElm = ed.dom.getParent(el, "td,th");
trElm = ed.dom.getParent(el, "tr");
tableElm = ed.dom.getParent(el, "table");
// Cell is selected
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
// Update all selected sells
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
updateCell(td);
});
ed.addVisual();
ed.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
return;
}
ed.execCommand('mceBeginUndoLevel');
switch (getSelectValue(formObj, 'action')) {

@ -1,29 +1,27 @@
tinyMCEPopup.requireLangPack();
function init() {
var f = document.forms[0], v;
var MergeCellsDialog = {
init : function() {
var f = document.forms[0];
tinyMCEPopup.resizeToInnerSize();
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
},
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
}
merge : function() {
var func, f = document.forms[0];
function mergeCells() {
var args = [], f = document.forms[0];
tinyMCEPopup.restoreSelection();
tinyMCEPopup.restoreSelection();
func = tinyMCEPopup.getWindowArg('onaction');
if (!AutoValidator.validate(f)) {
tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data'));
return false;
}
args["numcols"] = f.numcols.value;
args["numrows"] = f.numrows.value;
func({
cols : f.numcols.value,
rows : f.numrows.value
});
tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
tinyMCEPopup.close();
}
tinyMCEPopup.close();
}
};
tinyMCEPopup.onInit.add(init);
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);

@ -8,7 +8,7 @@ function init() {
var inst = tinyMCEPopup.editor;
var dom = inst.dom;
var trElm = dom.getParent(inst.selection.getNode(), "tr");
var trElm = dom.getParent(inst.selection.getStart(), "tr");
var formObj = document.forms[0];
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
@ -24,27 +24,32 @@ function init() {
var lang = dom.getAttrib(trElm, 'lang');
var dir = dom.getAttrib(trElm, 'dir');
// Setup form
addClassesToList('class', 'table_row_styles');
TinyMCE_EditableSelects.init();
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'rowtype', rowtype);
selectByValue(formObj, 'dir', dir);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bgcolor_pick', 'bgcolor');
// Any cells selected
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
// Setup form
addClassesToList('class', 'table_row_styles');
TinyMCE_EditableSelects.init();
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'dir', dir);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bgcolor_pick', 'bgcolor');
} else
tinyMCEPopup.dom.hide('action');
}
function updateAction() {
@ -52,8 +57,28 @@ function updateAction() {
var action = getSelectValue(formObj, 'action');
tinyMCEPopup.restoreSelection();
trElm = dom.getParent(inst.selection.getNode(), "tr");
tableElm = dom.getParent(inst.selection.getNode(), "table");
trElm = dom.getParent(inst.selection.getStart(), "tr");
tableElm = dom.getParent(inst.selection.getStart(), "table");
// Update all selected rows
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
tinymce.each(tableElm.rows, function(tr) {
var i;
for (i = 0; i < tr.cells.length; i++) {
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
updateRow(tr, true);
return;
}
}
});
inst.addVisual();
inst.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
return;
}
inst.execCommand('mceBeginUndoLevel');

@ -82,7 +82,7 @@ function insertTable() {
capEl = elm.ownerDocument.createElement('caption');
if (!tinymce.isIE)
capEl.innerHTML = '<br mce_bogus="1"/>';
capEl.innerHTML = '<br _mce_bogus="1"/>';
elm.insertBefore(capEl, elm.firstChild);
}
@ -151,6 +151,7 @@ function insertTable() {
html += makeAttrib('border', border);
html += makeAttrib('cellpadding', cellpadding);
html += makeAttrib('cellspacing', cellspacing);
html += makeAttrib('_mce_new', '1');
if (width && inst.settings.inline_styles) {
if (style)
@ -186,7 +187,7 @@ function insertTable() {
if (caption) {
if (!tinymce.isIE)
html += '<caption><br mce_bogus="1"/></caption>';
html += '<caption><br _mce_bogus="1"/></caption>';
else
html += '<caption></caption>';
}
@ -196,7 +197,7 @@ function insertTable() {
for (var x=0; x<cols; x++) {
if (!tinymce.isIE)
html += '<td><br mce_bogus="1"/></td>';
html += '<td><br _mce_bogus="1"/></td>';
else
html += '<td></td>';
}
@ -210,9 +211,10 @@ function insertTable() {
// Move table
if (inst.settings.fix_table_elements) {
var bm = inst.selection.getBookmark(), patt = '';
var patt = '';
inst.execCommand('mceInsertContent', false, '<br class="_mce_marker" />');
inst.focus();
inst.selection.setContent('<br class="_mce_marker" />');
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
if (patt)
@ -225,12 +227,19 @@ function insertTable() {
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
});
dom.setOuterHTML(dom.select('._mce_marker')[0], html);
inst.selection.moveToBookmark(bm);
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
} else
inst.execCommand('mceInsertContent', false, html);
tinymce.each(dom.select('table[_mce_new]'), function(node) {
var td = dom.select('td', node);
inst.selection.select(td[0], true);
inst.selection.collapse();
dom.setAttrib(node, '_mce_new', '');
});
inst.addVisual();
inst.execCommand('mceEndUndoLevel');

@ -8,7 +8,7 @@
<script type="text/javascript" src="js/merge_cells.js"></script>
</head>
<body style="margin: 8px">
<form onsubmit="mergeCells();return false;" action="#">
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
<fieldset>
<legend>{#table_dlg.merge_cells_title}</legend>
<table border="0" cellpadding="0" cellspacing="3" width="100%">
@ -24,13 +24,8 @@
</fieldset>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -147,13 +147,8 @@
</select>
</div>
<div style="float: left">
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -179,13 +179,8 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z 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() {

@ -132,17 +132,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -132,17 +132,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -140,14 +140,9 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -132,17 +132,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -152,18 +152,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -1 +1 @@
(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/<abbr([^>]+)>/gi,"<html:abbr $1>");e.content=e.content.replace(/<\/abbr>/gi,"</html:abbr>")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})();
(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/<abbr([^>]+)>/gi,"<html:abbr $1>");e.content=e.content.replace(/<\/abbr>/gi,"</html:abbr>")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}});b.onPreInit.add(function(){b.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})();

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z 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() {
@ -118,6 +121,11 @@
} while (n = n.parentNode);
}
});
ed.onPreInit.add(function() {
// Fixed IE issue where it can't handle these elements correctly
ed.dom.create('abbr');
});
},
getInfo : function() {

@ -152,18 +152,10 @@
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: left">
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>
</html>

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* abbr.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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 init() {
@ -13,7 +16,7 @@ function init() {
}
function insertAbbr() {
SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr');
SXE.insertElement('abbr');
tinyMCEPopup.close();
}

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* acronym.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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 init() {

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* attributes.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @copyright Copyright © 2004-2006, 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 init() {

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* cite.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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 init() {

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* del.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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 init() {

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* element_common.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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
*/
tinyMCEPopup.requireLangPack();
@ -157,9 +160,6 @@ SXE.insertElement = function(element_name) {
if(s.length > 0) {
tagName = element_name;
if (tinymce.isIE && element_name.indexOf('html:') == 0)
element_name = element_name.substring(5).toLowerCase();
insertInlineElement(element_name);
var elementArray = tinymce.grep(SXE.inst.dom.select(element_name));
for (var i=0; i<elementArray.length; i++) {
@ -194,7 +194,7 @@ SXE.removeElement = function(element_name){
}
SXE.showRemoveButton = function() {
document.getElementById("remove").style.display = 'block';
document.getElementById("remove").style.display = '';
}
SXE.containsClass = function(elm,cl) {

@ -1,8 +1,11 @@
/**
* $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $
/**
* ins.js
*
* @author Moxiecode - based on work by Andrew Tetlaw
* @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 init() {

@ -48,9 +48,7 @@
</div>
<div class="mceActionPanel">
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
</div>
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
</div>
</body>
</html>

@ -18,13 +18,8 @@
</table>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -60,9 +60,7 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#apply}" />
</div>
<input type="submit" id="insert" name="insert" value="{#apply}" />
<div id="preview"></div>

File diff suppressed because one or more lines are too long

@ -1,8 +1,11 @@
/**
* $Id: editor_template_src.js 1045 2009-03-04 20:03:18Z spocke $
* editor_template_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(tinymce) {
@ -97,11 +100,8 @@
if (k == v && v >= 1 && v <= 7) {
k = v + ' (' + t.sizes[v - 1] + 'pt)';
if (ed.settings.convert_fonts_to_spans) {
cl = s.font_size_classes[v - 1];
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
}
cl = s.font_size_classes[v - 1];
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
}
if (/^\s*\./.test(v))
@ -121,7 +121,8 @@
// Init editor
ed.onInit.add(function() {
ed.onNodeChange.add(t._nodeChanged, t);
if (!ed.settings.readonly)
ed.onNodeChange.add(t._nodeChanged, t);
if (ed.settings.content_css !== false)
ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css"));
@ -194,36 +195,75 @@
},
_importClasses : function(e) {
var ed = this.editor, c = ed.controlManager.get('styleselect');
var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
if (c.getLength() == 0) {
each(ed.dom.getClasses(), function(o) {
c.add(o['class'], o['class']);
if (ctrl.getLength() == 0) {
each(ed.dom.getClasses(), function(o, idx) {
var name = 'style_' + idx;
ed.formatter.register(name, {
inline : 'span',
classes : o['class'],
selector : '*'
});
ctrl.add(o['class'], name);
});
}
},
_createStyleSelect : function(n) {
var t = this, ed = t.editor, cf = ed.controlManager, c = cf.createListBox('styleselect', {
var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
// Setup style select box
ctrl = ctrlMan.createListBox('styleselect', {
title : 'advanced.style_select',
onselect : function(v) {
if (c.selectedValue === v) {
ed.execCommand('mceSetStyleInfo', 0, {command : 'removeformat'});
c.select();
return false;
} else
ed.execCommand('mceSetCSSClass', 0, v);
onselect : function(name) {
ed.execCommand('mceToggleFormat', false, name);
return false; // No auto select
}
});
if (c) {
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(v, k) {
if (v)
c.add(t.editor.translate(k), v);
});
// Handle specified format
ed.onInit.add(function() {
var counter = 0, formats = ed.getParam('style_formats');
if (formats) {
each(formats, function(fmt) {
var name, keys = 0;
each(fmt, function() {keys++;});
if (keys > 1) {
name = fmt.name = fmt.name || 'style_' + (counter++);
ed.formatter.register(name, fmt);
ctrl.add(fmt.title, name);
} else
ctrl.add(fmt.title);
});
} else {
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
var name;
c.onPostRender.add(function(ed, n) {
if (!c.NativeListBox) {
if (val) {
name = 'style_' + (counter++);
ed.formatter.register(name, {
inline : 'span',
classes : val
});
ctrl.add(t.editor.translate(key), name);
}
});
}
});
// Auto import classes if the ctrl box is empty
if (ctrl.getLength() == 0) {
ctrl.onPostRender.add(function(ed, n) {
if (!ctrl.NativeListBox) {
Event.add(n.id + '_text', 'focus', t._importClasses, t);
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
Event.add(n.id + '_open', 'focus', t._importClasses, t);
@ -233,13 +273,20 @@
});
}
return c;
return ctrl;
},
_createFontSelect : function() {
var c, t = this, ed = t.editor;
c = ed.controlManager.createListBox('fontselect', {title : 'advanced.fontdefault', cmd : 'FontName'});
c = ed.controlManager.createListBox('fontselect', {
title : 'advanced.fontdefault',
onselect : function(v) {
ed.execCommand('FontName', false, v);
return false; // No auto select
}
});
if (c) {
each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
@ -263,6 +310,8 @@
ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl});
}
return false; // No auto select
}});
if (c) {
@ -473,7 +522,7 @@
},
resizeTo : function(w, h) {
var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'), dh;
var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
// Boundery fix box
w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
@ -481,12 +530,9 @@
w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
// Calc difference between iframe and container
dh = e.clientHeight - ifr.clientHeight;
// Resize iframe and container
DOM.setStyle(ifr, 'height', h - dh);
DOM.setStyles(e, {width : w, height : h});
DOM.setStyles(e, {width : '', height : ''});
DOM.setStyles(ifr, {width : w, height : h});
},
destroy : function() {
@ -700,99 +746,48 @@
if (!o)
return;
if (s.theme_advanced_resize_horizontal)
c.style.width = Math.max(10, o.cw) + 'px';
c.style.height = Math.max(10, o.ch) + 'px';
DOM.get(ed.id + '_ifr').style.height = Math.max(10, parseInt(o.ch) + t.deltaHeight) + 'px';
t.resizeTo(o.cw, o.ch);
});
}
ed.onPostRender.add(function() {
Event.add(ed.id + '_resize', 'mousedown', function(e) {
var c, p, w, h, n, pa;
// Measure container
c = DOM.get(ed.id + '_tbl');
w = c.clientWidth;
h = c.clientHeight;
miw = s.theme_advanced_resizing_min_width || 100;
mih = s.theme_advanced_resizing_min_height || 100;
maw = s.theme_advanced_resizing_max_width || 0xFFFF;
mah = s.theme_advanced_resizing_max_height || 0xFFFF;
// Setup placeholder
p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'});
DOM.setStyles(p, {width : w, height : h});
// Replace with placeholder
DOM.hide(c);
DOM.show(p);
// Create internal resize obj
r = {
x : e.screenX,
y : e.screenY,
w : w,
h : h,
dx : null,
dy : null
};
// Start listening
mf = Event.add(DOM.doc, 'mousemove', function(e) {
var w, h;
// Calc delta values
r.dx = e.screenX - r.x;
r.dy = e.screenY - r.y;
var mouseMoveHandler1, mouseMoveHandler2, mouseUpHandler,
startX, startY, startWidth, startHeight, width, height, ifrElm;
// Boundery fix box
w = Math.max(miw, r.w + r.dx);
h = Math.max(mih, r.h + r.dy);
w = Math.min(maw, w);
h = Math.min(mah, h);
function resizeOnMove(e) {
width = startWidth + (e.screenX - startX);
height = startHeight + (e.screenY - startY);
// Resize placeholder
if (s.theme_advanced_resize_horizontal)
p.style.width = w + 'px';
p.style.height = h + 'px';
t.resizeTo(width, height);
};
return Event.cancel(e);
});
e.preventDefault();
me = Event.add(DOM.doc, 'mouseup', function(e) {
var ifr;
// Get the current rect size
startX = e.screenX;
startY = e.screenY;
ifrElm = DOM.get(t.editor.id + '_ifr');
startWidth = width = ifrElm.clientWidth;
startHeight = height = ifrElm.clientHeight;
// Register envent handlers
mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
mouseUpHandler = Event.add(DOM.doc, 'mouseup', function(e) {
// Stop listening
Event.remove(DOM.doc, 'mousemove', mf);
Event.remove(DOM.doc, 'mouseup', me);
c.style.display = '';
DOM.remove(p);
if (r.dx === null)
return;
ifr = DOM.get(ed.id + '_ifr');
if (s.theme_advanced_resize_horizontal)
c.style.width = Math.max(10, r.w + r.dx) + 'px';
c.style.height = Math.max(10, r.h + r.dy) + 'px';
ifr.style.height = Math.max(10, ifr.clientHeight + r.dy) + 'px';
Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
Event.remove(DOM.doc, 'mouseup', mouseUpHandler);
// Store away the size
if (s.theme_advanced_resizing_use_cookie) {
Cookie.setHash("TinyMCE_" + ed.id + "_size", {
cw : r.w + r.dx,
ch : r.h + r.dy
cw : width,
ch : height
});
}
});
return Event.cancel(e);
});
});
}
@ -801,22 +796,34 @@
n = tb = null;
},
_nodeChanged : function(ed, cm, n, co) {
_nodeChanged : function(ed, cm, n, co, ob) {
var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn;
if (s.readonly)
return;
tinymce.each(t.stateControls, function(c) {
cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
});
function getParent(name) {
var i, parents = ob.parents, func = name;
if (typeof(name) == 'string') {
func = function(node) {
return node.nodeName == name;
};
}
for (i = 0; i < parents.length; i++) {
if (func(parents[i]))
return parents[i];
}
};
cm.setActive('visualaid', ed.hasVisual);
cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
cm.setDisabled('redo', !ed.undoManager.hasRedo());
cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
p = DOM.getParent(n, 'A');
p = getParent('A');
if (c = cm.get('link')) {
if (!p || !p.name) {
c.setDisabled(!p && co);
@ -831,82 +838,75 @@
if (c = cm.get('anchor')) {
c.setActive(!!p && p.name);
if (tinymce.isWebKit) {
p = DOM.getParent(n, 'IMG');
c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a');
}
}
p = DOM.getParent(n, 'IMG');
p = getParent('IMG');
if (c = cm.get('image'))
c.setActive(!!p && n.className.indexOf('mceItem') == -1);
if (c = cm.get('styleselect')) {
if (n.className) {
t._importClasses();
c.select(n.className);
} else
c.select();
t._importClasses();
// Check each format and update
c.select(function(fmt) {
return !!ed.formatter.match(fmt);
});
}
if (c = cm.get('formatselect')) {
p = DOM.getParent(n, DOM.isBlock);
p = getParent(DOM.isBlock);
if (p)
c.select(p.nodeName.toLowerCase());
}
if (ed.settings.convert_fonts_to_spans) {
ed.dom.getParent(n, function(n) {
if (n.nodeName === 'SPAN') {
if (!cl && n.className)
cl = n.className;
// Find out current fontSize, fontFamily and fontClass
getParent(function(n) {
if (n.nodeName === 'SPAN') {
if (!cl && n.className)
cl = n.className;
if (!fz && n.style.fontSize)
fz = n.style.fontSize;
if (!fz && n.style.fontSize)
fz = n.style.fontSize;
if (!fn && n.style.fontFamily)
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
}
if (!fn && n.style.fontFamily)
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
}
return false;
return false;
});
if (c = cm.get('fontselect')) {
c.select(function(v) {
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
});
}
if (c = cm.get('fontselect')) {
c.select(function(v) {
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
});
}
// Select font size
if (c = cm.get('fontsizeselect')) {
// Use computed style
if (s.theme_advanced_runtime_fontsize && !fz && !cl)
fz = ed.dom.getStyle(n, 'fontSize', true);
if (c = cm.get('fontsizeselect')) {
c.select(function(v) {
if (v.fontSize && v.fontSize === fz)
return true;
c.select(function(v) {
if (v.fontSize && v.fontSize === fz)
return true;
if (v['class'] && v['class'] === cl)
return true;
});
}
} else {
if (c = cm.get('fontselect'))
c.select(ed.queryCommandValue('FontName'));
if (c = cm.get('fontsizeselect')) {
v = ed.queryCommandValue('FontSize');
c.select(function(iv) {
return iv.fontSize == v;
});
}
if (v['class'] && v['class'] === cl)
return true;
});
}
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'});
DOM.setHTML(p, '');
ed.dom.getParent(n, function(n) {
getParent(function(n) {
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
/*if (n.getAttribute('_mce_bogus'))
return;
*/
// Ignore non element and hidden elements
if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
return;
@ -950,9 +950,6 @@
break;
case 'font':
if (s.convert_fonts_to_spans)
na = 'span';
if (v = DOM.getAttrib(n, 'face'))
ti += 'font: ' + v + ' ';
@ -975,9 +972,9 @@
ti += 'id: ' + v + ' ';
if (v = n.className) {
v = v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g, '');
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
if (v && v.indexOf('mceItem') == -1) {
if (v) {
ti += 'class: ' + v + ' ';
if (DOM.isBlock(n) || na == 'img' || na == 'span')

@ -72,13 +72,8 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

@ -5,7 +5,7 @@ var AnchorDialog = {
var action, elm, f = document.forms[0];
this.editor = ed;
elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
v = ed.dom.getAttrib(elm, 'name');
if (v) {
@ -17,18 +17,18 @@ var AnchorDialog = {
},
update : function() {
var ed = this.editor;
var ed = this.editor, elm, name = document.forms[0].anchorName.value;
tinyMCEPopup.restoreSelection();
if (this.action != 'update')
ed.selection.collapse(1);
// Webkit acts weird if empty inline element is inserted so we need to use a image instead
if (tinymce.isWebKit)
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}));
elm = ed.dom.getParent(ed.selection.getNode(), 'A');
if (elm)
elm.name = name;
else
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, ''));
ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));
tinyMCEPopup.close();
}

@ -1,3 +1,13 @@
/**
* charmap.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
tinyMCEPopup.requireLangPack();
var charmap = [

@ -151,8 +151,8 @@ var ImageDialog = {
}
// Merge
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));
this.styleVal = dom.serializeStyle(st);
st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
this.styleVal = dom.serializeStyle(st, 'img');
}
},

@ -50,13 +50,8 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

@ -8,8 +8,8 @@ h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;}
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;}
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
img {border:0;}
table {cursor:default}
table td, table th {cursor:text}
@ -17,7 +17,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green}
del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help}
abbr {border-bottom:1px dashed #CCC; cursor:help}
/* IE */
* html body {
@ -30,3 +30,6 @@ scrollbar-highlight-color:#F0F0EE;
scrollbar-shadow-color:#F0F0EE;
scrollbar-track-color:#F5F5F5;
}
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
font[face=mceinline] {font-family:inherit !important}

@ -42,10 +42,11 @@ width:94px; height:26px;
background:url(img/buttons.png) 0 -26px;
cursor:pointer;
padding-bottom:2px;
float:left;
}
#insert {background:url(img/buttons.png) 0 -52px;}
#cancel {background:url(img/buttons.png) 0 0;}
#insert {background:url(img/buttons.png) 0 -52px}
#cancel {background:url(img/buttons.png) 0 0; float:right}
/* Browse */
a.pickcolor, a.browse {text-decoration:none}
@ -113,4 +114,4 @@ h3 {font-size:14px;}
#colorpicker #namedcolors {width:150px;}
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
#colorpicker #colornamecontainer {margin-top:5px;}
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}

@ -4,7 +4,7 @@
.defaultSkin table td {vertical-align:middle}
/* Containers */
.defaultSkin table {background:#F0F0EE}
.defaultSkin table {direction:ltr; background:#F0F0EE}
.defaultSkin iframe {display:block; background:#FFF}
.defaultSkin .mceToolbar {height:26px}
.defaultSkin .mceLeft {text-align:left}
@ -24,7 +24,7 @@
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
.defaultSkin .mceStatusbar div {float:left; margin:2px}
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
.defaultSkin table.mceToolbar {margin-left:3px}
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
@ -47,7 +47,6 @@
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
/* ListBox */
.defaultSkin .mceListBox {direction:ltr}
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
@ -63,7 +62,7 @@
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;}
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
.defaultSkin .mceSplitButton span.mceOpen {display:none}
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
@ -108,7 +107,6 @@
/* Progress,Resize */
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
.defaultSkin .mcePlaceHolder {border:1px dotted gray}
/* Formats */
.defaultSkin .mce_formatPreview a {font-size:10px}
@ -211,4 +209,5 @@
.defaultSkin span.mce_del {background-position:-940px -20px}
.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}

@ -8,8 +8,8 @@ h4 {font-size: 1em}
h5 {font-size: .83em}
h6 {font-size: .75em}
.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;}
img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;}
a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
td.mceSelected, th.mceSelected {background-color:#3399ff !important}
img {border:0;}
table {cursor:default}
table td, table th {cursor:text}
@ -17,7 +17,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green}
del {color:red; text-decoration:line-through}
cite {border-bottom:1px dashed blue}
acronym {border-bottom:1px dotted #CCC; cursor:help}
abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help}
abbr {border-bottom:1px dashed #CCC; cursor:help}
/* IE */
* html body {
@ -30,3 +30,6 @@ scrollbar-highlight-color:#F0F0EE;
scrollbar-shadow-color:#F0F0EE;
scrollbar-track-color:#F5F5F5;
}
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
font[face=mceinline] {font-family:inherit !important}

@ -42,10 +42,11 @@ width:94px; height:26px;
background:url(../default/img/buttons.png) 0 -26px;
cursor:pointer;
padding-bottom:2px;
float:left;
}
#insert {background:url(../default/img/buttons.png) 0 -52px;}
#cancel {background:url(../default/img/buttons.png) 0 0;}
#insert {background:url(../default/img/buttons.png) 0 -52px}
#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
/* Browse */
a.pickcolor, a.browse {text-decoration:none}

@ -21,7 +21,7 @@
.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
.o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
.o2k7Skin .mceStatusbar div {float:left; padding:2px}
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize}
.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
.o2k7Skin table.mceToolbar {margin-left:3px}
.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
@ -65,7 +65,7 @@
.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px}
.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
.o2k7Skin .mceSplitButton a.mceAction {width:22px}
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px}
.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
.o2k7Skin .mceSplitButton span.mceOpen {display:none}
.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
@ -109,7 +109,6 @@
/* Progress,Resize */
.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
.o2k7Skin .mcePlaceHolder {border:1px dotted gray}
/* Formats */
.o2k7Skin .mce_formatPreview a {font-size:10px}
@ -212,4 +211,5 @@
.o2k7Skin span.mce_del {background-position:-940px -20px}
.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}

@ -18,13 +18,8 @@
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" name="insert" value="{#update}" id="insert" />
</div>
<div style="float: right">
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
</div>
<input type="submit" name="insert" value="{#update}" id="insert" />
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
</div>
</form>
</body>

@ -1,11 +1,11 @@
/**
* $Id: editor_template_src.js 920 2008-09-09 14:05:33Z spocke $
* editor_template_src.js
*
* This file is meant to showcase how to create a simple theme. The advanced
* theme is more suitable for production use.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,10 +1,11 @@
/**
* $Id: editable_selects.js 867 2008-06-09 20:33:40Z spocke $
* editable_selects.js
*
* Makes select boxes editable.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
var TinyMCE_EditableSelects = {

@ -1,10 +1,11 @@
/**
* $Id: form_utils.js 1184 2009-08-11 11:47:27Z spocke $
* form_utils.js
*
* Various form utilitiy functions.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));

@ -1,10 +1,11 @@
/**
* $Id: mctabs.js 758 2008-03-30 13:53:29Z spocke $
* mctabs.js
*
* Moxiecode DHTML Tabs script.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
function MCTabs() {

@ -1,10 +1,11 @@
/**
* $Id: validate.js 758 2008-03-30 13:53:29Z spocke $
* validate.js
*
* Various form validation methods.
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* @author Moxiecode
* @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
/**

Loading…
Cancel
Save