• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Editor Events

This version was saved 15 years, 5 months ago View current version     Page history
Saved by Brian Kirchoff
on October 11, 2008 at 3:46:39 pm
 

 There are several internal events sent from the nicEdit core that can be used in plugins and on your own javascript when doing advanced integration of the editor into your web sites.

 

blur Sent when an editor instance loses focus
focus

Send when an editor gains focus (IE someone clicks inside it)

key

When the user presses a shortcut key (Such as control-b)

 

To attach functions to internal NicEdit events use the addEvent method on the nicInstance object

 

[some nicedit instance].addEvent([event name], [callback function]);

 

See this example below:

  1. <script>
  2. bkLib.onDomLoaded(function(){
  3.   var myInstance = new nicEditor().panelInstance('myArea2');
  4.   myInstance.addEvent('blur', function() {
  5.     // Your code here that is called whenever the user blurs (stops editing) the nicedit instance
  6.   });
  7. });
  8. </script>

 

Comments (0)

You don't have permission to comment on this page.