updating tinymce to 1.41

This commit is contained in:
JT Smith 2005-02-12 14:55:11 +00:00
parent dc1721d1ef
commit bd48711603
125 changed files with 5524 additions and 3444 deletions

View file

@ -1,55 +1,2 @@
/* Import theme specific language pack */
tinyMCE.importPluginLanguagePack('advhr', 'uk,de,se');
function TinyMCE_advhr_getControlHTML(control_name) {
switch (control_name) {
case "advhr":
return '<img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');" />';
}
return "";
}
/**
* Executes the mceAdvanceHr command.
*/
function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceAdvancedHr":
var template = new Array();
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
template['width'] = 270;
template['height'] = 180;
var size = "", width = "", noshade = "";
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){
tinyMCE.hrElement = tinyMCE.selectedElement;
if (tinyMCE.hrElement) {
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
}
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
} else {
if (tinyMCE.isMSIE) {
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
} else {
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'insert'});
}
}
return true;
}
// Pass to next handler in chain
return false;
}
function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal');
do {
if (node.nodeName.toLowerCase() == "hr")
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected');
} while ((node = node.parentNode));
return true;
}
/* Import theme specific language pack */
tinyMCE.importPluginLanguagePack('advhr','en,de,sv,zh_cn,cs');function TinyMCE_advhr_getControlHTML(control_name){switch(control_name){case "advhr":return '<img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');" />';}return "";}function TinyMCE_advhr_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceAdvancedHr":var template=new Array();template['file']='../../plugins/advhr/rule.htm';template['width']=270;template['height']=180;var size="",width="",noshade="";if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="hr"){tinyMCE.hrElement=tinyMCE.selectedElement;if(tinyMCE.hrElement){size=tinyMCE.hrElement.getAttribute('size')?tinyMCE.hrElement.getAttribute('size'):"";width=tinyMCE.hrElement.getAttribute('width')?tinyMCE.hrElement.getAttribute('width'):"";noshade=tinyMCE.hrElement.getAttribute('noshade')?tinyMCE.hrElement.getAttribute('noshade'):"";}tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'update'});}else{if(tinyMCE.isMSIE){tinyMCE.execInstanceCommand(editor_id,'mceInsertContent',false,'<hr />');}else{tinyMCE.openWindow(template,{editor_id:editor_id,size:size,width:width,noshade:noshade,mceDo:'insert'});}}return true;}return false;}function TinyMCE_advhr_handleNodeChange(editor_id,node,undo_index,undo_levels,visual_aid,any_selection){tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonNormal');do{if(node.nodeName.toLowerCase()=="hr")tinyMCE.switchClassSticky(editor_id+'_advhr','mceButtonSelected');}while((node=node.parentNode));return true;}

View file

@ -0,0 +1,55 @@
/* Import theme specific language pack */
tinyMCE.importPluginLanguagePack('advhr', 'en,de,sv,zh_cn,cs');
function TinyMCE_advhr_getControlHTML(control_name) {
switch (control_name) {
case "advhr":
return '<img id="{$editor_id}_advhr" src="{$pluginurl}/images/advhr.gif" title="{$lang_insert_advhr_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceAdvancedHr\');" />';
}
return "";
}
/**
* Executes the mceAdvanceHr command.
*/
function TinyMCE_advhr_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceAdvancedHr":
var template = new Array();
template['file'] = '../../plugins/advhr/rule.htm'; // Relative to theme
template['width'] = 270;
template['height'] = 180;
var size = "", width = "", noshade = "";
if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "hr"){
tinyMCE.hrElement = tinyMCE.selectedElement;
if (tinyMCE.hrElement) {
size = tinyMCE.hrElement.getAttribute('size') ? tinyMCE.hrElement.getAttribute('size') : "";
width = tinyMCE.hrElement.getAttribute('width') ? tinyMCE.hrElement.getAttribute('width') : "";
noshade = tinyMCE.hrElement.getAttribute('noshade') ? tinyMCE.hrElement.getAttribute('noshade') : "";
}
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'update'});
} else {
if (tinyMCE.isMSIE) {
tinyMCE.execInstanceCommand(editor_id, 'mceInsertContent', false,'<hr />');
} else {
tinyMCE.openWindow(template, {editor_id : editor_id, size : size, width : width, noshade : noshade, mceDo : 'insert'});
}
}
return true;
}
// Pass to next handler in chain
return false;
}
function TinyMCE_advhr_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonNormal');
do {
if (node.nodeName.toLowerCase() == "hr")
tinyMCE.switchClassSticky(editor_id + '_advhr', 'mceButtonSelected');
} while ((node = node.parentNode));
return true;
}

