Documentation Center

warn

Description

This event fires after Content Editor encountered any warning, but before a message dialog is shown. By default, Content Editor will show a message dialog for all such events. With an event listener for this event, you can prevent the display of warning messages.

It is possible to set up event listeners for listening to error, warn and info events. Returning false in the event listener will prevent the message dialog; the default behavior to show a dialog, will occur when returning any other value.

If you need to catch warnings in the startup of Content Editor , a good place to add the event listener is config.js which is located in the config folder of your Content Editor implementation.

Example

function showWarning (evt) 
{
  return false; 
}
Editor.addEventListener("warn", showWarning)

See also

warn event

Properties

type
String. A string identifying the error level. Can be error, warn, or info.
message
String. A message describing the error, usually what is displayed to the user.