|
|
|
|
HTMLEditorExecuteJS (Function) In french: EditeurHTMLExécuteJS Executes JavaScript code in an HTML Editor control.
// Get the number of images in the document being edited HTMLEditorExecuteJS(HTMEDT_MyHTMLEditor, "document.body.images.length", ... HTMLEditorExecuteJS_Callback) INTERNAL PROCEDURE HTMLEditorExecuteJS_Callback(OK is boolean, TheResult is string) dbgAssert(OK) Info("There are " + TheResult + " images in the document.") END
Syntax
HTMLEditorExecuteJS(<HTML Editor control> , <JavaScript code> [, <WLanguage procedure>])
<HTML Editor control>: Control name Name of the HTML Editor control used. <JavaScript code>: Character string JavaScript code to execute. <WLanguage procedure>: Optional procedure name WLanguage procedure ("callback") used to find out the result of code execution. This procedure has the following format:
PROCEDURE <Procedure name>(bSuccess is boolean, ReturnValue is string)
This procedure is called once the JavaScript code has been executed. The parameters of this procedure are: - <bSuccess>:
- True if the JavaScript code was successfully executed,
- False if the execution of JavaScript code generated an error (e.g., error in the JavaScript code). In that case, to get more details on the error, use ErrorInfo.
Remark: A generic error is returned.
- <ReturnValue> contains the value of the last expression of the JavaScript code (returned value).
Remarks The JavaScript code is executed in the context of the document being edited: "document" represents the edited document.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|