View file

@ -0,0 +1,6 @@
// UK lang variables
tinyMCELang['lang_insert_advhr_desc'] = 'Vložit/editovat vodorovný oddìlovaè'
tinyMCELang['lang_insert_advhr_width'] = 'Šíøka';
tinyMCELang['lang_insert_advhr_size'] = 'Výška';
tinyMCELang['lang_insert_advhr_noshade'] = 'Nestínovat';

View file

@ -1,6 +1,6 @@
// DE lang variables
tinyMCELang['lang_insert_advhr_desc'] = 'Horizontale Linie einf&uuml;gen / bearbeiten'
tinyMCELang['lang_insert_advhr_width'] = 'Breite';
tinyMCELang['lang_insert_advhr_size'] = 'H&ouml;he';
tinyMCELang['lang_insert_advhr_noshade'] = 'Keinen Schatten';
// DE lang variables
tinyMCELang['lang_insert_advhr_desc'] = 'Horizontale Linie einf&uuml;gen / bearbeiten'
tinyMCELang['lang_insert_advhr_width'] = 'Breite';
tinyMCELang['lang_insert_advhr_size'] = 'H&ouml;he';
tinyMCELang['lang_insert_advhr_noshade'] = 'Keinen Schatten';

View file

@ -0,0 +1,6 @@
// UK lang variables
tinyMCELang['lang_insert_advhr_desc'] = 'Insert / edit Horizontale Rule'
tinyMCELang['lang_insert_advhr_width'] = 'Width';
tinyMCELang['lang_insert_advhr_size'] = 'Height';
tinyMCELang['lang_insert_advhr_noshade'] = 'No shadow';

View file

@ -0,0 +1,6 @@
// SE lang variables
tinyMCELang['lang_insert_advhr_desc'] = 'Skapa / uppdatera Horizontell linie'
tinyMCELang['lang_insert_advhr_width'] = 'Bredd';
tinyMCELang['lang_insert_advhr_size'] = 'Höjd';
tinyMCELang['lang_insert_advhr_noshade'] = 'Ingen skugga';

View file

@ -0,0 +1,6 @@
// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com)
tinyMCELang['lang_insert_advhr_desc'] = '插入/编辑 水平标尺'
tinyMCELang['lang_insert_advhr_width'] = '宽度';
tinyMCELang['lang_insert_advhr_size'] = '高度';
tinyMCELang['lang_insert_advhr_noshade'] = '无阴影';

View file

@ -1,20 +1,20 @@
Advhr plugin for TinyMCE
-----------------------------
About:
This is a more advanced hr dialog contributed by Michael Keck.
This one supports noshade, width and size.
Installation instructions:
* Copy the advhr directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
* Add plugin to TinyMCE plugin option list example: plugins : "advhr".
* Add this "hr[class|width|size|noshade]" to extended_valid_elements option.
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "advhr",
theme_advanced_buttons1_add : "advhr",
extended_valid_elements : "hr[class|width|size|noshade]"
});
Advhr plugin for TinyMCE
-----------------------------
About:
This is a more advanced hr dialog contributed by Michael Keck.
This one supports noshade, width and size.
Installation instructions:
* Copy the advhr directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
* Add plugin to TinyMCE plugin option list example: plugins : "advhr".
* Add this "hr[class|width|size|noshade]" to extended_valid_elements option.
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "advhr",
theme_advanced_buttons1_add : "advhr",
extended_valid_elements : "hr[class|width|size|noshade]"
});

View file

