Can't get lazy events from TinyEditor or TinyMCE

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

I need to create an autosave type of functionality while the user is editing rich text. In the normal textbox – I can get the lazy events I need to do this, such as the KeyUp event (as TextChanged only fires when focus leaves the control).

However – for the TinyEditor and also the TinyMCE controls – I cannot get these events.  I understand they are “lazy” events and you have to explicitly attach the events. But still they do not work.

I thought I would work around this challenge and check every few seconds manually (using a timer) and see if the text has changed, and then if so do my autosave logic.

But that doesn’t work either – even though the user has typed more text in the control – the .Text property does NOT reflect the user’s changes until you lose focus on the control. This also is a problem for both TinyEditor and TinyMCEControls.

Are there any work arounds?  Is there a .Eval() way to get the text to update so that the .text property reflects whats in the control without having to lose focus?

Attached is a project showing this behavior.

Thanks very much in advance for your help.

 

 

Attachment
  • You must to post comments
0
0

Hi Luca – anyway to use javascript to get at the real text, or to have the text property updated to have the real content?

  • You must to post comments
0
0

Thanks Luca.

In the meantime – is there any javascript i can call via .Eval() that would cause the TinyEditor.Text property to be updated?

  • You must to post comments
0
0

HTML editor are created in an iframe and events from iframes don’t bubble up. You’d have to modify the extension and subscribe to the events made available by the editors. I’ll log an enhancement here:

https://github.com/iceteagroup/wisej-extensions

You can click Watch in github to receive automatic notifications when something changes and you can log issues, fork the code, etc:

https://wisej.com/github/

Also, look at this blog entry in case it helps:

https://wisej.com/blog/editors-choice/

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.