Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fix html5 bug when textarea is required #223

merged 1 commit into from

5 participants


space here.
if (/* cond */) {


Hey @genemu ! Need this, soooo much :beers:

@bamarni bamarni merged commit f786c30 into genemu:master

Sorry for the late question, but I am getting an error when I set the required attribute

        ->add('job', 'genemu_tinymce' , array (
            'label' => 'job',                
            'required' => true                

The error gotten is "editor.onChange is undefined".

Is there something else I should configure to make it work the textarea as a required field?


Hello, Is there any response to this problem ? I'm having the same problem than @alejandrovinueza

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 Resources/views/Form/jquery_layout.html.twig
8 Resources/views/Form/jquery_layout.html.twig
@@ -60,7 +60,13 @@
{%- if configs.script_url is defined %}
- $('#{{ id }}').tinymce($configs);
+ var $textarea = jQuery('#{{ id }}');
+ if($'[required]')) {
+ $configs.oninit = function(editor) {
+ editor.onChange.add(function(ed, l) {; });
+ };
+ }
+ $textarea.tinymce($configs);
{% else %}
Something went wrong with that request. Please try again.