Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
desktop:htmleditor [2019/10/28 11:06]
agcyphers [Notes]
desktop:htmleditor [2020/04/16 11:08] (current)
agcyphers [Events]
Line 62: Line 62:
 ^ Definition      ^ Description       ^ ^ Definition      ^ Description       ^
 | ContextClick( X as Integer, Y as Integer ) | Raised when the user right-clicks the editor area. | | ContextClick( X as Integer, Y as Integer ) | Raised when the user right-clicks the editor area. |
-| EditorDefaults( byRef DefaultFontFace as String, byRef DefaultFontSize as Integer, byRef allowNesting as Boolean ) | Raised during initialization to set font defaults for the editor. ''allowNesting'' controls whether lists can be nested. |+| EditorDefaults( byRef DefaultFontFace as String, _ \\ byRef DefaultFontSize as Integer, _ \\ byRef allowNesting as Boolean ) | Raised during initialization to set font defaults for the editor. ''allowNesting'' controls whether lists can be nested. | 
 +| KeyPress( keyChar as String, _ \\  AltKey as Boolean, _ \\ CtrlKey as Boolean, _ \\ MetaKey as Boolean, _ \\ ShiftKey as Boolean) | Raised when the user presses a key or key combination. | 
 +| LinkPreview( URL as String ) as Boolean | Fired when the user clicks the "Preview" link when selecting a link in the text. Return True to indicate that the event has been handled. |
 | MenuClear() as Boolean | This event is fired when the user has selected Clear from the edit menu.  Return True to override default. | | MenuClear() as Boolean | This event is fired when the user has selected Clear from the edit menu.  Return True to override default. |
 | MenuCopy() as Boolean | Fired when user selects Copy from the edit menu.  Return True to override default. | | MenuCopy() as Boolean | Fired when user selects Copy from the edit menu.  Return True to override default. |
Line 69: Line 71:
 | MenuRedo() as Boolean | Fired when user selects Redo from the edit menu.  Return True to override default. | | MenuRedo() as Boolean | Fired when user selects Redo from the edit menu.  Return True to override default. |
 | MenuSelectAll() as Boolean | Fired when user selects Select All from the edit menu.  Return True to override default. | | MenuSelectAll() as Boolean | Fired when user selects Select All from the edit menu.  Return True to override default. |
-| MenuUndo() as Boolean | Fired when user selects Unde from the edit menu.  Return True to override default. |+| MenuUndo() as Boolean | Fired when user selects Undo from the edit menu.  Return True to override default. | 
 +| MouseWheel( X as Integer, _ \\ Y as Integer, _ \\ deltaX as Integer, _ \\ deltaY as Integer ) | Raised when the user attempts to scroll the component's display area using the mouse wheel. |
 | SelChange() | Fired when the user changes the current selection in the editor. | | SelChange() | Fired when the user changes the current selection in the editor. |
 | TextChanged | This event triggers when the text changes. | | TextChanged | This event triggers when the text changes. |
Line 79: Line 82:
 | Toolbar_LinkClick() | Fired when the user clicks the Insert Link button on the toolbar. | | Toolbar_LinkClick() | Fired when the user clicks the Insert Link button on the toolbar. |
 | Toolbar_VideoClick() | Fired when the user clicks the Insert Video button on the toolbar. | | Toolbar_VideoClick() | Fired when the user clicks the Insert Video button on the toolbar. |
 +| UIReady() | Raised when loading has completed. |
 | UserDroppedImage(url as String) as Boolean | This event triggers if a user drops an image onto HTML Edit. Useful to override the default insert behavior. The dropped file is passed as a URL, not a FolderItem. Return True to handle the event yourself, or false to allow the automatic insert. | | UserDroppedImage(url as String) as Boolean | This event triggers if a user drops an image onto HTML Edit. Useful to override the default insert behavior. The dropped file is passed as a URL, not a FolderItem. Return True to handle the event yourself, or false to allow the automatic insert. |
  
Line 132: Line 136:
 ==== Properties ==== ==== Properties ====
 ^ Name      ^ Type       ^ Default Value       ^ Description       ^ ^ Name      ^ Type       ^ Default Value       ^ Description       ^
 +| AutoHeight | Boolean | False | When True, the component will automatically alter its height to fit the contents. |
 | CanRedo ''Read-Only'' | Boolean | False | Whether Redo is currently available. | | CanRedo ''Read-Only'' | Boolean | False | Whether Redo is currently available. |
 | CanUndo ''Read-Only'' | Boolean | False | Whether Undo is currently available. | | CanUndo ''Read-Only'' | Boolean | False | Whether Undo is currently available. |
Line 139: Line 144:
 | EnforceHTTPS | Boolean | True | When True, URls will be automatically converted to HTTPS. | | EnforceHTTPS | Boolean | True | When True, URls will be automatically converted to HTTPS. |
 | HTML | String | "" | Get and set the HTML contents. | | HTML | String | "" | Get and set the HTML contents. |
 +| IsDirty | Boolean | False | When True, the component is still waiting for a data update and the Xojo property values may not match the actual values. |
 | Length | Integer | 0 | The number of characters in the editor. | | Length | Integer | 0 | The number of characters in the editor. |
 +| MaximumHeight | Integer | 1000 | Maximum height to allow when AutoHeight = True. |
 +| MinimumHeight | Integer | 100 | Minimum height to allow when AutoHeight = True. |
 | PlainText | String | "" | The current content of the editor with all HTML removed. | | PlainText | String | "" | The current content of the editor with all HTML removed. |
 | SelAlign | Integer | AlignLeft | Current alignment of text within the editor. | | SelAlign | Integer | AlignLeft | Current alignment of text within the editor. |