lundi 4 juillet 2016

Ckeditor create hidden input

I am trying to add hidden input to my ckeditor, to send user_id to my controller.

$("#messageUrl").click(function () {
        editor.setData("[\quote=]"+document.getElementById('messageAnswer').innerHTML+"[/quote]");
        });

This example show what i want achieve.

$("#messageUrl").click(function () {
        editor.setData('<div>'+'<input type="text" value="" name="quoted-user">'+'</div>'+"[\quote=]"+document.getElementById('messageAnswer').innerHTML+"[/quote]");
        });

But ckeditor does not see that input.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire