textarea-sync.rst 614 B

1234567891011121314151617181920
  1. Synchronize the textarea
  2. ========================
  3. When the textarea is transformed into a CKEditor widget, the textarea value is
  4. no more populated except when the form is submitted. Then, it leads to issues
  5. when you try to serialize the form or you try to rely on the textarea value in
  6. JavaScript. To automatically synchronize the textarea value, you can do it
  7. globally in your configuration:
  8. .. code-block:: yaml
  9. # app/config/config.yml
  10. fos_ck_editor:
  11. input_sync: true
  12. Or you can do it in your widget:
  13. .. code-block:: php
  14. $builder->add('field', 'ckeditor', array('input_sync' => true));