HTML editor field for form

Hi,

I was wondering which is the best option to make textfields editable. Is there a built in Helper in cakephp that I am missing here? I am sure there have been many implementations of a html editor so I am interested in seeing what the best options are, that you are using?

Greets

Rich editable textareas aren’t really a PHP thing, and so CakePHP doesn’t have anything built in. I normally use tinyMCE or CkEditor, but there are a number of very good ones available these days.

1 Like

Just follow any editor documentation.
Example summernote Editor.

$(document).ready(function() {
  $('.summernote').summernote();
  $('#summernote').summernote();
});

And for CakePHP Form Textearea

//Exp 1
echo $this->Form->textarea('notes',['class'=>'summernote']);
//Exp 2
echo $this->Form->textarea('notes',['id'=>'summernote']);