function TinyMCE_default_getEditorTemplate() {
var template = new Array();
template['html'] = '\
\
\
IFRAME\
|
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
|
\
';
template['delta_width'] = 0;
template['delta_height'] = -40;
return template;
}
/**
* Insert link template function.
*/
function TinyMCE_default_getInsertLinkTemplate() {
var template = new Array();
template['file'] = 'link.htm';
template['width'] = 320;
template['height'] = 200;
// Language specific width and height addons
template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);
return template;
}
/**
* Insert image template function.
*/
function TinyMCE_default_getInsertImageTemplate() {
var template = new Array();
template['file'] = 'image.htm';
template['width'] = 360;
template['height'] = 200;
// Language specific width and height addons
template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
return template;
}
function TinyMCE_default_handleNodeChange(editor_id, node) {
// Reset old states
tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal');
tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal');
// Handle align attributes
alignNode = node;
breakOut = false;
do {
if (!alignNode.getAttribute || !alignNode.getAttribute('align'))
continue;
switch (alignNode.getAttribute('align').toLowerCase()) {
case "left":
tinyMCE.switchClassSticky(editor_id + '_left', 'mceButtonSelected');
breakOut = true;
break;
case "right":
tinyMCE.switchClassSticky(editor_id + '_right', 'mceButtonSelected');
breakOut = true;
break;
case "middle":
case "center":
tinyMCE.switchClassSticky(editor_id + '_center', 'mceButtonSelected');
breakOut = true;
break;
case "justify":
tinyMCE.switchClassSticky(editor_id + '_full', 'mceButtonSelected');
breakOut = true;
break;
}
} while (!breakOut && (alignNode = alignNode.parentNode));
// Handle elements
do {
switch (node.nodeName.toLowerCase()) {
case "b":
case "strong":
tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected');
break;
case "i":
case "em":
tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected');
break;
case "u":
tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected');
break;
case "strike":
tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected');
break;
case "ul":
tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected');
break;
case "ol":
tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected');
break;
}
} while ((node = node.parentNode));
}