Take the 2-minute tour ×

I was trying to integrate ckeditor to my symfony2 project so that some of the textarea will have the ckeditor html editor. I brought the ckeditor on my required textarea by calling the class="ckeditor" in my form. The issue that I am facing now is that when I use the ckeditor the submit button of my form will not work instead I will have to use the built in "Save" option of the ckeditor toolbar for submitting the form. When I remove the ckeditor from the textareas and use normal textarea the submit button seems to work.

I do not want to use the "Save" button on the ckeditor toolbar to submit my form. Is there a workaround to make the submit button work? Tried googling out for possible solutions but could not find any.

P.S: I would also like to know if there are other html text editors like ckeditor that would work well with symfony2 and link to implementation instructions.

share|improve this question
add comment

4 Answers

up vote 12 down vote accepted

I don't know what's going wrong with your form submission but I have created a bundle which allows you to integrate easily CKEditor in a Symfony2 project. The bundle is available here.

If you want to use an other wysiwyg editor, you can use TinyMCE which is available here.

If you are looking for some Symfony2 ressources, I recommend you to visit the Knp Bundles website which lists the available Symfony2 bundles.

share|improve this answer
Thank you for the bundle for integrating CKEditor with Symfony. I tried your bundle. it works. But I'm new to both symfony and ckeditor. And I'm having a problem with the links given in "head" tag in html, which are related to ckeditor. All the needed links are excluding the "web" prefix like "<script type="text/javascript" src="localhost/bundles/ivoryckeditor/…;. And it cant find it there. What's the problem? –  Esenbek Kydyr uulu Mar 14 '12 at 5:47
add comment

Another Symfony2 Ckeditor bundle is the TrsteelCkeditorBundle.

share|improve this answer
add comment

First my textarea was empty, and after filled the ckeditor field or even without, the submit button didn't do anything.

So I had to to push the save button of the toolbar.

But then i did 'previous page' and came back to the same page but with the field hydrated with the content a just send and THERE the submit button works!!

So i just tried to put a default text in the textarea and now there is no more problem with the submit button.

share|improve this answer
It's probably because you have some assert restrictions but ckeditor form filed doesn't show them –  Paul Paca-Vaca Seleznev Jun 29 '13 at 21:33
add comment

I'm having this same problem but my current project prevents me from installing any bundles because I'm only integrating symfony 2 forms into a custom project. The reason behind the error is this:

CKEditor overrides the focus on the textarea which prevents sf2 validator to validate the form when you press Submit. The full error is similar with this one:

"An invalid form control with name='XXX[textarea_content]' is not focusable. "

I'm still searching for an elegant solution, my aim is to override CKEditor focus or fully remove it. Will get back to you once I have the solution.

share|improve this answer
add comment

Your Answer