@ -1,108 +1,108 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_link_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
<!--
function init() {
// modified 2004-11-10 by Michael Keck (me@michaelkeck.de)
// supporting onclick event to open pop windows
var formObj = document.forms[0];
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.size.value = tinyMCE.getWindowArg('size');
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'));
if (tinyMCE.getWindowArg('noshade')) {
formObj.noshade.checked = true;
}
if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
formObj.width2.value = "%";
formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
}
window.focus();
}
function insertHR() {
var formObj = document.forms[0];
if (window.opener) {
var width = formObj.width.value;
var size = formObj.size.value;
var html = '<hr';
if (size!='' && size!=0) {
html += ' size="' + size + '"';
}
if (width!='' && width!=0) {
html += ' width="' + width;
if (formObj.width2.value=='%') {
html += '%';
}
html += '"';
}
if (formObj.noshade.checked==true) {
html += ' noshade';
}
html += ' />';
tinyMCE.execCommand("mceInsertContent",true,html);
top.close();
}
}
function cancelAction() {
top.close();
}
//-->
</script>
<style type="text/css">
<!--
input.radio {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
-->
</style>
</head>
<body onload="init();">
<form onsubmit="insertHR();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title">{$lang_insert_advhr_desc}</td>
</tr>
<tr>
<td align="right">{$lang_insert_advhr_width}:</td>
<td nowrap="nowrap">
<input name="width" type="text" id="width" value="" style="width: 50px; vertical-align: middle;" />
<select name="width2" id="width2" style="width: 50px; vertical-align: middle;">
<option value="">px</option>
<option value="%">%</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top">{$lang_insert_advhr_size}:</td>
<td><select name="size" type="text" id="size" value="" style="width: 100px;">
<option value="">Normal</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td>
<tr>
<td align="right" valign="top"><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
</tr>
<tr>
<td><input type="button" name="insert" value="{$lang_insert}" onclick="insertHR();" id="insert" /></td>
<td align="right"><input type="button" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" id="cancel" /></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_link_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
<!--
function init() {
// modified 2004-11-10 by Michael Keck (me@michaelkeck.de)
// supporting onclick event to open pop windows
var formObj = document.forms[0];
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.size.value = tinyMCE.getWindowArg('size');
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('mceDo'));
if (tinyMCE.getWindowArg('noshade')) {
formObj.noshade.checked = true;
}
if (tinyMCE.getWindowArg('width').lastIndexOf('%')!=-1) {
formObj.width2.value = "%";
formObj.width.value = formObj.width.value.substring(0,formObj.width.value.length-1);
}
window.focus();
}
function insertHR() {
var formObj = document.forms[0];
if (window.opener) {
var width = formObj.width.value;
var size = formObj.size.value;
var html = '<hr';
if (size!='' && size!=0) {
html += ' size="' + size + '"';
}
if (width!='' && width!=0) {
html += ' width="' + width;
if (formObj.width2.value=='%') {
html += '%';
}
html += '"';
}
if (formObj.noshade.checked==true) {
html += ' noshade';
}
html += ' />';
tinyMCE.execCommand("mceInsertContent",true,html);
top.close();
}
}
function cancelAction() {
top.close();
}
//-->
</script>
<style type="text/css">
<!--
input.radio {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
-->
</style>
</head>
<body onload="init();">
<form onsubmit="insertHR();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title">{$lang_insert_advhr_desc}</td>
</tr>
<tr>
<td align="right">{$lang_insert_advhr_width}:</td>
<td nowrap="nowrap">
<input name="width" type="text" id="width" value="" style="width: 50px; vertical-align: middle;" />
<select name="width2" id="width2" style="width: 50px; vertical-align: middle;">
<option value="">px</option>
<option value="%">%</option>
</select>
</td>
</tr>
<tr>
<td align="right" valign="top">{$lang_insert_advhr_size}:</td>
<td><select name="size" type="text" id="size" value="" style="width: 100px;">
<option value="">Normal</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></td>
<tr>
<td align="right" valign="top"><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
<td><label for="noshade">{$lang_insert_advhr_noshade}</label></td>
</tr>
<tr>
<td><input type="button" name="insert" value="{$lang_insert}" onclick="insertHR();" id="insert" /></td>
<td align="right"><input type="button" name="cancel" value="{$lang_cancel}" onclick="cancelAction();" id="cancel" /></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>