init import from old mailr project (http://svn.littlegreen.org/mailr/trunk)
This commit is contained in:
commit
51b79e7298
640 changed files with 34651 additions and 0 deletions
2
public/tiny_mce/plugins/preview/editor_plugin.js
vendored
Normal file
2
public/tiny_mce/plugins/preview/editor_plugin.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('preview','cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br');function TinyMCE_preview_getControlHTML(control_name){switch(control_name){case "preview":return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_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}\',\'mcePreview\');" />';}return "";}function TinyMCE_preview_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mcePreview":var previewPage=tinyMCE.getParam("plugin_preview_pageurl",null);var previewWidth=tinyMCE.getParam("plugin_preview_width","550");var previewHeight=tinyMCE.getParam("plugin_preview_height","600");if(previewPage){var template=new Array();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=no,toolbar=no,scrollbars=yes,resizable=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;}return false;}
|
61
public/tiny_mce/plugins/preview/editor_plugin_src.js
vendored
Normal file
61
public/tiny_mce/plugins/preview/editor_plugin_src.js
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* Import plugin specific language pack */
|
||||
tinyMCE.importPluginLanguagePack('preview', 'cs,de,el,en,fr_ca,it,ko,pt,sv,zh_cn,fa,fr,pl,pt_br');
|
||||
|
||||
/**
|
||||
* Returns the HTML contents of the preview control.
|
||||
*/
|
||||
function TinyMCE_preview_getControlHTML(control_name) {
|
||||
switch (control_name) {
|
||||
case "preview":
|
||||
return '<img id="{$editor_id}_preview" src="{$pluginurl}/images/preview.gif" title="{$lang_preview_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}\',\'mcePreview\');" />';
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the mcePreview command.
|
||||
*/
|
||||
function TinyMCE_preview_execCommand(editor_id, element, command, user_interface, value) {
|
||||
// Handle commands
|
||||
switch (command) {
|
||||
case "mcePreview":
|
||||
var previewPage = tinyMCE.getParam("plugin_preview_pageurl", null);
|
||||
var previewWidth = tinyMCE.getParam("plugin_preview_width", "550");
|
||||
var previewHeight = tinyMCE.getParam("plugin_preview_height", "600");
|
||||
|
||||
// Use a custom preview page
|
||||
if (previewPage) {
|
||||
var template = new Array();
|
||||
|
||||
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=no,toolbar=no,scrollbars=yes,resizable=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;
|
||||
}
|
||||
|
||||
// Pass to next handler in chain
|
||||
return false;
|
||||
}
|
14
public/tiny_mce/plugins/preview/example.html
vendored
Normal file
14
public/tiny_mce/plugins/preview/example.html
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
|
||||
<html>
|
||||
<head>
|
||||
<script language="javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<title>Example of a custom preview page</title>
|
||||
<link href="{$content_css}" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Editor contents: <br />
|
||||
{$content}
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
public/tiny_mce/plugins/preview/images/preview.gif
vendored
Normal file
BIN
public/tiny_mce/plugins/preview/images/preview.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
3
public/tiny_mce/plugins/preview/langs/cs.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/cs.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Náhled';
|
3
public/tiny_mce/plugins/preview/langs/de.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/de.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// DE lang variables by Tobias Heer
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Vorschau';
|
3
public/tiny_mce/plugins/preview/langs/el.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/el.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// Greek lang variables by Jacaranda Bill
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Ðñïåðéóêüðçóç éóôïóåëßäáò';
|
3
public/tiny_mce/plugins/preview/langs/en.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/en.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Preview';
|
8
public/tiny_mce/plugins/preview/langs/fa.js
vendored
Normal file
8
public/tiny_mce/plugins/preview/langs/fa.js
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
// IR lang variables
|
||||
// Persian (Farsi) language pack (for IRAN)
|
||||
// By: Morteza Zafari
|
||||
// Lost@LostLord.com
|
||||
// http://www.LostLord.com
|
||||
|
||||
tinyMCELang['lang_dir'] = 'rtl';
|
||||
tinyMCELang['lang_preview_desc'] = 'پیش نمایش';
|
3
public/tiny_mce/plugins/preview/langs/fr.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/fr.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// French lang variables by Laurent Dran
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Prévisualisation';
|
3
public/tiny_mce/plugins/preview/langs/fr_ca.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/fr_ca.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// CAN_FR lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Prévisualisation';
|
3
public/tiny_mce/plugins/preview/langs/it.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/it.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// IT lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Anteprima';
|
3
public/tiny_mce/plugins/preview/langs/ko.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/ko.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// KO lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = '미리보기';
|
4
public/tiny_mce/plugins/preview/langs/pl.js
vendored
Normal file
4
public/tiny_mce/plugins/preview/langs/pl.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
// PL lang variables
|
||||
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Podgląd';
|
3
public/tiny_mce/plugins/preview/langs/pt.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/pt.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Pré-visualização';
|
3
public/tiny_mce/plugins/preview/langs/pt_br.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/pt_br.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// pt_BR lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Visualizar';
|
3
public/tiny_mce/plugins/preview/langs/sv.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/sv.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// SE lang variables
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Förhandsgranska';
|
3
public/tiny_mce/plugins/preview/langs/zh_cn.js
vendored
Normal file
3
public/tiny_mce/plugins/preview/langs/zh_cn.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
// Simplified Chinese lang variables contributed by cube316 (cube316@etang.com)
|
||||
|
||||
tinyMCELang['lang_preview_desc'] = 'Ô¤ÀÀ';
|
23
public/tiny_mce/plugins/preview/readme.txt
vendored
Normal file
23
public/tiny_mce/plugins/preview/readme.txt
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
Preview plugin for TinyMCE
|
||||
-----------------------------------
|
||||
|
||||
Installation instructions:
|
||||
* Copy the preview directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
|
||||
* Add plugin to TinyMCE plugin option list example: plugins : "preview".
|
||||
* Add the preview button name to button list, example: theme_advanced_buttons3_add : "preview".
|
||||
|
||||
Initialization example:
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "textareas",
|
||||
plugins : "preview",
|
||||
theme_advanced_buttons3_add : "preview",
|
||||
plugin_preview_width : "500",
|
||||
plugin_preview_height : "600"
|
||||
});
|
||||
|
||||
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.
|
Loading…
Add table
Add a link
Reference in a new issue