This plugin provides a Find/Replace capability for the editor. Note that this plugin is NOT supported on Opera currently, as opera does not implement a window.find or equiv function.
Parameter | Type | Description |
---|---|---|
args | Object |
Optional Initial settings for any of the attributes. |
See the dojox/editor/plugins/FindReplace reference documentation for more information.
The toolbar that contain all the entries and buttons
The prompt message box that shows the user some messages such as the end of a search, the end of a replacement, etc.
The ReplaceAll button of the F/R toolbar
Define the class of button the editor uses.
String like "insertUnorderedList", "outdent", "justifyCenter", etc. that represents an editor command.
Passed to editor.execCommand() if useDefaultCommand
is true.
Flag to indicate if this plugin has been disabled and should do nothing helps control button state, among other things. Set via the setter api.
The CSS class name for the button node is formed from iconClassPrefix
and command
If true, this plugin executes by calling Editor.execCommand() with the argument specified in command
.
Ensure that all the buttons are in a correct status when certain events are fired.
Helper function to convert a simple pattern to a regular expression for matching.
Returns a regular expression object that conforms to the defined conversion rules. For example:
and so on.
Parameter | Type | Description |
---|---|---|
pattern | string | A simple matching pattern to convert that follows basic rules:
|
ignoreCase | Boolean | An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing By default, it is assumed case sensitive. |
This function invokes a find on the editor document with the noted options for find.
Parameter | Type | Description |
---|---|---|
showMessage | Boolean |
Optional Indicated whether the tooltip is shown or not when the search reaches the end |
Boolean indicating if the content was found or not.
This function invokes a find with specific options
Parameter | Type | Description |
---|---|---|
txt | String | The text to locate in the document. |
caseSensitive | Boolean | Whether or ot to search case-sensitively. |
backwards | Boolean | Whether or not to search backwards in the document. |
Boolean indicating if the content was found or not.
Helper function for get() and set(). Caches attribute name values so we don't do the string ops every time.
Parameter | Type | Description |
---|---|---|
name | undefined |
Over-ride for creation of the resize button.
Populate the Find field with selected text when dialog initially displayed. Auto-select text in Find field after it is populated. If nothing selected, restore previous entry from the same session.
This function invokes a replace on the editor document with the noted options for replace
Parameter | Type | Description |
---|---|---|
showMessage | Boolean |
Optional Indicate if the prompt message is shown or not when the replacement reaches the end |
Boolean indicating if the content was replaced or not.
This function replaces all the matched content on the editor document with the noted options for replace
Parameter | Type | Description |
---|---|---|
showMessage | Boolean |
Optional Indicate if the prompt message is shown or not when the action is done. |
Helper function to set new value for specified attribute
Parameter | Type | Description |
---|---|---|
name | String | |
value | anything |
Function to set the plugin state and call updateState to make sure the button is updated appropriately.
Parameter | Type | Description |
---|---|---|
disabled | undefined |
Function to toggle whether or not find/replace is displayed.
Parameter | Type | Description |
---|---|---|
show | Boolean | Indicate if the toolbar is shown or not |
ignoreState | Boolean |
Optional Indicate if the status should be ignored or not |
buttonDisabled | Boolean |
Optional
|
Deprecated. Use this.own() with dojo/on or dojo/aspect.instead.
Make a connect.connect() that is automatically disconnected when this plugin is destroyed.
Similar to dijit/_Widget.connect()
.
Parameter | Type | Description |
---|---|---|
o | undefined | |
f | undefined | |
tf | undefined |
Get a property from a plugin.
Get a named property from a plugin. The property may potentially be retrieved via a getter method. If no getter is defined, this just retrieves the object's property. For example, if the plugin has a properties "foo" and "bar" and a method named "_getFooAttr", calling:
plugin.get("foo");
would be equivalent to writing:
plugin._getFooAttr();
and:
plugin.get("bar");
would be equivalent to writing:
plugin.bar;
Parameter | Type | Description |
---|---|---|
name | undefined | The property to get. |
Returns the label to use for the button
Parameter | Type | Description |
---|---|---|
key | String |
Track specified handles and remove/destroy them when this instance is destroyed, unless they were already removed/destroyed manually.
The array of specified handles, so you can do for example:
var handle = this.own(on(...))[0];
Set a property on a plugin
Sets named properties on a plugin which may potentially be handled by a setter in the plugin. For example, if the plugin has a properties "foo" and "bar" and a method named "_setFooAttr", calling:
plugin.set("foo", "Howdy!");
would be equivalent to writing:
plugin._setFooAttr("Howdy!");
and:
plugin.set("bar", 3);
would be equivalent to writing:
plugin.bar = 3;
set() may also be called with a hash of name/value pairs, ex:
plugin.set({ foo: "Howdy", bar: 3 })
This is equivalent to calling set(foo, "Howdy") and set(bar, 3)
Parameter | Type | Description |
---|---|---|
name | attribute | The property to set. |
value | anything | The value to set in the property. |
Set a property on a plugin
This is a callback handler that set a reference to the editor this plugin hosts in
Parameter | Type | Description |
---|---|---|
editor | undefined |
Over-ride so that find/replace toolbar is appended after the current toolbar.
Parameter | Type | Description |
---|---|---|
toolbar | dijit.Toolbar | The current toolbar of the editor |
Function to allow programmatic toggling of the find toolbar.
Over-ride for button state control for disabled to work.
Parameter | Type | Description |
---|---|---|
evt | undefined |
Parameter | Type | Description |
---|---|---|
evt | undefined |