Opened 13 years ago

Closed 13 years ago

#1138 closed enhancement (fixed)

added API functions Xinha.getEditor(), Xinha.prototype.getPluginInstance(), Xinha.addOnloadHandler()

Reported by: ray Owned by: gogo
Priority: Milestone: 0.95
Component: Xinha Core Version:
Severity: normal Keywords:



Returns a editor object referenced by the id or name of the textarea or the textarea node itself
For example to retrieve the HTML of an editor made out of the textarea with the id "myTextArea" you would do<br />

 var editor = Xinha.getEditor("myTextArea");
 var html = editor.getEditorContent(); 


Sometimes one wants to call a plugin method directly, e.g. from outside the editor.
This function returns the respective editor's instance of a plugin.
For example you might want to have a button to trigger SaveSubmit?'s save() method:

 <button type="button" onclick="Xinha.getEditor('myTextArea').getPluginInstance('SaveSubmit').save();return false;">Save</button>


Adds a function that is executed in the moment the DOM is ready, but as opposed to window.onload before images etc. have been loaded

Change History (1)

comment:1 Changed 13 years ago by ray

  • Resolution set to fixed
  • Status changed from new to closed

rev [943]

Note: See TracTickets for help on using tickets.