upgrade to tinymce 2.1.1.1

This commit is contained in:
JT Smith 2007-07-07 21:26:06 +00:00
parent f36ba1b268
commit e75b689857
847 changed files with 34500 additions and 7692 deletions

View file

@ -7,14 +7,14 @@
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable",
plugins : "devkit,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1_add_before : "save,newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops",
theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,|,code",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
@ -25,9 +25,17 @@
external_link_list_url : "example_link_list.js",
external_image_list_url : "example_image_list.js",
flash_external_list_url : "example_flash_list.js",
media_external_list_url : "example_media_list.js",
template_external_list_url : "example_template_list.js",
file_browser_callback : "fileBrowserCallBack",
theme_advanced_resize_horizontal : false,
theme_advanced_resizing : true
theme_advanced_resizing : true,
nonbreaking_force_tab : true,
apply_source_formatting : true,
template_replace_values : {
username : "Jack Black",
staffid : "991234"
}
});
function fileBrowserCallBack(field_name, url, type, win) {
@ -43,7 +51,6 @@
<body>
[Full featured example] <a href="example_advanced.htm">[Advanced example]</a> <a href="example_simple.htm">[Simple example]</a> <a href="example_word.htm">[Word example]</a>
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
<h3>Full featured example</h3>
This page shows all available plugins that are included in the TinyMCE distribution. Some of these plugins will only be visible on MSIE due to the lack of some support in FF. For more details on the various options on TinyMCE check the <a href="../docs/index.html">manual</a> or for more third party plugins check the plugin section.<br /><br />

View file

@ -0,0 +1,9 @@
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
// There flash movies will be displayed as a dropdown in all media dialog if the "media_external_list_url"
// option is defined in TinyMCE init.
var tinyMCEMediaList = new Array(
// Name, URL
["Some Flash 1", "test1.swf"],
["Some Flash 2", "test2.swf"]
);

View file

@ -0,0 +1,145 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Template plugin example</title>
<!-- TinyMCE -->
<script language="javascript" type="text/javascript" src="../jscripts/tiny_mce/tiny_mce_dev.js"></script>
<script language="javascript" type="text/javascript">
function exampleTemplateFunction(elm) {
elm.innerHTML = prompt("Please enter your favourite colour.", "Color");
}
var Invoice = {
calculate : function(table) {
var _n = function(s) {
var n = parseFloat(s.replace(/[^-\d\.]/g,''));
return isNaN(n) ? 0 : n;
}
var total = 0;
var r = table.tBodies[0].rows;
for(var x = 0; x < r.length; x++) {
var c = r[x].cells;
var t = _n(c[1].innerHTML)*_n(c[2].innerHTML);
total += t;
c[3].innerHTML = '$' + t;
}
table.tFoot.rows[0].cells[1].innerHTML = '$' + total;
}
}
var WordCount = {
getText : function() {
var inst = tinyMCE.selectedInstance;
var na = [];
tinyMCE.getNodeTree(inst.getBody(), na, 3);
for(var x = 0; x < na.length; x++) {
if(na[x].nodeValue && na[x].nodeValue.length > 3) {
na[x] = na[x].nodeValue;
} else {
na[x] = '';
}
}
return na.join('');
},
count : function(elm) {
var s = WordCount.getText();
elm.innerHTML = '' + s.split(' ').length;
},
charCount : function(elm) {
var s = WordCount.getText();
elm.innerHTML = '' + s.length;
}
}
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "devkit,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1_add_before : "save,newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor,advsearchreplace",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking,|,template,|,code",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
content_css : "example_full.css",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style|title|tsrc],*[mcetmpldtesrc]",
external_link_list_url : "example_link_list.js",
external_image_list_url : "example_image_list.js",
flash_external_list_url : "example_flash_list.js",
media_external_list_url : "example_media_list.js",
file_browser_callback : "fileBrowserCallBack",
theme_advanced_resize_horizontal : false,
theme_advanced_resizing : true,
nonbreaking_force_tab : true,
apply_source_formatting : true,
template_cdate_classes : "cdate creationdate",
template_mdate_classes : "mdate somedate",
template_selected_content_classes : "selcontent",
template_cdate_format : "%m/%d/%Y : %H:%M:%S",
template_mdate_format : "%m/%d/%Y : %H:%M:%S",
template_replace_values : {
username : "Andrew Tetlaw",
"invoice-items" : Invoice.calculate,
"word-count" : WordCount.count,
"char-count" : WordCount.charCount
},
template_templates : [
{
title : 'Editing Details',
src : 'templates/editing_details.htm',
description : "Timestamps, editor's name and a comment area"
},
{
title : 'Invoice Template',
src : 'templates/invoice.htm',
description : 'Fill in the rows and the totals are calculated automatically'
},
{
title : 'Word Count',
src : 'templates/count.htm',
description : 'Word count for editor content'
},
{
title : 'Editors Comment',
src : 'templates/editors_comment.htm',
description : 'Add a comment about the selected text'
}
]
});
</script>
<!-- /TinyMCE -->
</head>
<body>
<a href="example_full.htm">[Full featured example]</a> <a href="example_advanced.htm">[Advanced example]</a> <a href="example_simple.htm">[Simple example]</a> <a href="example_word.htm">[Word example]</a>
<form method="get" action="">
<h3>Template example</h3>
This example shows how to make more advanced templates that execute logic.<br /><br />
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
&lt;span class=&quot;example1&quot;&gt;Test header 1&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;example2&quot;&gt;Test header 2&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;example3&quot;&gt;Test header 3&lt;/span&gt;&lt;br /&gt;
Some &lt;b&gt;element&lt;/b&gt;, this is to be editor 1. &lt;br /&gt; This editor instance has a 100% width to it.
&lt;p&gt;Some paragraph. &lt;a href=&quot;http://www.sourceforge.net&quot;&gt;Some link&lt;/a&gt;&lt;/p&gt;
&lt;img src=&quot;logo.jpg&quot;&gt;
</textarea>
<br />
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
</body>
</html>

