This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/includes/tinymce/jscripts/tiny_mce/tiny_mce.js

9 lines
97 KiB
JavaScript
Raw Normal View History

/**
* $RCSfile: tiny_mce.js,v $
* $Revision: 1.1 $
* $Date: 2005/03/06 06:22:26 $
*
* @author Moxiecode
* @copyright Copyright <EFBFBD> 2004, Moxiecode Systems AB, All rights reserved.
*/
function TinyMCE(){this.instances=new Array();this.stickyClassesLookup=new Array();this.windowArgs=new Array();this.isMSIE=(navigator.appName=="Microsoft Internet Explorer");this.isMSIE5=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5')!=-1);this.isMSIE5_0=this.isMSIE&&(navigator.userAgent.indexOf('MSIE 5.0')!=-1);this.isGecko=navigator.userAgent.indexOf('Gecko')!=-1;this.idCounter=0;this.init=TinyMCE_init;this.addMCEControl=TinyMCE_addMCEControl;this.triggerSave=TinyMCE_triggerSave;this._convertOnClick=TinyMCE__convertOnClick;this.resetForm=TinyMCE_resetForm;this.execCommand=TinyMCE_execCommand;this.execInstanceCommand=TinyMCE_execInstanceCommand;this._createIFrame=TinyMCE__createIFrame;this.handleEvent=TinyMCE_handleEvent;this.setupContent=TinyMCE_setupContent;this.switchClass=TinyMCE_switchClass;this.restoreAndSwitchClass=TinyMCE_restoreAndSwitchClass;this.switchClassSticky=TinyMCE_switchClassSticky;this.restoreClass=TinyMCE_restoreClass;this.setClassLock=TinyMCE_setClassLock;this.addEvent=TinyMCE_addEvent;this.onLoad=TinyMCE_onLoad;this.removeMCEControl=TinyMCE_removeMCEControl;this._initCleanup=TinyMCE__initCleanup;this._cleanupHTML=TinyMCE__cleanupHTML;this._cleanupAttribute=TinyMCE__cleanupAttribute;this._fixInlineStyles=TinyMCE__fixInlineStyles;this._cleanupElementName=TinyMCE__cleanupElementName;this._verifyClass=TinyMCE__verifyClass;this.cleanupNode=TinyMCE_cleanupNode;this.convertStringToXML=TinyMCE_convertStringToXML;this.insertLink=TinyMCE_insertLink;this.insertImage=TinyMCE_insertImage;this.getElementByAttributeValue=TinyMCE_getElementByAttributeValue;this.getElementsByAttributeValue=TinyMCE_getElementsByAttributeValue;this.isBlockElement=TinyMCE_isBlockElement;this.getParentBlockElement=TinyMCE_getParentBlockElement;this.getNodeTree=TinyMCE_getNodeTree;this.getParentElement=TinyMCE_getParentElement;this.getParam=TinyMCE_getParam;this.getLang=TinyMCE_getLang;this.replaceVar=TinyMCE_replaceVar;this.replaceVars=TinyMCE_replaceVars;this.triggerNodeChange=TinyMCE_triggerNodeChange;this.parseURL=TinyMCE_parseURL;this.convertAbsoluteURLToRelativeURL=TinyMCE_convertAbsoluteURLToRelativeURL;this.convertRelativeToAbsoluteURL=TinyMCE_convertRelativeToAbsoluteURL;this.updateContent=TinyMCE_updateContent;this._customCleanup=TinyMCE__customCleanup;this.getContent=TinyMCE_getContent;this.setContent=TinyMCE_setContent;this.importThemeLanguagePack=TinyMCE_importThemeLanguagePack;this.importPluginLanguagePack=TinyMCE_importPluginLanguagePack;this.applyTemplate=TinyMCE_applyTemplate;this.openWindow=TinyMCE_openWindow;this.handleVisualAid=TinyMCE_handleVisualAid;this.setAttrib=TinyMCE_setAttrib;this.getAttrib=TinyMCE_getAttrib;this._getThemeFunction=TinyMCE__getThemeFunction;this._themeExecCommand=TinyMCE__themeExecCommand;this.getControlHTML=TinyMCE_getControlHTML;this._setHTML=TinyMCE__setHTML;this._getElementById=TinyMCE__getElementById;this.getInstanceById=TinyMCE_getInstanceById;this.getEditorId=TinyMCE_getEditorId;this.queryInstanceCommandValue=TinyMCE_queryInstanceCommandValue;this.queryInstanceCommandState=TinyMCE_queryInstanceCommandState;this.getWindowArg=TinyMCE_getWindowArg;this.setWindowArg=TinyMCE_setWindowArg;this.getCSSClasses=TinyMCE_getCSSClasses;this.regexpReplace=TinyMCE_regexpReplace;this.cleanupEventStr=TinyMCE_cleanupEventStr;this.getAbsPosition=TinyMCE_getAbsPosition;this.openFileBrowser=TinyMCE_openFileBrowser;}function TinyMCE_init(settings){var theme,srcMode;this.settings=settings;function defParam(key,def_val){settings[key]=tinyMCE.getParam(key,def_val);}if(typeof(document.execCommand)=='undefined')return;if(!tinyMCE.baseURL){var elements=document.getElementsByTagName('script');for(var i=0;i<elements.length;i++){if(elements[i].src&&(elements[i].src.indexOf("tiny_mce.js")!=-1||elements[i].src.indexOf("tiny_mce_src.js")!=-1)){var src=elements[i].src;srcMode=(src.indexOf('_src')!=-1)?'_src':'';src=src.substring(0,src.lastIndexOf('/'));tinyMCE.baseURL=src;break;}}}this.documentBasePath=document.location.href;if(this.documentBasePath.indexOf('?')!=-1)this.documentBasePath=this.documentBasePath.subst