📄 overview-summary-tinymce_control.class.js.html
字号:
<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>
Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
parent.document.title="TinyMCE_Control.class.js Overview";
}
</script>
</head>
<body bgcolor="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
<tr align="center" valign="top">
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1Rev"> <font class="NavBarFont1Rev"><b>File</b></font> </td>
<td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a> </td>
<td bgcolor="#EEEEFF" class="NavBarCell1"> <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a> </td>
</tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>
<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
PREV
NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
<a href="index.html" target="_top"><b>FRAMES</b></a>
<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
<script>
<!--
if(window==top) {
document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->
<hr>
<center>
<h2>TinyMCE_Control.class.js</h2>
</center>
<h4>Summary</h4>
<p>
No overview generated for 'TinyMCE_Control.class.js'<BR/><BR/>
</p>
<hr>
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="#CCCCFF" class="TableHeadingColor">
<td colspan=2><font size="+2">
<b>Class Summary</b>
</font></td>
</tr>
<tr bgcolor="white" class="TableRowColor">
<td width="15%"><b><a href="TinyMCE_Control.html">TinyMCE_Control</a></b></td>
<td> </td>
</tr>
</table>
<hr/>
<!-- ========== METHOD SUMMARY =========== -->
<!-- ========== END METHOD SUMMARY =========== -->
<pre class="sourceview"><span class="comment">/**
* $RCSfile: overview-summary-TinyMCE_Control.class.js.html,v $
* $Revision: 1.13 $
* $Date: 2006/02/13 15:28:43 $
*
* <span class="attrib">@author</span> Moxiecode
* <span class="attrib">@copyright</span> Copyright ?2004-2006, Moxiecode Systems AB, All rights reserved.
*/</span>
<span class="comment">/**
* This is the TinyMCE editor control instance class. A instance of this class will is made for each
* converted text area.
*
* <span class="attrib">@constructor</span>
* <span class="attrib">@param</span> {Array} settings Name/Value array of instance specific configuration settings.
*/</span>
<span class="reserved">function</span> TinyMCE_Control(settings) {
var t, i, to, fu, p, x, fn, fu, pn, s = settings;
<span class="reserved">this</span>.undoRedoLevel = true;
<span class="reserved">this</span>.isTinyMCE_Control = true;
<span class="comment">// Default settings</span>
<span class="reserved">this</span>.settings = s;
<span class="reserved">this</span>.settings[<span class="literal">'theme'</span>] = tinyMCE.getParam(<span class="literal">"theme"</span>, <span class="literal">"default"</span>);
<span class="reserved">this</span>.settings[<span class="literal">'width'</span>] = tinyMCE.getParam(<span class="literal">"width"</span>, -1);
<span class="reserved">this</span>.settings[<span class="literal">'height'</span>] = tinyMCE.getParam(<span class="literal">"height"</span>, -1);
<span class="reserved">this</span>.selection = new TinyMCE_Selection(<span class="reserved">this</span>);
<span class="reserved">this</span>.undoRedo = new TinyMCE_UndoRedo(<span class="reserved">this</span>);
<span class="reserved">this</span>.cleanup = new TinyMCE_Cleanup();
<span class="reserved">this</span>.shortcuts = new Array();
<span class="reserved">this</span>.hasMouseMoved = false;
<span class="reserved">this</span>.cleanup.init({
valid_elements : s.valid_elements,
extended_valid_elements : s.extended_valid_elements,
entities : s.entities,
entity_encoding : s.entity_encoding,
debug : s.cleanup_debug,
url_converter : <span class="literal">'TinyMCE_Cleanup.prototype._urlConverter'</span>,
indent : s.apply_source_formatting,
invalid_elements : s.invalid_elements,
verify_html : s.verify_html
});
<span class="comment">// Wrap old theme</span>
t = <span class="reserved">this</span>.settings[<span class="literal">'theme'</span>];
<span class="reserved">if</span> (!tinyMCE.hasTheme(t)) {
fn = tinyMCE.callbacks;
to = {};
<span class="reserved">for</span> (i=0; i<fn.length; i++) {
<span class="reserved">if</span> ((fu = window[<span class="literal">'TinyMCE_'</span> + t + <span class="literal">"_"</span> + fn[i]]))
to[fn[i]] = fu;
}
tinyMCE.addTheme(t, to);
}
<span class="comment">// Wrap old plugins</span>
<span class="reserved">this</span>.plugins = new Array();
p = tinyMCE.getParam(<span class="literal">'plugins'</span>, <span class="literal">''</span>, true, <span class="literal">','</span>);
<span class="reserved">if</span> (p.length > 0) {
<span class="reserved">for</span> (i=0; i<p.length; i++) {
pn = p[i];
<span class="reserved">if</span> (pn.charAt(0) == <span class="literal">'-'</span>)
pn = pn.substring(1);
<span class="reserved">if</span> (!tinyMCE.hasPlugin(pn)) {
fn = tinyMCE.callbacks;
to = {};
<span class="reserved">for</span> (x=0; x<fn.length; x++) {
<span class="reserved">if</span> ((fu = window[<span class="literal">'TinyMCE_'</span> + pn + <span class="literal">"_"</span> + fn[x]]))
to[fn[x]] = fu;
}
tinyMCE.addPlugin(pn, to);
}
<span class="reserved">this</span>.plugins[<span class="reserved">this</span>.plugins.length] = pn;
}
}
};
TinyMCE_Control.<span class="reserved">prototype</span> = {
<span class="comment">/**
* Returns true/false if the instance has the current plugin available.
*
* <span class="attrib">@param</span> {string} n Plugin name to check for.
* <span class="attrib">@return</span> true/false if the instance has the current plugin available.
* <span class="attrib">@type</span> boolean
*/</span>
hasPlugin : <span class="reserved">function</span>(n) {
var i;
<span class="reserved">for</span> (i=0; i<<span class="reserved">this</span>.plugins.length; i++) {
<span class="reserved">if</span> (<span class="reserved">this</span>.plugins[i] == n)
<span class="reserved">return</span> true;
}
<span class="reserved">return</span> false;
},
<span class="comment">/**
* Adds a plugin to the editor instance. This will also add it globaly.
*
* <span class="attrib">@param</span> {string} n Plugin name to check for.
* <span class="attrib">@param</span> {TinyMCE_Plugin} n TinyMCE plugin instance.
*/</span>
addPlugin : <span class="reserved">function</span>(n, p) {
<span class="reserved">if</span> (!<span class="reserved">this</span>.hasPlugin(n)) {
tinyMCE.addPlugin(n, p);
<span class="reserved">this</span>.plugins[<span class="reserved">this</span>.plugins.length] = n;
}
},
<span class="comment">/**
* Repaints the editarea in Gecko browsers. This method removes ghost resize handlers
* and other trailing graphics.
*/</span>
repaint : <span class="reserved">function</span>() {
<span class="reserved">if</span> (tinyMCE.isMSIE && !tinyMCE.isOpera)
<span class="reserved">return</span>;
try {
var s = <span class="reserved">this</span>.selection;
var b = s.getBookmark(true);
<span class="reserved">this</span>.getBody().style.display = <span class="literal">'none'</span>;
<span class="reserved">this</span>.getDoc().execCommand(<span class="literal">'selectall'</span>, false, null);
<span class="reserved">this</span>.getSel().collapseToStart();
<span class="reserved">this</span>.getBody().style.display = <span class="literal">'block'</span>;
s.moveToBookmark(b);
} catch (ex) {
<span class="comment">// Ignore</span>
}
},
<span class="comment">/**
* Switches the global TinyMCE settings to the current instance settings. This method is
* used to handle multiple configurations.
*/</span>
switchSettings : <span class="reserved">function</span>() {
<span class="reserved">if</span> (tinyMCE.configs.length > 1 && tinyMCE.currentConfig != <span class="reserved">this</span>.settings[<span class="literal">'index'</span>]) {
tinyMCE.settings = <span class="reserved">this</span>.settings;
tinyMCE.currentConfig = <span class="reserved">this</span>.settings[<span class="literal">'index'</span>];
}
},
<span class="comment">/**
* Returns the body element of a editor instance.
*
* <span class="attrib">@return</span> Body element of a editor instance.
* <span class="attrib">@type</span> HTMLElement
*/</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -