I wanted to replace another editor in our project with CLEditor, but running into a problem (an MVC4 project for whatever that's worth).
My page has a table of comments each with a single response. If you click the edit link on a row in that table, it opens a modal jquery dialog and you can edit the comment and response which are both text area controls, but the comment field uses the CLEditor.
It nearly works perfectly. However, if the user clicks the dialog's [X] to close rather than clicking the "Save" (submit) button, then the next time the dialog is opened the CLEditor control has only "true" in the edit field text, not the actual text that that textarea was bound to.
Additional details:
- I call $('#Comment').cleditor() only the first time the dialog is opened.
- If you're familiar with jquery dialogs, the dialog is just a div on the main page that is rendered from an MVC partial view. Clicking the "Edit" link mentioned above triggers a call to $.getJSON() and then binds the form to the returned JSON data.
- jquery version is 2.1.0
- jquery UI version 1.10.4
Would be grateful for any advice. So close, yet so far!