Namespace | tinymce |
Class | Editor |
Property | Defined By |
---|---|
URI object to current document that holds the TinyMCE editor instance.
|
Editor |
contentCSS : Array
Array with CSS files to load into the iframe.
|
Editor |
contentStyles : Array
Array of CSS styles to add to head of document when the editor loads.
|
Editor |
Control manager instance for the editor.
|
Editor |
URI object to document configured for the TinyMCE instance.
|
Editor |
DOM instance for the editor.
|
Editor |
Formatter instance.
|
Editor |
id : String
Editor instance id, normally the same as the div/textarea that was replaced.
|
Editor |
initialized : Boolean
Is set to true after the editor instance has been initialized
|
Editor |
isNotDirty : Boolean
State to force the editor to return false on a isDirty call.
|
Editor |
HTML parser will be used when contents is inserted into the editor.
|
Editor |
plugins : Object
Name/Value object containting plugin instances.
|
Editor |
Schema instance, enables you to validate elements and it's children.
|
Editor |
Selection instance for the editor.
|
Editor |
DOM serializer for the editor.
|
Editor |
settings : Object
Name/value collection with editor settings.
|
Editor |
Reference to the theme instance that was used to generate the UI.
|
Editor |
Undo manager instance, responsible for handling undo levels.
|
Editor |
Window manager reference, use this to open new windows and dialogs.
|
Editor |
Method | Defined By |
---|---|
Editor(id:String, settings:Object)
Constructs a editor instance by id.
|
Editor |
addButton(name:String, settings:Object):void
Adds a button that later gets created by the ControlManager.
|
Editor |
addCommand(name:String, callback:tinymce.Editor.addCommandCallback, scope:Object):void
Adds a custom command to the editor, you can also override existing commands with this method.
|
Editor |
addQueryStateHandler(name:String, callback:tinymce.Editor.addQueryStateHandlerCallback, scope:Object):void
Adds a custom query state command to the editor, you can also override existing commands with this method.
|
Editor |
addQueryValueHandler(name:String, callback:tinymce.Editor.addQueryValueHandlerCallback, scope:Object):void
Adds a custom query value command to the editor, you can also override existing commands with this method.
|
Editor |
addShortcut(pa:String, desc:String, cmd_func:String/Function, sc:Object):Boolean
Adds a keyboard shortcut for some command or function.
|
Editor |
addVisual(elm:Element):void
Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.
|
Editor |
convertURL(url:string, name:string, elm:string/HTMLElement):string
URL converter function this gets executed each time a user adds an img, a or any other element that has a URL in it.
|
Editor |
destroy(s:Boolean):void
Destroys the editor instance by removing all events, element references or other resources that could leak memory.
|
Editor |
execCallback(n:String):Object
Executes a legacy callback.
|
Editor |
execCommand(cmd:String, ui:Boolean, val:mixed, a:Object):Boolean
Executes a command on the current instance.
|
Editor |
focus(skip_focus:Boolean):void
Focuses/activates the editor.
|
Editor |
getBody():Element
Returns the iframes body element.
|
Editor |
getContainer():Element
Returns the editors container element.
|
Editor |
getContent(args:Object):String
Gets the content from the editor instance, this will cleanup the content before it gets returned using the different cle...
|
Editor |
getContentAreaContainer():Element
Returns the editors content area container element.
|
Editor |
getDoc():Document
Returns the iframes document object.
|
Editor |
getElement():Element
Returns the target element/textarea that got replaced with a TinyMCE editor instance.
|
Editor |
getLang(n:String, dv:String):void
Returns a language pack item by name/key.
|
Editor |
getParam(n:String, dv:String, ty:String):String
Returns a configuration parameter by name.
|
Editor |
getWin():Window
Returns the iframes window object.
|
Editor |
hide():void
Hides the editor and shows any textarea/div that the editor is supposed to replace.
|
Editor |
init():void
Initializes the editor this will be called automatically when all plugins/themes and language packs are loaded by the re...
|
Editor |
initContentBody():void
This method get called by the init method ones the iframe is loaded.
|
Editor |
isDirty():Boolean
Returns true/false if the editor is dirty or not.
|
Editor |
isHidden():Boolean
Returns true/false if the editor is hidden or not.
|
Editor |
load(o:Object):String
Loads contents from the textarea or div element that got converted into an editor instance.
|
Editor |
nodeChanged(o:Object):void
Distpaches out a onNodeChange event to all observers.
|
Editor |
queryCommandState(cmd:string):Boolean
Returns a command specific state, for example if bold is enabled or not.
|
Editor |
queryCommandValue(c:string):Object
Returns a command specific value, for example the current font size.
|
Editor |
remove():void
Removes the editor from the dom and tinymce collection.
|
Editor |
render():void
Renderes the editor/adds it to the page.
|
Editor |
save(o:Object):String
Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.
|
Editor |
setContent(content:String, args:Object):String
Sets the specified content to the editor instance, this will cleanup the content before it gets set using the different ...
|
Editor |
setProgressState(b:Boolean, ti:Number, o:Object):Boolean
Sets the progress state, this will display a throbber/progess for the editor.
|
Editor |
show():void
Shows the editor and hides any textarea/div that the editor is supposed to replace.
|
Editor |
translate(s:String):String
Translates the specified string by replacing variables with language pack items it will also check if there is a key mat...
|
Editor |
public baseURI : URI
public contentCSS : Array
public contentStyles : Array
public controlManager : ControlManager
public documentBaseURI : URI
public id : String
public initialized : Boolean
public isNotDirty : Boolean
public parser : DomParser
public plugins : Object
public schema : Schema
public serializer : Serializer
public settings : Object
public theme : Theme
public undoManager : UndoManager
public windowManager : WindowManager
public
function Editor(id:String, settings:Object)
id:String | Unique id for the editor. |
settings:Object | Optional settings string for the editor. |
public
function addButton(name:String, settings:Object):void
name:String | Button name to add. |
settings:Object | Settings object with title, cmd etc. |
public
function addCommand(name:String, callback:tinymce.Editor.addCommandCallback, scope:Object):void
name:String | Command name to add/override. |
callback:tinymce.Editor.addCommandCallback | Function to execute when the command occurs. |
scope:Object | Optional scope to execute the function in. |
public
function addQueryStateHandler(name:String, callback:tinymce.Editor.addQueryStateHandlerCallback, scope:Object):void
name:String | Command name to add/override. |
callback:tinymce.Editor.addQueryStateHandlerCallback | Function to execute when the command state retrival occurs. |
scope:Object | Optional scope to execute the function in. |
public
function addQueryValueHandler(name:String, callback:tinymce.Editor.addQueryValueHandlerCallback, scope:Object):void
name:String | Command name to add/override. |
callback:tinymce.Editor.addQueryValueHandlerCallback | Function to execute when the command value retrival occurs. |
scope:Object | Optional scope to execute the function in. |
public
function addShortcut(pa:String, desc:String, cmd_func:String/Function, sc:Object):Boolean
pa:String | Shortcut pattern. Like for example: ctrl+alt+o. |
desc:String | Text description for the command. |
cmd_func:String/Function | Command name string or function to execute when the key is pressed. |
sc:Object | Optional scope to execute the function in. |
public
function addVisual(elm:Element):void
elm:Element | Optional root element to loop though to find tables etc that needs the visual aid. |
public
function convertURL(url:string, name:string, elm:string/HTMLElement):string
url:string | URL to convert. |
name:string | Attribute name src, href etc. |
elm:string/HTMLElement | Tag name or HTML DOM element depending on HTML or DOM insert. |
public
function destroy(s:Boolean):void
s:Boolean | Optional state if the destroy is an automatic destroy or user called one. |
public
function execCallback(n:String):Object
n:String | Name of the callback to execute. |
public
function execCommand(cmd:String, ui:Boolean, val:mixed, a:Object):Boolean
cmd:String | Command name to execute, for example mceLink or Bold. |
ui:Boolean | True/false state if a UI (dialog) should be presented or not. |
val:mixed | Optional command value, this can be anything. |
a:Object | Optional arguments object. |
public
function focus(skip_focus:Boolean):void
skip_focus:Boolean | Skip DOM focus. Just set is as the active editor. |
public
function getBody():Element
public
function getContainer():Element
public
function getContent(args:Object):String
args:Object | Optional content object, this gets passed around through the whole get process. |
public
function getContentAreaContainer():Element
public
function getDoc():Document
public
function getElement():Element
public
function getLang(n:String, dv:String):void
n:String | Name/key to get from the language pack. |
dv:String | Optional default value to retrive. |
public
function getParam(n:String, dv:String, ty:String):String
n:String | Configruation parameter to retrive. |
dv:String | Optional default value to return. |
ty:String | Optional type parameter. |
public
function getWin():Window
public
function hide():void
public
function init():void
public
function initContentBody():void
public
function isDirty():Boolean
public
function isHidden():Boolean
public
function load(o:Object):String
o:Object | Optional content object, this gets passed around through the whole load process. |
public
function nodeChanged(o:Object):void
o:Object | Optional object to pass along for the node changed event. |
public
function queryCommandState(cmd:string):Boolean
cmd:string | Command to query state from. |
public
function queryCommandValue(c:string):Object
c:string | Command to query value from. |
public
function remove():void
public
function render():void
public
function save(o:Object):String
o:Object | Optional content object, this gets passed around through the whole save process. |
public
function setContent(content:String, args:Object):String
content:String | Content to set to editor, normally HTML contents but can be other formats as well. |
args:Object | Optional content object, this gets passed around through the whole set process. |
public
function setProgressState(b:Boolean, ti:Number, o:Object):Boolean
b:Boolean | Boolean state if the progress should be shown or hidden. |
ti:Number | Optional time to wait before the progress gets shown. |
o:Object | Optional object to pass to the progress observers. |
public
function show():void
public
function translate(s:String):String
s:String | String to translate by the language pack data. |