tiny mce elimina el contenido mientras publica

I'm using tiny mce in my project which was built using Kohana 3.0.7. If I try to add content to the editor and submit the form, the content is saved properly. But, if there is a validation error and the same page with the validation errors is displayed, there is some issue. After correcting the validation error and adding more content to the mce editor, when I try to post, only the content which was posted at the first attempt is posted. The content which I add after is lost.

I have confirmed this with a plain text-area and sure the editor is causing this. How can I fix this ?

preguntado el 31 de enero de 12 a las 08:01

1 Respuestas

Looks like your textarea content does not get updated after an error. You may do this manually by calling tinymce.triggerSave(); in your javascript console (firebug or similar tool). triggerSave() orders all tinymce instances to write their content back to the html elment they had been created for.

Update: A javascript console is available using firebug or some other developertools (browser addons). What you need to have it functional all of the time is to use the setup init parameter and a handler: XXXX stands for the handler you will need (an event fired when you post)

setup: function(ed){
    ed.onXXXX.add(function(ed, evt){
        //console.log('paste');
        tinymce.triggerSave();
    });
},

Respondido 03 Feb 12, 15:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.