editor

Moving from Summernote

No jQuery, same textarea, same upload endpoint.

Summernote needs jQuery and reads values with summernote('code'). 82editor has no dependencies, and when it wraps a textarea the value goes out with the form.

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<link href="summernote-lite.min.css" rel="stylesheet">
<script src="summernote-lite.min.js"></script>
<textarea id="summernote" name="content"></textarea>
<script>
  $('#summernote').summernote({
    height: 400,
    callbacks: { onImageUpload: (files) => upload(files[0]) },
  });
  const html = $('#summernote').summernote('code');
</script>
<link rel="stylesheet" href="https://82editor.com/cdn/v1.0.0/82editor.css">
<script src="https://82editor.com/cdn/v1.0.0/82editor.min.js"></script>
<textarea id="summernote" name="content"></textarea>
<script>
  const editor = Editor82.createEditor('#summernote', {
    height: 400,
    uploadImage: (file) => upload(file), // return the image URL
  });
  const html = editor.getHTML();
</script>
Summernote82editor
$(el).summernote('code')editor.getHTML()
$(el).summernote('code', html)editor.setHTML(html)
$(el).summernote('isEmpty')editor.isEmpty()
callbacks.onChangeeditor.on('change', fn)
callbacks.onImageUploaduploadImage(file) => url