View file

@ -0,0 +1,9 @@
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
// There templates will be displayed as a dropdown in all media dialog if the "template_external_list_url"
// option is defined in TinyMCE init.
var tinyMCETemplateList = [
// Name, URL, Description
["Simple snippet", "templates/snippet1.htm", "Simple HTML snippet."],
["Layout", "templates/layout1.htm", "HTML Layout."]
];

View file

@ -7,13 +7,13 @@
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,paste,directionality,fullscreen",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen",
theme_advanced_buttons1_add_before : "save,newdocument,separator",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
@ -22,7 +22,7 @@
plugi2n_insertdate_timeFormat : "%H:%M:%S",
external_link_list_url : "example_link_list.js",
external_image_list_url : "example_image_list.js",
flash_external_list_url : "example_flash_list.js",
media_external_list_url : "example_media_list.js",
file_browser_callback : "fileBrowserCallBack",
paste_use_dialog : false,
theme_advanced_resizing : true,

View file

@ -0,0 +1,5 @@
<!-- Template contents HTML outside the DIV will not be inserted -->
<div class="mceTmpl">
<p><em>Word Count: <span class="word-count">0</span>, Character count: <span class="char-count">0</span></em></p>
</div>

View file

@ -0,0 +1,14 @@
<!-- Template contents HTML outside the DIV will not be inserted -->
<div class="mceTmpl">
<table>
<thead>
<tr><th>Created</th><th>Modified</th><th>By</th>
</thead>
<tbody>
<tr><td class="cdate">Creation Date</td><td class="mdate">Last Modified</td><td class="username">UserName</td></tr>
<tr><td class="comment" colspan="3">Please insert editors comment here</td></tr>
</tbody>
</table>
</div>

View file

@ -0,0 +1,9 @@
<!-- Template contents HTML outside the DIV will not be inserted -->
<div class="mceTmpl">
<p class="selcontent" style="background-color: yellow">Selected Content</p>
<p style="padding: 3px;color:#666;border:1px solid #CCC;">
<strong>Editors Comment</strong> (<span class="cdate"></span>)<br />
[Insert your comment here]
</p>
</div>

View file

@ -0,0 +1,26 @@
<!-- Template contents HTML outside the DIV will not be inserted -->
<div class="mceTmpl">
<h1>Invoice # [invoice number] </h1>
<p>
[Client details]
</p>
<h2>Invoice Items</h2>
<table class="invoice-items">
<thead>
<tr><th class="col1">Item</th><th class="col2">Qty</th><th class="col3">Unit Cost</th><th class="col4">Total</th></tr>
</thead>
<tbody>
<tr><td>Item Description</td><td>1</td><td>$0.00</td><td>$0.00</td></tr>
<tr><td>Item Description</td><td>1</td><td>$0.00</td><td>$0.00</td></tr>
<tr><td>Item Description</td><td>1</td><td>$0.00</td><td>$0.00</td></tr>
</tbody>
<tfoot>
<tr><td colspan="3">Invoice Total</td><td id="invoice-total"></td></tr>
</tfoot>
</table>
</div>

View file

@ -0,0 +1,15 @@
<table border="1">
<thead>
<tr>
<td>Column 1</td>
<td>Column 2</td>
</tr>
</thead>
<tbody>
<tr>
<td>Username: {$username}</td>
<td>Staffid: {$staffid}</td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1 @@
This is just some <strong>code</strong>.