sample





커스텀


<script>
  new FroalaEditor('.selector', {
    imageUploadParam: 'image_param',
    imageUploadURL: '/upload_image',
    imageUploadParams: {id: 'my_editor'},
    imageUploadMethod: 'POST',
    imageMaxSize: 5 * 1024 * 1024,
    imageAllowedTypes: ['jpeg', 'jpg', 'png'],

    events: {
      'image.beforeUpload': function (images) {

      },
      'image.uploaded': function (response) {

      },
      'image.inserted': function ($img, response) {

      },
      'image.replaced': function ($img, response) {

      },
      'image.error': function (error, response) {
        if (error.code == 1) { ... }
        else if (error.code == 2) { ... }
        else if (error.code == 3) { ... }
        else if (error.code == 4) { ... }
        else if (error.code == 5) { ... }
        else if (error.code == 6) { ... }
        else if (error.code == 7) { ... }

      }
    }
  })
</script>


메서ㅡㄷ


<script>

    var editor = new FroalaEditor(  '.selector',
    {
        imageUploadParam: 'image_param',
        events: {

        }
    }

    , function ()
    {
        editor.image.remove($('#my_image'));
    })
</script>