editor

Moving from Sum●●●ote

No jQuery, same textarea, same upload endpoint.

Sum●●●ote needs jQuery and reads values with sum●●●ote('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="sum●●●ote-lite.min.css" rel="stylesheet">
<script src="sum●●●ote-lite.min.js"></script>
<textarea id="sum●●●ote" name="content"></textarea>
<script>
  $('#sum●●●ote').sum●●●ote({
    height: 400,
    callbacks: { onImageUpload: (files) => upload(files[0]) },
  });
  const html = $('#sum●●●ote').sum●●●ote('code');
</script>
<link rel="stylesheet" href="https://82editor.com/cdn/v1.2.0/82editor.css">
<script src="https://82editor.com/cdn/v1.2.0/82editor.min.js"></script>
<textarea id="sum●●●ote" name="content"></textarea>
<script>
  const editor = Editor82.createEditor('#sum●●●ote', {
    height: 400,
    uploadImage: (file) => upload(file), // return the image URL
  });
  const html = editor.getHTML();
</script>
Sum●●●ote82editor
$(el).sum●●●ote('code')editor.getHTML()
$(el).sum●●●ote('code', html)editor.setHTML(html)
$(el).sum●●●ote('isEmpty')editor.isEmpty()
callbacks.onChangeeditor.on('change', fn)
callbacks.onImageUploaduploadImage(file) => url