Closed eliasjames closed 9 years ago
In your use-case, the blur event are not intended, although it actually properly fired since the editor is really leaving focus state.
I think you can use some initialization flag combined with some recursion callback to toggle the editor back to html vice-versa. http://jsfiddle.net/hbLr7tt0/37/
I'll close this one, with assumption your issue were resolved (at least, in my example).
Hello. Please see the following jsfiddle example: http://jsfiddle.net/v4pv27tL/15/
I have a client who has this need:
In other words, it appears like native HTML until click, when it turns into ordinary editor. Seemed like it should be straightforward from the API.
The problem I ran into is in certain cases, onBlur is firing immediately after onFocus. I didn't do any more research than the fiddle above, but is seems that showPreview may be creating multiple DOM elements and the shift from one to another triggers blur.
If there's a better implementation that doesn't expose these issues, please advise.
Please let me know if I can provide further information or help in any way. And thank you for all the effort to share this library!
Best,
E