tinymce bug fixes and a new function in Utility.pm
|
|
@ -3,7 +3,7 @@ insert into webguiVersion values ('6.3.0','upgrade',unix_timestamp());
|
|||
delete from template where templateId='tinymce' and namespace='richEditor';
|
||||
INSERT INTO template VALUES ('tinymce','TinyMCE','^JavaScript(\"<tmpl_var session.config.extrasURL>/tinymce/jscripts/tiny_mce/tiny_mce.js\");\r\n<script language=\"javascript\" type=\"text/javascript\">\r\n tinyMCE.init({\r\n theme : \"advanced\",\r\n mode : \"specific_textareas\",\r\n plugins : \"collateral,emotions,insertImage,iespell,pagetree\",\r\n theme_advanced_buttons2_add : \"insertImage,pagetree,collateral\", \r\n theme_advanced_buttons3_add : \"emotions,iespell\" \r\n });\r\n</script>\r\n\r\n<tmpl_var textarea>','richEditor',1,1);
|
||||
delete from template where templateId='1' and namespace='richEditor/pagetree';
|
||||
INSERT INTO template VALUES ('1','Rich Editor Page Tree','<html>\r\n\r\n<script language=\"javascript\" src=\"<tmpl_var session.config.extrasURL>/tinymce/jscripts/tiny_mce/tiny_mce_popup.js\"></script>\r\n\r\n<script language=\"javascript\">\r\n\r\nfunction setLink(page) {\r\n document.getElementById(\"url\").value=\"^/;\" + page;\r\n}\r\n\r\nfunction createLink() {\r\n if (window.opener) { \r\n if (document.getElementById(\"url\").value == \"\") {\r\n alert(\"You must enter a link url\");\r\n document.getElementById(\"url\").focus();\r\n }\r\n\r\ntinyMCE.insertLink(document.getElementById(\"url\").value,document.getElementById(\"target\").value);\r\n window.close();\r\n }\r\n}\r\n\r\n</script>\r\n\r\n<body>\r\n\r\n<fieldset>\r\n<legend>Insert/Edit Link</legend>\r\n\r\n <fieldset>\r\n <legend>Link Settings</legend>\r\n <form name=\"linkchooser\">\r\n <table border=\"0\">\r\n <tr>\r\n <td>Link URL:</td>\r\n <td><input id=\"url\" name=\"url\" type=\"text value=\"\" style=\"width: 200px\"></td>\r\n </tr>\r\n <tr>\r\n <td>Link Target:</td>\r\n <td><select id=\"target\" name=\"target\" style=\"width: 200px\">\r\n <option value=\"_self\">Open link in same window</option>\r\n <option value=\"_blank\">Open link in new window</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr><td colspan=\"2\"> </td></tr>\r\n <tr>\r\n <td colspan=\"2\" align=\"right\"><input type=\"button\" value=\"Cancel\" onClick=\"window.close()\"><input type=\"button\" value=\"Create Link\" onClick=\"createLink()\"></td>\r\n </tr>\r\n </table>\r\n </form>\r\n \r\n\r\n </fieldset> \r\n<br>\r\n\r\n\r\n <fieldset>\r\n <legend>Available Page Tree</legend>\r\n\r\n<tmpl_loop page_loop>\r\n <tmpl_var indent><a href=\"#\" onClick=\"setLink(\'<tmpl_var url>\')\"><tmpl_var title></a><br />\r\n</tmpl_loop>\r\n\r\n </fieldset>\r\n \r\n</fieldset>\r\n</body>\r\n</html>','richEditor/pagetree',1,1);
|
||||
INSERT INTO template VALUES ('1','Rich Editor Page Tree','<html>\r\n\r\n<script language=\"javascript\" src=\"<tmpl_var session.config.extrasURL>/tinymce/jscripts/tiny_mce/tiny_mce_popup.js\"></script>\r\n\r\n<script language=\"javascript\">\r\n\r\nfunction setLink(page) {\r\n document.getElementById(\"url\").value=\"^\" + \"/\" + \";\" + page;\r\n}\r\n\r\nfunction createLink() {\r\n if (window.opener) { \r\n if (document.getElementById(\"url\").value == \"\") {\r\n alert(\"You must enter a link url\");\r\n document.getElementById(\"url\").focus();\r\n }\r\n\r\ntinyMCE.insertLink(document.getElementById(\"url\").value,document.getElementById(\"target\").value);\r\n window.close();\r\n }\r\n}\r\n\r\n</script>\r\n\r\n<body>\r\n\r\n<fieldset>\r\n<legend>Insert/Edit Link</legend>\r\n\r\n <fieldset>\r\n <legend>Link Settings</legend>\r\n <form name=\"linkchooser\">\r\n <table border=\"0\">\r\n <tr>\r\n <td>Link URL:</td>\r\n <td><input id=\"url\" name=\"url\" type=\"text value=\"\" style=\"width: 200px\"></td>\r\n </tr>\r\n <tr>\r\n <td>Link Target:</td>\r\n <td><select id=\"target\" name=\"target\" style=\"width: 200px\">\r\n <option value=\"_self\">Open link in same window</option>\r\n <option value=\"_blank\">Open link in new window</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr><td colspan=\"2\"> </td></tr>\r\n <tr>\r\n <td colspan=\"2\" align=\"right\"><input type=\"button\" value=\"Cancel\" onClick=\"window.close()\"><input type=\"button\" value=\"Create Link\" onClick=\"createLink()\"></td>\r\n </tr>\r\n </table>\r\n </form>\r\n \r\n\r\n </fieldset> \r\n<br>\r\n\r\n\r\n <fieldset>\r\n <legend>Available Page Tree</legend>\r\n\r\n<tmpl_loop page_loop>\r\n <tmpl_var indent><a href=\"#\" onClick=\"setLink(\'<tmpl_var url>\')\"><tmpl_var title></a><br />\r\n</tmpl_loop>\r\n\r\n </fieldset>\r\n \r\n</fieldset>\r\n</body>\r\n</html>','richEditor/pagetree',1,1);
|
||||
UPDATE template set template = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n <html>\r\n <head>\r\n <title><tmpl_var session.page.title> - <tmpl_var session.setting.companyName></title>\r\n <tmpl_var head.tags>\r\n <style type=\"text/css\">\r\nTD { font: 8pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\nTD.delete { font: italic 7pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\nTD.label { font: 8pt \'MS Shell Dlg\', Helvetica, sans-serif; background-color: #c0c0c0; }\r\nTD.none { font: italic 12pt \'MS Shell Dlg\', Helvetica, sans-serif; }\r\n\r\n</style>\r\n\r\n </head>\r\n <script language=\"javascript\">\r\n</script>\r\n<script language=\"javascript\">\r\n\r\nfunction actionComplete(action, path, error, info) {\r\n\r\n if (window.parent && window.parent.resetForm) {\r\n window.parent.resetForm();\r\n }\r\n\r\n}\r\n</script>\r\n\r\n<script language=\"javascript\">\r\nfunction deleteCollateral(options) {\r\n var lister = window.parent.document.getElementById(\"lister\");\r\n\r\n if(lister && confirm(\"Are you sure you want to delete this item ?\"))\r\n lister.src=\'^/;?op=htmlAreaDelete&\' + options;\r\n}\r\n</script>\r\n</head>\r\n<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n\r\n <tmpl_var body.content>\r\n \r\n</body>\r\n </html>\r\n ' where templateId = '10' and namespace='style';
|
||||
delete from userProfileField where fieldName='richEditor';
|
||||
INSERT INTO userProfileField VALUES ('richEditor','WebGUI::International::get(496)',1,0,'selectList','{5=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881),\r\n\'tinymce\'=>WebGUI::International::get(\"tinymce\")\n}','[\'tinymce\']',11,'4',0,1);
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ sub getOperations {
|
|||
'moveTreePageDown' => 'WebGUI::Operation::Page',
|
||||
'moveTreePageLeft' => 'WebGUI::Operation::Page',
|
||||
'moveTreePageRight' => 'WebGUI::Operation::Page',
|
||||
'richEditPageTree' => 'WebGUI::Operation::Page',
|
||||
'editProfile' => 'WebGUI::Operation::Profile',
|
||||
'editProfileSave' => 'WebGUI::Operation::Profile',
|
||||
'viewProfile' => 'WebGUI::Operation::Profile',
|
||||
|
|
|
|||
|
|
@ -493,13 +493,12 @@ sub _htmlAreaCreateTree {
|
|||
my ($name, $description, $url, $image, $indent, $target, $delete) = @_;
|
||||
if($delete) {
|
||||
$delete = qq/<a href="javascript:deleteCollateral('$delete')" title="delete $name">/;
|
||||
$delete .= '<img align="bottom" border="0" src="'.$session{config}{extrasURL}.
|
||||
'/toolbar/default/delete.gif" width="16" heigth="17"></a>';
|
||||
$delete .= deleteIcon()."</a>";
|
||||
}
|
||||
$target = ' target="'.$target.'" ' if ($target);
|
||||
$output .= '<tr><td align="left" valign="bottom" width="100%">';
|
||||
$output .= ('<img src="'.$session{config}{extrasURL}.'/htmlArea/images/indent.gif" width="17" heigth="17">') x$indent;
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/htmlArea/images/'.$image.'" align="bottom" alt="'.$name.'">';
|
||||
$output .= ('<img src="'.$session{config}{extrasURL}.'/tinymce/images/indent.gif" width="17" heigth="17">') x$indent;
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/tinymce/images/'.$image.'" align="bottom" alt="'.$name.'">';
|
||||
$output .= '<a title="'.$description.'" href="'.$url.'" '.$target.'><b>'.$name.'</b></a></td>';
|
||||
$output .= '<td class="delete" align="right" valign="bottom">'.$delete.'</td></tr>';
|
||||
return $output;
|
||||
|
|
@ -566,7 +565,7 @@ sub www_htmlAreaviewCollateral {
|
|||
$output .= '<table align="center" border="0" cellspacing="0" cellpadding="2" width="100%" height="100%">';
|
||||
if($session{form}{cid} eq "" || ! WebGUI::Grouping::isInGroup(4)) {
|
||||
$output .= '<tr><td align="center" valign="middle" width="100%" height="100%">';
|
||||
$output .= '<p align="center"><br><img src="'.$session{config}{extrasURL}.'/htmlArea/images/icon.gif"
|
||||
$output .= '<p align="center"><br><img src="'.$session{config}{extrasURL}.'/tinymce/images/icon.gif"
|
||||
border="0"></p>';
|
||||
$output .= '<P align=center><STRONG>WebGUI Image Manager<BR>for TinyMCE</STRONG></P>';
|
||||
$output .= '</td></tr></table>';
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use strict;
|
|||
use Tie::IxHash;
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(&makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomizeArray
|
||||
our @EXPORT = qw(&isBetween &makeTabSafe &makeArrayTabSafe &randomizeHash &commify &randomizeArray
|
||||
&sortHashDescending &sortHash &isIn &makeCommaSafe &makeArrayCommaSafe &randint &round);
|
||||
|
||||
|
||||
|
|
@ -75,6 +75,41 @@ sub commify {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 isBetween ( value, first, second )
|
||||
|
||||
Returns true if value is between two other values (inclusive). Otherwise returns false.
|
||||
|
||||
=head3 value
|
||||
|
||||
An integer to compare against first and second.
|
||||
|
||||
=head3 first
|
||||
|
||||
An integer to compare value against.
|
||||
|
||||
=head3 second
|
||||
|
||||
Another integer to compare value against.
|
||||
|
||||
=cut
|
||||
|
||||
sub isBetween {
|
||||
my $value = shift;
|
||||
my $first = shift;
|
||||
my $second = shift;
|
||||
if ($first > $second) {
|
||||
my $temp = $first;
|
||||
$first = $second;
|
||||
$second = $temp;
|
||||
}
|
||||
if ($value >= $first && $value <= $second) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 isIn ( value, list )
|
||||
|
||||
Returns a boolean value as to whether the value is in the array.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,24 @@
|
|||
|
||||
body{
|
||||
background-image: url(bg.jpg);
|
||||
background-repeat: repeat-x;
|
||||
border: 5px #4E8AAB solid;
|
||||
margin:0px;
|
||||
}
|
||||
.adminConsoleTitleIcon {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 20px;
|
||||
top: 12px;
|
||||
left: 22px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.adminConsoleTitleIconMedalian {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 14px;
|
||||
}
|
||||
|
||||
.adminConsoleTitle {
|
||||
|
|
@ -14,10 +27,9 @@
|
|||
left: 85px;
|
||||
font-size: 50px;
|
||||
text-align: left;
|
||||
/*background-image: url(bg_title.gif);*/
|
||||
background-repeat: repeat-x;
|
||||
padding: 20px 0px 0px 0px;
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
color: black;
|
||||
color: white;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 2px;
|
||||
font-size: 25px;
|
||||
|
|
@ -26,12 +38,13 @@
|
|||
}
|
||||
|
||||
.adminConsoleWorkArea {
|
||||
border: 1px solid #ddd;
|
||||
margin: 65px 200px 50px 10px;
|
||||
padding: 5px;
|
||||
-moz-border-radius: 10px;
|
||||
border: 1px solid #D7D7D7;
|
||||
margin: 65px 190px 50px 10px;
|
||||
padding: 15px;
|
||||
/*-moz-border-radius: 10px;*/
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
min-height: 400px;
|
||||
}
|
||||
/* Hides from non-ie: the holly hack \*/
|
||||
* html .adminConsoleWorkArea {
|
||||
|
|
@ -50,33 +63,33 @@
|
|||
padding: 5px; */
|
||||
font-family: helvetica, arial;
|
||||
font-size: 12px;
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
/* background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x; */
|
||||
}
|
||||
|
||||
.adminConsoleMainMenu {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid #D7D7D7;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
-moz-border-radius: 10px;
|
||||
/*-moz-border-radius: 10px;*/
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.adminConsoleSubmenu {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid #D7D7D7;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
-moz-border-radius: 10px;
|
||||
/*-moz-border-radius: 10px;*/
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.adminConsoleUtilityMenu {
|
||||
border: 1px solid #ddd;
|
||||
border: 1px solid #D7D7D7;
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
-moz-border-radius: 10px;
|
||||
/*-moz-border-radius: 10px;*/
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
|
@ -142,17 +155,19 @@
|
|||
/* tab forms */
|
||||
|
||||
.tab {
|
||||
border: 1px solid black;
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #eeeeee;
|
||||
-moz-border-radius: 6px 6px 0px 0px;
|
||||
background-image: url(bg_console.gif);
|
||||
background-repeat: repeat-x;
|
||||
/*-moz-border-radius: 6px 6px 0px 0px;*/
|
||||
}
|
||||
|
||||
.tabBody {
|
||||
border: 1px solid black;
|
||||
border-top: 1px solid black;
|
||||
border-left: 1px solid black;
|
||||
background-color: #dddddd;
|
||||
-moz-border-radius: 10px;
|
||||
border: 1px solid #dddddd;
|
||||
border-top: 1px solid #dddddd;
|
||||
border-left: 1px solid #dddddd;
|
||||
background-color: #ffffff;
|
||||
/*-moz-border-radius: 10px;*/
|
||||
}
|
||||
|
||||
div.tabs {
|
||||
|
|
@ -179,3 +194,16 @@ div.tabs {
|
|||
font-family: helvetica, arial;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
a{
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
color: #639CBA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover{
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
color: 336B8A;
|
||||
text-decoration: underline;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.9 KiB |
|
|
@ -1,3 +1,30 @@
|
|||
Version 1.36 (2004-10-19)
|
||||
Added a newly modified version of the German language pack from "krokogras".
|
||||
Added auto resizing to popup windows with the same name.
|
||||
Added example page for the plugin_preview_pageurl option in the preview plugin.
|
||||
Fixed issue with link button auto enable/disable feature when content selection was made with the keyboard.
|
||||
Fixed bug where events wasn't handled correctly in MSIE 5.5 and some 6.0 versions.
|
||||
Fixed so align on images gets set as float style when the inline_styles option is enabled.
|
||||
Fixed so solid border style isn't applied on elements with a border when the inline_styles option is enabled.
|
||||
Fixed some issues with tables and the inline_styles option.
|
||||
Fixed back button issue with MSIE, iframes was placed in browser history.
|
||||
Version 1.35 (2004-10-13)
|
||||
Added so that whitespace gets stripped in plugin and theme_advanced_buttons options.
|
||||
Added custom plugin_preview_pageurl option to preview plugin.
|
||||
Added Canadian French language packs for the new plugins, contributed by Virtuelcom.
|
||||
Added new theme_advanced_blockformats option.
|
||||
Added new title support to advanced theme link dialog.
|
||||
Added new Ctrl+B/I/U keyboard shortcuts for Firefox.
|
||||
Added Polish language pack contributed by "revyag".
|
||||
Added Taiwanese language pack contributed by "Jim Kou".
|
||||
Added updated German language pack contributed by "Krokogras".
|
||||
Fixed some issues with ieSpell including better language support.
|
||||
Fixed bug with default value in valid_elements not working in Firefox some times.
|
||||
Fixed bug when focusing links without selecting any characters.
|
||||
Fixed some typos in Swedish language pack.
|
||||
Fixed bug with content selection and link button auto enable/disable feature.
|
||||
Fixed bug issue when "theme_advanced_buttons<N>" options where left empty.
|
||||
Fixed various bugs with absolute URLs.
|
||||
Version 1.34 (2004-10-03)
|
||||
Added new insertdatetime plugin, inserts date/time in various formats.
|
||||
Added new preview plugin, previews the HTML page in a new window.
|
||||
|
|
|
|||
|
|
@ -205,9 +205,9 @@ optional and is not a requierd setting.<br>
|
|||
<td><strong>[insertlink_callback]</strong></td>
|
||||
<td>Name of function to call when "insertlink" command is executed.
|
||||
This function gets the selected link url and target and should return a
|
||||
array with "href" and "target" as collection names or
|
||||
array with "href", "target" and "title" as collection names or
|
||||
call the tinyMCE.insertLink on window.opener for compatiblity with Mozilla
|
||||
if a new window was used. Function format: linkcallback(href, target).</td>
|
||||
if a new window was used. Function format: linkcallback(href, target, title).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[insertimage_callback]</strong></td>
|
||||
|
|
@ -343,7 +343,7 @@ optional and is not a requierd setting.<br>
|
|||
</tr>
|
||||
<tr>
|
||||
<td><strong>[inline_styles]</strong></td>
|
||||
<td>If enabled attributes like width, height, vspace, hspace and align gets placed within the style attribute instead. The default value for this option is false.</td>
|
||||
<td>If enabled attributes like width, height, vspace, hspace and align gets placed within the style attribute instead. The default value for this option is false. Remeber to enable the style attribute in valid elements when using this one. </td>
|
||||
</tr>
|
||||
<tr bgcolor="#CCCCCC">
|
||||
<td colspan="2"><strong>Advanced theme specific settings </strong></td>
|
||||
|
|
@ -390,10 +390,14 @@ optional and is not a requierd setting.<br>
|
|||
<td><strong>[theme_advanced_source_editor_width]</strong></td>
|
||||
<td>Source editor window width.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td><strong>[theme_advanced_source_editor_height]</strong></td>
|
||||
<td>Source editor window height.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>[theme_advanced_blockformats]</strong></td>
|
||||
<td>Comma separated list of blockformats for the formatselect list. Defaults to: p,address,pre,h1,h2,h3,h4,h5,h6.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
Heres a example of a more complex initialization:<br>
|
||||
|
|
@ -674,7 +678,18 @@ template - Name/Value array with width, height and html keys in it. <br>
|
|||
name - Name of window argument to get. <br>
|
||||
[default_value] - Default value to be returned if window argument is missing. <br>
|
||||
<br>
|
||||
<strong>Returns:</strong> Window argument value.<br>
|
||||
<strong>Returns:</strong> Window argument value.
|
||||
<hr noshade>
|
||||
<strong>Syntax:</strong> tinyMCE.getParam(name, [default_value], [strip_whitespace]);<br>
|
||||
<br>
|
||||
<strong>Description: </strong>This method returns a TinyMCE configuration parameter. <br>
|
||||
<br>
|
||||
<strong>Parameters:</strong> <br>
|
||||
name - Name of window argument to get. <br>
|
||||
[default_value] - Default value to be returned if window argument is missing. <br>
|
||||
[strip_whitespace] - If true all whitespace will be removed from return value, default: false. <br>
|
||||
<br>
|
||||
<strong>Returns:</strong> TinyMCE configuration parameter.<br>
|
||||
<hr noshade>
|
||||
<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
|
||||
<tr>
|
||||
|
|
|
|||
17
www/extras/tinymce/jscripts/tiny_mce/langs/de.js
vendored
|
|
@ -1,5 +1,6 @@
|
|||
// DE lang variables
|
||||
// Edited by Simon Rupf (simon.rupf@intnet.ch)
|
||||
// updated by krokogras 10/14/2004
|
||||
|
||||
tinyMCELang['lang_bold_desc'] = 'Fett';
|
||||
tinyMCELang['lang_italic_desc'] = 'Kursiv';
|
||||
|
|
@ -9,25 +10,25 @@ tinyMCELang['lang_justifyleft_desc'] = 'Linksbündig';
|
|||
tinyMCELang['lang_justifycenter_desc'] = 'Zentriert';
|
||||
tinyMCELang['lang_justifyright_desc'] = 'Rechtsbündig';
|
||||
tinyMCELang['lang_justifyfull_desc'] = 'Blocksatz';
|
||||
tinyMCELang['lang_bullist_desc'] = 'Aufzählungszeichen';
|
||||
tinyMCELang['lang_bullist_desc'] = 'Aufzählungszeichen';
|
||||
tinyMCELang['lang_numlist_desc'] = 'Nummerierung';
|
||||
tinyMCELang['lang_outdent_desc'] = 'Einzug verkleinern';
|
||||
tinyMCELang['lang_indent_desc'] = 'Einzug vergrössern';
|
||||
tinyMCELang['lang_undo_desc'] = 'Rückgängig';
|
||||
tinyMCELang['lang_undo_desc'] = 'Rückgängig';
|
||||
tinyMCELang['lang_redo_desc'] = 'Wiederholen';
|
||||
tinyMCELang['lang_link_desc'] = 'Hyperlink einfügen';
|
||||
tinyMCELang['lang_unlink_desc'] = 'Hyperlink löschen';
|
||||
tinyMCELang['lang_image_desc'] = 'Bild einfügen';
|
||||
tinyMCELang['lang_unlink_desc'] = 'Hyperlink löschen';
|
||||
tinyMCELang['lang_image_desc'] = 'Bild einfügen/bearbeiten';
|
||||
tinyMCELang['lang_cleanup_desc'] = 'unsauberen Code aufräumen';
|
||||
tinyMCELang['lang_focus_alert'] = 'Bevor dieser Befehl ausgef\u00FChrt werden kann, muss eine zu editierende Instanz angegeben werden.';
|
||||
tinyMCELang['lang_edit_confirm'] = 'Möchten Sie den WYSIWYG-Modus f\u00FCr dieses Textfeld benutzen?';
|
||||
tinyMCELang['lang_focus_alert'] = 'Bevor dieser Befehl ausgeführt werden kann, muss die zu editierende Instanz ausgewählt werden.';
|
||||
tinyMCELang['lang_edit_confirm'] = 'Möchten Sie den WYSIWYG-Modus für dieses Textfeld benutzen?';
|
||||
tinyMCELang['lang_insert_link_title'] = 'Hyperlink einfügen/bearbeiten';
|
||||
tinyMCELang['lang_insert'] = 'Einfügen';
|
||||
tinyMCELang['lang_cancel'] = 'Abbrechen';
|
||||
tinyMCELang['lang_insert_link_url'] = 'Hyperlink URL';
|
||||
tinyMCELang['lang_insert_link_target'] = 'Ziel';
|
||||
tinyMCELang['lang_insert_link_target_same'] = 'Den Hyperlink im gleichen Fenster öffnen';
|
||||
tinyMCELang['lang_insert_link_target_blank'] = 'Den Hyperlink in einem neuen Fenster öffnen';
|
||||
tinyMCELang['lang_insert_link_target_same'] = 'Hyperlink im gleichen Fenster öffnen';
|
||||
tinyMCELang['lang_insert_link_target_blank'] = 'Hyperlink in neuem Fenster öffnen';
|
||||
tinyMCELang['lang_insert_image_title'] = 'Bild einfügen/bearbeiten';
|
||||
tinyMCELang['lang_insert_image_src'] = 'Bild URL';
|
||||
tinyMCELang['lang_insert_image_alt'] = 'Bildbeschreibung';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ tinyMCELang['lang_justifyright_desc'] = 'Högerställ';
|
|||
tinyMCELang['lang_justifyfull_desc'] = 'Fyll';
|
||||
tinyMCELang['lang_bullist_desc'] = 'Punktlista';
|
||||
tinyMCELang['lang_numlist_desc'] = 'Nummerlista';
|
||||
tinyMCELang['lang_outdent_desc'] = 'Undrag';
|
||||
tinyMCELang['lang_outdent_desc'] = 'Utdrag';
|
||||
tinyMCELang['lang_indent_desc'] = 'Indrag';
|
||||
tinyMCELang['lang_undo_desc'] = 'Ångra';
|
||||
tinyMCELang['lang_redo_desc'] = 'Gör om';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ tinyMCE.importPluginLanguagePack('emotions', 'uk,se');
|
|||
* Returns the HTML contents of the emotions control.
|
||||
*/
|
||||
function TinyMCE_emotions_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
switch (control_name) {
|
||||
case "emotions":
|
||||
return '<img id="{$editor_id}_emotions" src="{$pluginurl}/images/emotions.gif" title="{$lang_emotions_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}\',\'mceEmotion\');">';
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ function TinyMCE_emotions_getControlHTML(control_name) {
|
|||
*/
|
||||
function TinyMCE_emotions_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
switch (command) {
|
||||
case "mceEmotion":
|
||||
var template = new Array();
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,10 @@ function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface
|
|||
ieSpell.CheckDocumentNode(tinyMCE._getInstanceById(editor_id).contentDocument.documentElement);
|
||||
} catch (e) {
|
||||
if (e.number == -2146827859) {
|
||||
if (confirm("ieSpell not detected. Click OK to go to download page."))
|
||||
window.open('http://www.iespell.com/download.php','Download','');
|
||||
else
|
||||
alert("Error Loading ieSpell: Exception " + exception.number);
|
||||
}
|
||||
if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
|
||||
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
||||
} else
|
||||
alert("Error Loading ieSpell: Exception " + e.number);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// SE lang variables
|
||||
|
||||
tinyMCELang['lang_iespell_desc'] = 'Kör rättstavningskontroll';
|
||||
tinyMCELang['lang_iespell_download'] = "ieSpell verkar inte vara installerad. Klicka OK för att ladda hem."
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_iespell_desc'] = 'Run spell checking';
|
||||
tinyMCELang['lang_iespell_download'] = "ieSpell not detected. Click OK to go to download page."
|
||||
|
|
|
|||
|
|
@ -21,7 +21,11 @@ function TinyMCE_pagetree_execCommand(editor_id, element, command, user_interfac
|
|||
case "wgPageTree":
|
||||
var template = new Array();
|
||||
|
||||
template['file'] = getWebguiProperty ("pageURL") + '?op=richEditPageTree'; // Relative to theme
|
||||
alert(getWebguiProperty("pageURL"));
|
||||
|
||||
template['file'] = "../../../../../.." + getWebguiProperty ("pageURL") + '?op=richEditPageTree'; // Relative to theme
|
||||
|
||||
alert(template['file']);
|
||||
template['width'] = 500;
|
||||
template['height'] = 500;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,23 +20,38 @@ function TinyMCE_preview_execCommand(editor_id, element, command, user_interface
|
|||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePreview":
|
||||
var win = window.open("", "mcePreview", "menubar=yes,toolbar=yes,scrollbars=yes,left=20,top=20,width=" + tinyMCE.getParam("plugin_preview_width", "550") + ",height=" + tinyMCE.getParam("plugin_preview_height", "600"));
|
||||
var html = "";
|
||||
var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
|
||||
var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
|
||||
var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
|
||||
|
||||
html += '<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';
|
||||
html += '<html>';
|
||||
html += '<head>';
|
||||
html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
|
||||
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css">';
|
||||
html += '</head>';
|
||||
html += '<body>';
|
||||
html += tinyMCE.getContent();
|
||||
html += '</body>';
|
||||
html += '</html>';
|
||||
// Use a custom preview page
|
||||
if (previewPage) {
|
||||
var template = new Array();
|
||||
|
||||
win.document.write(html);
|
||||
win.document.close();
|
||||
template['file'] = previewPage;
|
||||
template['width'] = previewWidth;
|
||||
template['height'] = previewHeight;
|
||||
|
||||
tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "yes", content : tinyMCE.getContent(), content_css : tinyMCE.getParam("content_css")});
|
||||
} else {
|
||||
var win = window.open("", "mcePreview", "menubar=yes,toolbar=yes,scrollbars=yes,left=20,top=20,width=" + previewWidth + ",height=" + previewHeight);
|
||||
var html = "";
|
||||
|
||||
html += '<!doctype html public "-//w3c//dtd html 4.0 transitional//en">';
|
||||
html += '<html>';
|
||||
html += '<head>';
|
||||
html += '<title>' + tinyMCE.getLang('lang_preview_desc') + '</title>';
|
||||
html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
|
||||
html += '<link href="' + tinyMCE.getParam("content_css") + '" rel="stylesheet" type="text/css">';
|
||||
html += '</head>';
|
||||
html += '<body>';
|
||||
html += tinyMCE.getContent();
|
||||
html += '</body>';
|
||||
html += '</html>';
|
||||
|
||||
win.document.write(html);
|
||||
win.document.close();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,3 +19,5 @@ Initialization example:
|
|||
Configuration:
|
||||
plugin_preview_width - Preview window width. Defaults to 550.
|
||||
plugin_preview_height - Preview window height. Defaults to 600.
|
||||
plugin_preview_pageurl - Custom preview page URL relative from theme
|
||||
use "../../plugins/preview/example.html" for a example.
|
||||
|
|
|
|||
|
|
@ -58,18 +58,32 @@ function TinyMCE_advanced_getControlHTML(button_name) {
|
|||
// Custom controlls other than buttons
|
||||
switch (button_name) {
|
||||
case "formatselect":
|
||||
return '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">\
|
||||
<option value="<p>">{$lang_theme_paragraph}</option>\
|
||||
<!-- <option value="<div>">{$lang_theme_div}</option> -->\
|
||||
<option value="<address>">{$lang_theme_address}</option>\
|
||||
<option value="<pre>">{$lang_theme_pre}</option>\
|
||||
<option value="<h1>">{$lang_theme_h1}</option>\
|
||||
<option value="<h2>">{$lang_theme_h2}</option>\
|
||||
<option value="<h3>">{$lang_theme_h3}</option>\
|
||||
<option value="<h4>">{$lang_theme_h4}</option>\
|
||||
<option value="<h5>">{$lang_theme_h5}</option>\
|
||||
<option value="<h6>">{$lang_theme_h6}</option>\
|
||||
</select>';
|
||||
var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';
|
||||
var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(',');
|
||||
var lookup = [
|
||||
['p', '{$lang_theme_paragraph}'],
|
||||
['address', '{$lang_theme_address}'],
|
||||
['pre', '{$lang_theme_pre}'],
|
||||
['h1', '{$lang_theme_h1}'],
|
||||
['h2', '{$lang_theme_h2}'],
|
||||
['h3', '{$lang_theme_h3}'],
|
||||
['h4', '{$lang_theme_h4}'],
|
||||
['h5', '{$lang_theme_h5}'],
|
||||
['h6', '{$lang_theme_h6}']
|
||||
];
|
||||
|
||||
// Build format select
|
||||
for (var i=0; i<formats.length; i++) {
|
||||
for (var x=0; x<lookup.length; x++) {
|
||||
if (formats[i] == lookup[x][0])
|
||||
html += '<option value="<' + lookup[x][0] + '>">' + lookup[x][1] + '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
html += '</select>';
|
||||
|
||||
return html;
|
||||
|
||||
|
||||
case "styleselect":
|
||||
return '<select id="{$editor_id}_styleSelect" onmousedown="TinyMCE_advanced_setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';
|
||||
|
|
@ -193,9 +207,9 @@ function TinyMCE_advanced_getEditorTemplate(settings) {
|
|||
var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");
|
||||
|
||||
// Render row 1
|
||||
var buttonNamesRow1 = tinyMCE.getParam("theme_advanced_buttons1", "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect").split(',');
|
||||
buttonNamesRow1 = removeFromArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_disable", "").split(','));
|
||||
buttonNamesRow1 = addToArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_buttons1_add", "").split(','));
|
||||
var buttonNamesRow1 = tinyMCE.getParam("theme_advanced_buttons1", "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect", true, ',');
|
||||
buttonNamesRow1 = removeFromArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
|
||||
buttonNamesRow1 = addToArray(buttonNamesRow1, tinyMCE.getParam("theme_advanced_buttons1_add", "", true, ','));
|
||||
for (var i=0; i<buttonNamesRow1.length; i++)
|
||||
toolbarHTML += tinyMCE.getControlHTML(buttonNamesRow1[i]);
|
||||
|
||||
|
|
@ -203,9 +217,9 @@ function TinyMCE_advanced_getEditorTemplate(settings) {
|
|||
toolbarHTML += "<br>";
|
||||
|
||||
// Render row 2
|
||||
var buttonNamesRow2 = tinyMCE.getParam("theme_advanced_buttons2", "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code").split(',');
|
||||
buttonNamesRow2 = removeFromArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_disable", "").split(','));
|
||||
buttonNamesRow2 = addToArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_buttons2_add", "").split(','));
|
||||
var buttonNamesRow2 = tinyMCE.getParam("theme_advanced_buttons2", "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code", true, ',');
|
||||
buttonNamesRow2 = removeFromArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
|
||||
buttonNamesRow2 = addToArray(buttonNamesRow2, tinyMCE.getParam("theme_advanced_buttons2_add", "", true, ','));
|
||||
for (var i=0; i<buttonNamesRow2.length; i++)
|
||||
toolbarHTML += tinyMCE.getControlHTML(buttonNamesRow2[i]);
|
||||
|
||||
|
|
@ -213,9 +227,9 @@ function TinyMCE_advanced_getEditorTemplate(settings) {
|
|||
toolbarHTML += "<br>";
|
||||
|
||||
// Render row 3
|
||||
var buttonNamesRow3 = tinyMCE.getParam("theme_advanced_buttons3", "table,separator,row_before,row_after,delete_row,separator,col_before,col_after,delete_col,separator,hr,removeformat,visualaid,separator,sub,sup,separator,charmap").split(',');
|
||||
buttonNamesRow3 = removeFromArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_disable", "").split(','));
|
||||
buttonNamesRow3 = addToArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_buttons3_add", "").split(','));
|
||||
var buttonNamesRow3 = tinyMCE.getParam("theme_advanced_buttons3", "table,separator,row_before,row_after,delete_row,separator,col_before,col_after,delete_col,separator,hr,removeformat,visualaid,separator,sub,sup,separator,charmap", true, ',');
|
||||
buttonNamesRow3 = removeFromArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
|
||||
buttonNamesRow3 = addToArray(buttonNamesRow3, tinyMCE.getParam("theme_advanced_buttons3_add", "", true, ','));
|
||||
for (var i=0; i<buttonNamesRow3.length; i++)
|
||||
toolbarHTML += tinyMCE.getControlHTML(buttonNamesRow3[i]);
|
||||
|
||||
|
|
@ -268,7 +282,7 @@ function TinyMCE_advanced_getInsertLinkTemplate() {
|
|||
|
||||
template['file'] = 'link.htm';
|
||||
template['width'] = 320;
|
||||
template['height'] = 130;
|
||||
template['height'] = 160;
|
||||
|
||||
// Language specific width and height addons
|
||||
template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -65,4 +65,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Active/Désactive les lignes g
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insérer/Modifier une ancre';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Nom de l\'ancre';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insérer/Modifier une ancre';
|
||||
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Titre';
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
// DE lang variables
|
||||
// Translated 2004 by Crazy Chrissi
|
||||
// Edited 2004 by Krokogras
|
||||
|
||||
tinyMCELang['lang_theme_style_select'] = 'Styles';
|
||||
tinyMCELang['lang_theme_code_desc'] = 'HTML-Modus';
|
||||
|
|
@ -9,27 +10,27 @@ tinyMCELang['lang_theme_sub_desc'] = 'Tiefergestellt';
|
|||
tinyMCELang['lang_theme_sup_desc'] = 'Höhergestellt';
|
||||
tinyMCELang['lang_theme_hr_desc'] = 'Horizontale Linie einfügen';
|
||||
tinyMCELang['lang_theme_removeformat_desc'] = 'Formatierung löschen';
|
||||
tinyMCELang['lang_theme_table_desc'] = 'Neue Tabelle einfügen';
|
||||
tinyMCELang['lang_theme_table_desc'] = 'Neue Tabelle einfügen / Tabelle bearbeiten';
|
||||
tinyMCELang['lang_theme_table_insert_row_before_desc'] = 'Davor Zeile einfügen';
|
||||
tinyMCELang['lang_theme_table_insert_row_after_desc'] = 'Danach Zeile einfügen';
|
||||
tinyMCELang['lang_theme_table_delete_row_desc'] = 'Zeile löschen';
|
||||
tinyMCELang['lang_theme_table_insert_col_before_desc'] = 'Davor Spalte einfügen';
|
||||
tinyMCELang['lang_theme_table_insert_col_after_desc'] = 'Danach Spalte einfügen';
|
||||
tinyMCELang['lang_theme_table_delete_col_desc'] = 'Spalte löschen';
|
||||
tinyMCELang['lang_theme_custom1_desc'] = 'Your custom description here';
|
||||
tinyMCELang['lang_theme_custom1_desc'] = 'Beschreibung eingeben';
|
||||
tinyMCELang['lang_insert_image_border'] = 'Rahmen';
|
||||
tinyMCELang['lang_insert_image_dimensions'] = 'Größe';
|
||||
tinyMCELang['lang_insert_image_vspace'] = 'Vertikal einrücken';
|
||||
tinyMCELang['lang_insert_image_hspace'] = 'Horizontal einrücken';
|
||||
tinyMCELang['lang_insert_image_align'] = 'Ausrichten';
|
||||
tinyMCELang['lang_insert_image_align_default'] = 'Normal';
|
||||
tinyMCELang['lang_insert_image_align_baseline'] = 'Baseline';
|
||||
tinyMCELang['lang_insert_image_align_baseline'] = 'Grundlinie';
|
||||
tinyMCELang['lang_insert_image_align_top'] = 'Oben';
|
||||
tinyMCELang['lang_insert_image_align_middle'] = 'Mittig';
|
||||
tinyMCELang['lang_insert_image_align_middle'] = 'Mitte';
|
||||
tinyMCELang['lang_insert_image_align_bottom'] = 'Unten';
|
||||
tinyMCELang['lang_insert_image_align_texttop'] = 'TextTop';
|
||||
tinyMCELang['lang_insert_image_align_absmiddle'] = 'Absolute Middle';
|
||||
tinyMCELang['lang_insert_image_align_absbottom'] = 'Absolute Bottom';
|
||||
tinyMCELang['lang_insert_image_align_texttop'] = 'Textoberkante';
|
||||
tinyMCELang['lang_insert_image_align_absmiddle'] = 'Absolute Mitte';
|
||||
tinyMCELang['lang_insert_image_align_absbottom'] = 'Absolut unten';
|
||||
tinyMCELang['lang_insert_image_align_left'] = 'Links';
|
||||
tinyMCELang['lang_insert_image_align_right'] = 'Rechts';
|
||||
tinyMCELang['lang_insert_table_title'] = 'Tabelle Einfügen/Bearbeiten';
|
||||
|
|
@ -48,7 +49,7 @@ tinyMCELang['lang_insert_table_align_middle'] = 'Zentriert';
|
|||
tinyMCELang['lang_insert_table_class'] = 'Klasse';
|
||||
tinyMCELang['lang_insert_table_delta_width'] = 30;
|
||||
tinyMCELang['lang_theme_fontdefault'] = 'Normal';
|
||||
tinyMCELang['lang_theme_paragraph'] = 'Standart-Text';
|
||||
tinyMCELang['lang_theme_paragraph'] = 'Standard-Text';
|
||||
tinyMCELang['lang_theme_div'] = 'Div';
|
||||
tinyMCELang['lang_theme_address'] = 'Addresse';
|
||||
tinyMCELang['lang_theme_pre'] = 'Vorformatiert (pre)';
|
||||
|
|
@ -60,10 +61,11 @@ tinyMCELang['lang_theme_h5'] = 'Überschrift 5';
|
|||
tinyMCELang['lang_theme_h6'] = 'Überschrift 6';
|
||||
tinyMCELang['lang_theme_colorpicker_title'] = 'Wähle eine Farbe';
|
||||
tinyMCELang['lang_theme_colorpicker_apply'] = 'Übernehmen';
|
||||
tinyMCELang['lang_theme_forecolor_desc'] = 'Select forecolor';
|
||||
tinyMCELang['lang_theme_forecolor_desc'] = 'Schriftfarbe ausw„hlen';
|
||||
tinyMCELang['lang_theme_charmap_title'] = 'Wähle ein Sonderzeichen';
|
||||
tinyMCELang['lang_theme_charmap_desc'] = 'Sonderzeichen einfügen';
|
||||
tinyMCELang['lang_theme_visualaid_desc'] = 'Anzeige von Hilfslinien / unsichtbaren Elementen an/aus';
|
||||
tinyMCELang['lang_insert_anchor_title'] = 'Anker einfügen/bearbeiten';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Ankername';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Anker einfügen/bearbeiten';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Slå linjer/usynlige elementer t
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Indsæt/rediger bogmærke';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Bogmærkets navn';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Indsæt/rediger bogmærke';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -68,3 +68,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -66,3 +66,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -67,3 +67,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -66,3 +66,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -67,3 +67,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ tinyMCELang['lang_theme_code_title'] = 'HTML Källkåds Redigerare';
|
|||
tinyMCELang['lang_theme_code_save'] = 'Spara';
|
||||
tinyMCELang['lang_theme_sub_desc'] = 'Subscript';
|
||||
tinyMCELang['lang_theme_sup_desc'] = 'Superscript';
|
||||
tinyMCELang['lang_theme_hr_desc'] = 'Sätt in horizontell linie';
|
||||
tinyMCELang['lang_theme_hr_desc'] = 'Sätt in horisontell linie';
|
||||
tinyMCELang['lang_theme_removeformat_desc'] = 'Tabort formattering';
|
||||
tinyMCELang['lang_theme_table_desc'] = 'Skapa ny tabell';
|
||||
tinyMCELang['lang_theme_table_insert_row_before_desc'] = 'Skapa rad före';
|
||||
|
|
@ -19,9 +19,9 @@ tinyMCELang['lang_theme_custom1_desc'] = 'Din specialfunktions beskriving hä
|
|||
tinyMCELang['lang_insert_image_border'] = 'Ram';
|
||||
tinyMCELang['lang_insert_image_dimensions'] = 'Dimentioner';
|
||||
tinyMCELang['lang_insert_image_vspace'] = 'Vertikalt tomrum';
|
||||
tinyMCELang['lang_insert_image_hspace'] = 'Horizontellt tomrum';
|
||||
tinyMCELang['lang_insert_image_hspace'] = 'Horisontellt tomrum';
|
||||
tinyMCELang['lang_insert_image_align'] = 'Justering';
|
||||
tinyMCELang['lang_insert_image_align_default'] = 'Inget';
|
||||
tinyMCELang['lang_insert_image_align_default'] = 'Ingen';
|
||||
tinyMCELang['lang_insert_image_align_baseline'] = 'Bottenlinien';
|
||||
tinyMCELang['lang_insert_image_align_top'] = 'Längstupp';
|
||||
tinyMCELang['lang_insert_image_align_middle'] = 'Mitten';
|
||||
|
|
@ -66,3 +66,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Sl
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Skapa/redigera ankare';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Ankarnamn';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Skapa/redigera ankare';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Titel';
|
||||
|
|
|
|||
|
|
@ -65,3 +65,4 @@ tinyMCELang['lang_theme_visualaid_desc'] = 'Toggle guidelines/invisible elements
|
|||
tinyMCELang['lang_insert_anchor_title'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_insert_anchor_name'] = 'Anchor name';
|
||||
tinyMCELang['lang_theme_anchor_desc'] = 'Insert/edit anchor';
|
||||
tinyMCELang['lang_theme_insert_link_titlefield'] = 'Title';
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
}
|
||||
|
||||
document.forms[0].href.value = tinyMCE.getWindowArg('href');
|
||||
document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
|
||||
|
||||
window.focus();
|
||||
}
|
||||
|
|
@ -20,8 +21,9 @@
|
|||
if (window.opener) {
|
||||
var href = document.forms[0].href.value;
|
||||
var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;
|
||||
var title = document.forms[0].linktitle.value;
|
||||
|
||||
window.opener.tinyMCE.insertLink(href, target);
|
||||
window.opener.tinyMCE.insertLink(href, target, title);
|
||||
top.close();
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +50,11 @@
|
|||
<td><select name="target" style="width: 200px">
|
||||
<option value="_self">{$lang_insert_link_target_same}</option>
|
||||
<option value="_blank">{$lang_insert_link_target_blank}</option>
|
||||
</select></td>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang_theme_insert_link_titlefield}:</td>
|
||||
<td><input name="linktitle" type="text" id="linktitle" value="" style="width: 200px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" name="insert" value="{$lang_insert}" onclick="insertLink();">
|
||||
|
|
|
|||
252
www/extras/tinymce/jscripts/tiny_mce/tiny_mce_src.js
vendored
|
|
@ -116,12 +116,12 @@ function TinyMCE_init(settings) {
|
|||
this.settings = settings;
|
||||
this.settings['mode'] = tinyMCE.getParam("mode", "none");
|
||||
this.settings['theme'] = tinyMCE.getParam("theme", "default");
|
||||
this.settings['plugins'] = tinyMCE.getParam("plugins", "");
|
||||
this.settings['plugins'] = tinyMCE.getParam("plugins", "", true);
|
||||
this.settings['language'] = tinyMCE.getParam("language", "uk");
|
||||
this.settings['docs_language'] = tinyMCE.getParam("docs_language", this.settings['language']);
|
||||
this.settings['elements'] = tinyMCE.getParam("elements", "");
|
||||
this.settings['textarea_trigger'] = tinyMCE.getParam("textarea_trigger", "mce_editable");
|
||||
this.settings['valid_elements'] = tinyMCE.getParam("valid_elements", "a[name|href|target],strong/b[class],em/i[class],strike[class],u[class],p[class|align],ol,ul,li,br,img[class|src|border=0|alt|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan],td[class|colspan|rowspan|width|height],div[class|align],span[class|align],pre[class|align],address[class|align],h1[class|align],h2[class|align],h3[class|align],h4[class|align],h5[class|align],h6[class|align],hr");
|
||||
this.settings['valid_elements'] = tinyMCE.getParam("valid_elements", "a[name|href|target|title],strong/b[class],em/i[class],strike[class],u[class],p[class|align],ol,ul,li,br,img[class|src|border=0|alt|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan],td[class|colspan|rowspan|width|height],div[class|align],span[class|align],pre[class|align],address[class|align],h1[class|align],h2[class|align],h3[class|align],h4[class|align],h5[class|align],h6[class|align],hr");
|
||||
this.settings['extended_valid_elements'] = tinyMCE.getParam("extended_valid_elements", "");
|
||||
this.settings['invalid_elements'] = tinyMCE.getParam("invalid_elements", "");
|
||||
this.settings['encoding'] = tinyMCE.getParam("encoding", "");
|
||||
|
|
@ -220,7 +220,7 @@ function TinyMCE_init(settings) {
|
|||
document.write('<link href="' + this.settings['editor_css'] + '" rel="stylesheet" type="text/css">');
|
||||
|
||||
// Add theme plugins
|
||||
var themePlugins = this.settings['plugins'].split(',');
|
||||
var themePlugins = tinyMCE.getParam('plugins', '', true, ',');
|
||||
if (this.settings['plugins'] != '') {
|
||||
for (var i=0; i<themePlugins.length; i++)
|
||||
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCE.baseURL + '/plugins/' + themePlugins[i] + '/editor_plugin.js"></script>');
|
||||
|
|
@ -346,14 +346,38 @@ function TinyMCE_execCommand(command, user_interface, value) {
|
|||
}
|
||||
|
||||
function TinyMCE_addEventHandlers(editor_id) {
|
||||
var instance = tinyMCE.instances[editor_id];
|
||||
instance.contentWindow.document.editor_id = editor_id;
|
||||
instance.contentWindow.document.addEventListener("keypress", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("keydown", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("keyup", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("click", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("focus", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.designMode = "on";
|
||||
if (tinyMCE.isMSIE) {
|
||||
var patchFunc = function() {
|
||||
var event = document.frames[editor_id].event;
|
||||
|
||||
event.target = event.srcElement;
|
||||
event.target.editor_id = editor_id;
|
||||
|
||||
TinyMCE_handleEvent(event);
|
||||
};
|
||||
|
||||
// Event patch
|
||||
document.frames[editor_id].document.onkeypress = patchFunc;
|
||||
document.frames[editor_id].document.onkeyup = patchFunc;
|
||||
document.frames[editor_id].document.onkeydown = patchFunc;
|
||||
|
||||
// Due to stange focus bug in MSIE this line is disabled for now
|
||||
//document.frames[editor_id].document.onmousedown = patchFunc;
|
||||
document.frames[editor_id].document.onmouseup = patchFunc;
|
||||
document.frames[editor_id].document.onclick = patchFunc;
|
||||
} else {
|
||||
var instance = tinyMCE.instances[editor_id];
|
||||
|
||||
instance.contentWindow.document.editor_id = editor_id;
|
||||
instance.contentWindow.document.addEventListener("keypress", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("keydown", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("keyup", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("click", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("mouseup", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("mousedown", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.addEventListener("focus", tinyMCE.handleEvent, false);
|
||||
instance.contentWindow.document.designMode = "on";
|
||||
}
|
||||
}
|
||||
|
||||
function TinyMCE__createIFrame(replace_element) {
|
||||
|
|
@ -370,6 +394,11 @@ function TinyMCE__createIFrame(replace_element) {
|
|||
iframe.setAttribute("topMargin", "0");
|
||||
iframe.setAttribute("width", tinyMCE.settings['area_width']);
|
||||
iframe.setAttribute("height", tinyMCE.settings['area_height']);
|
||||
|
||||
// Must have a src element in MSIE HTTPs breaks aswell as absoute URLs
|
||||
if (tinyMCE.isMSIE)
|
||||
iframe.setAttribute("src", tinyMCE.baseURL + "/blank.htm");
|
||||
|
||||
iframe.style.width = tinyMCE.settings['area_width'];
|
||||
iframe.style.height = tinyMCE.settings['area_height'];
|
||||
|
||||
|
|
@ -403,10 +432,9 @@ function TinyMCE_setEditMode(editor_id, mode) {
|
|||
//targetMCEControl.contentWindow.document.designMode = mode ? "on" : "off";
|
||||
} else {
|
||||
var targetElement = document.getElementById(editor_id);
|
||||
if (targetElement && targetElement.nodeName.toLowerCase() == "span") {
|
||||
if (targetElement && targetElement.nodeName.toLowerCase() == "span")
|
||||
targetElement = tinyMCE._createIFrame(targetElement);
|
||||
dynamicIFrame = true;
|
||||
} else
|
||||
else
|
||||
targetElement = document.frames[editor_id];
|
||||
|
||||
targetMCEControl.targetElement = targetElement;
|
||||
|
|
@ -442,28 +470,10 @@ function TinyMCE_setEditMode(editor_id, mode) {
|
|||
}
|
||||
}
|
||||
|
||||
if (tinyMCE.isMSIE) {
|
||||
document.frames[editor_id].document.ondeactive = tinyMCE.handleEvent;
|
||||
|
||||
var patchFunc = function() {
|
||||
var event = document.frames[editor_id].event;
|
||||
|
||||
event.target = event.srcElement;
|
||||
event.target.editor_id = editor_id;
|
||||
|
||||
TinyMCE_handleEvent(event);
|
||||
};
|
||||
|
||||
// * * Event patch
|
||||
document.frames[editor_id].document.onkeypress = patchFunc;
|
||||
document.frames[editor_id].document.onkeyup = patchFunc;
|
||||
document.frames[editor_id].document.onkeydown = patchFunc;
|
||||
|
||||
// Due to stange focus bug in MSIE this line is disabled for now
|
||||
//document.frames[editor_id].document.onmousedown = patchFunc;
|
||||
document.frames[editor_id].document.onmouseup = patchFunc;
|
||||
document.frames[editor_id].document.onclick = patchFunc;
|
||||
}
|
||||
// This timeout is needed in MSIE 5.5 for some odd reason
|
||||
// it seems that the document.frames isn't initialized yet?
|
||||
if (tinyMCE.isMSIE)
|
||||
window.setTimeout("TinyMCE_addEventHandlers('" + editor_id + "');", 1);
|
||||
|
||||
//window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", (tinyMCE.isMSIE ? 1 : 1000));
|
||||
tinyMCE.setupContent(editor_id);
|
||||
|
|
@ -490,6 +500,10 @@ function TinyMCE_setupContent(editor_id) {
|
|||
doc.body.dir = this.settings['directionality'];
|
||||
doc.editorId = editor_id;
|
||||
|
||||
// Add on document element in Mozilla
|
||||
if (!tinyMCE.isMSIE)
|
||||
doc.documentElement.editorId = editor_id;
|
||||
|
||||
// Setup base element
|
||||
base = doc.createElement("base");
|
||||
base.setAttribute('href', tinyMCE.settings['base_href']);
|
||||
|
|
@ -504,20 +518,19 @@ function TinyMCE_setupContent(editor_id) {
|
|||
if (tinyMCE.isMSIE) {
|
||||
var styleSheet = document.frames[editor_id].document.createStyleSheet(instance.settings['content_css']);
|
||||
|
||||
window.setInterval('tinyMCE.getCSSClasses(document.frames["' + editor_id + '"].document, "' + editor_id + '");', 500);
|
||||
// Ugly!!!
|
||||
window.setInterval('try{tinyMCE.getCSSClasses(document.frames["' + editor_id + '"].document, "' + editor_id + '");}catch(e){}', 500);
|
||||
|
||||
if (tinyMCE.settings["force_br_newlines"])
|
||||
document.frames[editor_id].document.styleSheets[0].addRule("p", "margin: 0px;");
|
||||
|
||||
var patchFunc = function() {
|
||||
var event = document.frames[editor_id].event;
|
||||
|
||||
event.target = document.frames[editor_id].document;
|
||||
|
||||
TinyMCE_handleEvent(event);
|
||||
};
|
||||
|
||||
document.frames[editor_id].document.body.onblur = patchFunc;
|
||||
document.frames[editor_id].document.body.onbeforepaste = patchFunc;
|
||||
document.frames[editor_id].document.body.onbeforecut = patchFunc;
|
||||
document.frames[editor_id].document.body.onpaste = patchFunc;
|
||||
|
|
@ -611,9 +624,8 @@ function TinyMCE_setupContent(editor_id) {
|
|||
eval(tinyMCE.settings['setupcontent_callback'] + '(editor_id,instance.contentWindow.document.body);');
|
||||
|
||||
// Re-add design mode on mozilla
|
||||
if (!tinyMCE.isMSIE) {
|
||||
if (!tinyMCE.isMSIE)
|
||||
TinyMCE_addEventHandlers(editor_id);
|
||||
}
|
||||
}
|
||||
|
||||
function TinyMCE_handleEvent(e) {
|
||||
|
|
@ -661,6 +673,30 @@ function TinyMCE_handleEvent(e) {
|
|||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.charCode == 98) { // Ctrl+B
|
||||
tinyMCE.selectedInstance.execCommand("Bold");
|
||||
|
||||
// Cancel event
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.charCode == 105) { // Ctrl+I
|
||||
tinyMCE.selectedInstance.execCommand("Italic");
|
||||
|
||||
// Cancel event
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (e.charCode == 117) { // Ctrl+U
|
||||
tinyMCE.selectedInstance.execCommand("Underline");
|
||||
|
||||
// Cancel event
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (tinyMCE.settings['custom_undo_redo']) {
|
||||
|
|
@ -788,6 +824,10 @@ function TinyMCE_handleEvent(e) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger some nodechange on keyup
|
||||
if (e.type == "keyup")
|
||||
tinyMCE.triggerNodeChange();
|
||||
break;
|
||||
|
||||
case "mousedown":
|
||||
|
|
@ -806,11 +846,12 @@ function TinyMCE_handleEvent(e) {
|
|||
|
||||
// Reset typing
|
||||
tinyMCE.selectedInstance.typing = false;
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCE.triggerNodeChange(false);
|
||||
|
||||
// Just in case
|
||||
if (!tinyMCE.selectedInstance && e.target.editorId)
|
||||
tinyMCE.selectedInstance = tinyMCE.instances[e.target.editorId];
|
||||
|
|
@ -889,7 +930,7 @@ function TinyMCE_onLoad() {
|
|||
// Add editor instances based on mode
|
||||
switch (tinyMCE.settings['mode']) {
|
||||
case "exact":
|
||||
var elements = tinyMCE.settings['elements'].split(',');
|
||||
var elements = tinyMCE.getParam('elements', '', true, ',');
|
||||
|
||||
for (var i=0; i<elements.length; i++) {
|
||||
var element = tinyMCE._getElementById(elements[i]);
|
||||
|
|
@ -1065,13 +1106,20 @@ function TinyMCE__fixInlineStyles(elm) {
|
|||
// Setup border
|
||||
value = tinyMCE.isMSIE ? elm.border : elm.getAttribute("border");
|
||||
if (value && value != "")
|
||||
elm.style.border = "solid " + value + "px";
|
||||
elm.style.borderWidth = value + "px";
|
||||
}
|
||||
|
||||
// Setup align
|
||||
value = elm.getAttribute("align");
|
||||
if (value && value != "")
|
||||
elm.style.textAlign = value;
|
||||
if (value && value != "") {
|
||||
if (elm.nodeName.toLowerCase() == "img") {
|
||||
if (tinyMCE.isMSIE)
|
||||
elm.style.styleFloat = value;
|
||||
else
|
||||
elm.style.cssFloat = value;
|
||||
} else
|
||||
elm.style.textAlign = value;
|
||||
}
|
||||
|
||||
// Setup vspace
|
||||
value = elm.getAttribute("vspace");
|
||||
|
|
@ -1089,9 +1137,11 @@ function TinyMCE__cleanupAttribute(valid_attributes, element_name, attribute_nod
|
|||
var attribValue = attribute_node.nodeValue;
|
||||
var attribMustBeValue = null;
|
||||
|
||||
// Inline styling
|
||||
if (tinyMCE.cleanup_inline_styles && ((element_name != "table" && (attribName == "width" || attribName == "height" || attribName == "border")) || attribName == "align" || attribName == "valign" || attribName == "hspace"))
|
||||
return null;
|
||||
// Inline styling, skip them
|
||||
if (tinyMCE.cleanup_inline_styles && element_name != "table" && element_name != "td") {
|
||||
if (attribName == "width" || attribName == "height" || attribName == "border" || attribName == "align" || attribName == "valign" || attribName == "hspace" || attribName == "vspace")
|
||||
return null;
|
||||
}
|
||||
|
||||
// Mozilla attibute, remove them
|
||||
if (attribName.indexOf('moz_') != -1)
|
||||
|
|
@ -1322,7 +1372,7 @@ function TinyMCE_cleanupNode(node) {
|
|||
|
||||
if (attribDefaultValue || attribForceValue) {
|
||||
var attribValue = node.getAttribute(attribName);
|
||||
if (node.getAttribute(attribName) == "")
|
||||
if (node.getAttribute(attribName) == null || node.getAttribute(attribName) == "")
|
||||
attribValue = attribDefaultValue;
|
||||
|
||||
attribValue = attribForceValue ? attribForceValue : attribValue;
|
||||
|
|
@ -1332,6 +1382,7 @@ function TinyMCE_cleanupNode(node) {
|
|||
attribValue = "uid_" + (tinyMCE.cleanup_idCount++);
|
||||
|
||||
node.setAttribute(attribName, attribValue);
|
||||
//alert(attribName + "=" + attribValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1392,6 +1443,8 @@ function TinyMCE_cleanupNode(node) {
|
|||
elementAttribs += " " + attrib.name + "=" + '"' + attrib.value + '"';
|
||||
}
|
||||
}
|
||||
|
||||
//alert(elementAttribs);
|
||||
}
|
||||
|
||||
// Add nbsp to some elements
|
||||
|
|
@ -1644,7 +1697,14 @@ function TinyMCE__cleanupHTML(doc, config, element, visual, on_save) {
|
|||
return html;
|
||||
}
|
||||
|
||||
function TinyMCE_insertLink(href, target) {
|
||||
function TinyMCE_insertLink(href, target, title) {
|
||||
function setAttrib(element, name, value) {
|
||||
if (value != null && value != "")
|
||||
element.setAttribute(name, value);
|
||||
else
|
||||
element.removeAttribute(name);
|
||||
}
|
||||
|
||||
this.execCommand("mceAddUndoLevel");
|
||||
|
||||
if (this.selectedInstance && this.selectedElement && this.selectedElement.nodeName.toLowerCase() == "img") {
|
||||
|
|
@ -1653,8 +1713,9 @@ function TinyMCE_insertLink(href, target) {
|
|||
var linkElement = doc.createElement("a");
|
||||
|
||||
href = eval(tinyMCE.settings['urlconvertor_callback'] + "(href, linkElement);");
|
||||
linkElement.setAttribute('href', href);
|
||||
linkElement.setAttribute('target', target);
|
||||
setAttrib(linkElement, 'href', href);
|
||||
setAttrib(linkElement, 'target', target);
|
||||
setAttrib(linkElement, 'title', title);
|
||||
linkElement.appendChild(this.selectedElement.cloneNode(true));
|
||||
|
||||
this.selectedElement.parentNode.replaceChild(linkElement, this.selectedElement);
|
||||
|
|
@ -1670,9 +1731,10 @@ function TinyMCE_insertLink(href, target) {
|
|||
|
||||
for (var i=0; i<elementArray.length; i++) {
|
||||
href = eval(tinyMCE.settings['urlconvertor_callback'] + "(href, elementArray[i]);");
|
||||
elementArray[i].setAttribute('href', href);
|
||||
elementArray[i].setAttribute('mce_real_href', href);
|
||||
elementArray[i].setAttribute('target', target);
|
||||
setAttrib(elementArray[i], 'href', href);
|
||||
setAttrib(elementArray[i], 'mce_real_href', href);
|
||||
setAttrib(elementArray[i], 'target', target);
|
||||
setAttrib(elementArray[i], 'title', title);
|
||||
}
|
||||
|
||||
tinyMCE.linkElement = elementArray[0];
|
||||
|
|
@ -1680,9 +1742,10 @@ function TinyMCE_insertLink(href, target) {
|
|||
|
||||
if (this.linkElement) {
|
||||
href = eval(tinyMCE.settings['urlconvertor_callback'] + "(href, this.linkElement);");
|
||||
this.linkElement.setAttribute('href', href);
|
||||
this.linkElement.setAttribute('mce_real_href', href);
|
||||
this.linkElement.setAttribute('target', target);
|
||||
setAttrib(this.linkElement, 'href', href);
|
||||
setAttrib(this.linkElement, 'mce_real_href', href);
|
||||
setAttrib(this.linkElement, 'target', target);
|
||||
setAttrib(this.linkElement, 'title', title);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1784,6 +1847,9 @@ function TinyMCE_getParentElement(node, names, attrib_name, attrib_value) {
|
|||
function TinyMCE_convertURL(url, node, on_save) {
|
||||
var fileProto = (document.location.protocol == "file:");
|
||||
|
||||
// Something is wrong, remove weirdness
|
||||
url = tinyMCE.regexpReplace(url, '(http|https):///', '/');
|
||||
|
||||
// Mailto link or anchor (Pass through)
|
||||
if (url.indexOf('mailto:') != -1 || url.indexOf('javascript:') != -1 || tinyMCE.regexpReplace(url,'[ \t\r\n\+]|%20','').charAt(0) == "#")
|
||||
return url;
|
||||
|
|
@ -1817,8 +1883,13 @@ function TinyMCE_convertURL(url, node, on_save) {
|
|||
// Remove current domain
|
||||
if (!fileProto && tinyMCE.settings['remove_script_host']) {
|
||||
var start = document.location.protocol + "//" + document.location.hostname + "/";
|
||||
|
||||
if (url.indexOf(start) == 0)
|
||||
url = url.substring(start.length-1);
|
||||
|
||||
// Add first slash if missing on a absolute URL
|
||||
if (!tinyMCE.settings['relative_urls'] && url.indexOf('://') == -1 && url.charAt(0) != '/')
|
||||
url = '/' + url;
|
||||
}
|
||||
|
||||
return url;
|
||||
|
|
@ -1929,12 +2000,37 @@ function TinyMCE_convertAbsoluteURLToRelativeURL(base_url, url_to_relative) {
|
|||
return outputString;
|
||||
}
|
||||
|
||||
function TinyMCE_getParam(name, default_value) {
|
||||
return (typeof this.settings[name] == "undefined") ? default_value : this.settings[name];
|
||||
function TinyMCE_getParam(name, default_value, strip_whitespace, split_chr) {
|
||||
var value = (typeof this.settings[name] == "undefined") ? default_value : this.settings[name];
|
||||
|
||||
if (strip_whitespace)
|
||||
value = tinyMCE.regexpReplace(value, "[ \t\r\n]", "");
|
||||
|
||||
if (typeof split_chr != "undefined" && split_chr != null) {
|
||||
value = value.split(split_chr);
|
||||
var outArray = new Array();
|
||||
|
||||
for (var i=0; i<value.length; i++) {
|
||||
if (value[i] && value[i] != "")
|
||||
outArray[outArray.length] = value[i];
|
||||
}
|
||||
|
||||
value = outArray;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function TinyMCE_getLang(name, default_value) {
|
||||
return (typeof tinyMCELang[name] == "undefined") ? default_value : tinyMCELang[name];
|
||||
function TinyMCE_getLang(name, default_value, parse_entities) {
|
||||
var value = (typeof tinyMCELang[name] == "undefined") ? default_value : tinyMCELang[name];
|
||||
|
||||
if (parse_entities) {
|
||||
var el = document.createElement("div");
|
||||
el.innerHTML = value;
|
||||
value = el.innerHTML;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function TinyMCE_replaceVar(replace_haystack, replace_var, replace_str) {
|
||||
|
|
@ -1977,7 +2073,7 @@ function TinyMCE_triggerNodeChange(focus) {
|
|||
}
|
||||
|
||||
// Trigger plugin nodechanges
|
||||
var plugins = tinyMCE.settings['plugins'].split(',');
|
||||
var plugins = tinyMCE.getParam('plugins', '', true, ',');
|
||||
for (var i=0; i<plugins.length; i++) {
|
||||
if (eval("typeof TinyMCE_" + plugins[i] + "_handleNodeChange") != "undefined")
|
||||
eval("TinyMCE_" + plugins[i] + "_handleNodeChange(editorId, elm, undoIndex, undoLevels, tinyMCE.selectedInstance.visualAid, anySelection);");
|
||||
|
|
@ -2073,6 +2169,13 @@ function TinyMCE_openWindow(template, args, skip_lang) {
|
|||
win.document.close();
|
||||
} else
|
||||
var win = window.open(tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file'], "mcePopup", "top=" + y + ",left=" + x + ",scrollbars=" + scrollbars + ",modal=yes,width=" + width + ",height=" + height + ",resizable=" + resizable);
|
||||
|
||||
// Resize the window
|
||||
if (!tinyMCE.isMSIE) {
|
||||
win.innerWidth = width;
|
||||
win.innerHeight = height;
|
||||
} else
|
||||
win.resizeTo(width, height + 20);
|
||||
}
|
||||
|
||||
function TinyMCE_handleVisualAid(element, deep, state) {
|
||||
|
|
@ -2432,10 +2535,12 @@ function TinyMCEControl_execCommand(command, user_interface, value) {
|
|||
} else
|
||||
selectedText = this.contentWindow.getSelection().toString();
|
||||
|
||||
if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))
|
||||
return;
|
||||
if (!tinyMCE.linkElement) {
|
||||
if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))
|
||||
return;
|
||||
}
|
||||
|
||||
var href = "", target = "";
|
||||
var href = "", target = "", title = "";
|
||||
|
||||
if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")
|
||||
tinyMCE.linkElement = tinyMCE.selectedElement;
|
||||
|
|
@ -2443,6 +2548,7 @@ function TinyMCEControl_execCommand(command, user_interface, value) {
|
|||
if (tinyMCE.linkElement) {
|
||||
href= tinyMCE.linkElement.getAttribute('href') ? tinyMCE.linkElement.getAttribute('href') : "";
|
||||
target = tinyMCE.linkElement.getAttribute('target') ? tinyMCE.linkElement.getAttribute('target') : "";
|
||||
title = tinyMCE.linkElement.getAttribute('title') ? tinyMCE.linkElement.getAttribute('title') : "";
|
||||
|
||||
// Fix for drag-drop/copy paste bug in Mozilla
|
||||
mceRealHref = tinyMCE.linkElement.getAttribute('mce_real_href') ? tinyMCE.linkElement.getAttribute('mce_real_href') : "";
|
||||
|
|
@ -2453,11 +2559,11 @@ function TinyMCEControl_execCommand(command, user_interface, value) {
|
|||
}
|
||||
|
||||
if (this.settings['insertlink_callback']) {
|
||||
var returnVal = eval(this.settings['insertlink_callback'] + "(href, target);");
|
||||
var returnVal = eval(this.settings['insertlink_callback'] + "(href, target, title);");
|
||||
if (returnVal && returnVal['href'])
|
||||
tinyMCE.insertLink(returnVal['href'], returnVal['target']);
|
||||
tinyMCE.insertLink(returnVal['href'], returnVal['target'], returnVal['title']);
|
||||
} else {
|
||||
tinyMCE.openWindow(this.insertLinkTemplate, {href : href, target : target});
|
||||
tinyMCE.openWindow(this.insertLinkTemplate, {href : href, target : target, title : title});
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -3086,7 +3192,7 @@ function TinyMCE__selectNode(win, node, expand) {
|
|||
}
|
||||
|
||||
function TinyMCE_getControlHTML(control_name) {
|
||||
var themePlugins = tinyMCE.settings['plugins'].split(',');
|
||||
var themePlugins = tinyMCE.getParam('plugins', '', true, ',');
|
||||
var templateFunction;
|
||||
|
||||
// Is it defined in any plugins
|
||||
|
|
@ -3103,7 +3209,7 @@ function TinyMCE_getControlHTML(control_name) {
|
|||
}
|
||||
|
||||
function TinyMCE__themeExecCommand(editor_id, element, command, user_interface, value) {
|
||||
var themePlugins = tinyMCE.settings['plugins'].split(',');
|
||||
var themePlugins = tinyMCE.getParam('plugins', '', true, ',');
|
||||
var templateFunction;
|
||||
|
||||
// Is it defined in any plugins
|
||||
|
|
@ -3125,7 +3231,7 @@ function TinyMCE__themeExecCommand(editor_id, element, command, user_interface,
|
|||
}
|
||||
|
||||
function TinyMCE__getThemeFunction(suffix) {
|
||||
var themePlugins = tinyMCE.settings['plugins'].split(',');
|
||||
var themePlugins = tinyMCE.getParam('plugins', '', true, ',');
|
||||
var templateFunction;
|
||||
|
||||
// Is it defined in any plugins
|
||||
|
|
|
|||