YUI2RTE Chopping off end of entry

I am trying to add an simple HTML editor to my web projects. Simple is quite the understatement, but that’s beside the point. I am experiencing the same result in the YUI HTML Editor sample app that comes with Xojo as I am with the control added to my project. Unless I press the space bar or backspace at the end the text entered, the HTML I get back from the ExecuteEvent event handler only contains 99% of what was typed in the editor. In other words, mHTML is missing the last 3-5 characters. However, if I click on the editor and press the space bar or hit the backspace key, I get 100% of the HTML formatted text from the editor.

[code]Function ExecuteEvent(Name as String, Parameters() as Variant) As Boolean
Select Case name
Case “SizeChanged”
RaiseEvent SizeChanged

Case “htmlChanged”
if Parameters.Ubound > -1 then
mHTML = parameters(0)
RaiseEvent HTMLChanged
Catch err As OutOfBoundsException

  End Try
end if

End Select
Return True

End Function

Demo project

My WebApp

My WebApp (after clicking on the editor and pressing the space bar)

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.