text: // Theme
  import 'tinymce/themes/modern/theme';
  
    // Plugins
  import 'tinymce/plugins/link';
  import 'tinymce/plugins/image';
  import 'tinymce/plugins/code';
  import 'tinymce/plugins/table';
  import 'tinymce/plugins/textcolor';
  import 'tinymce/plugins/lists';
  import 'tinymce/plugins/paste';
  
  $(document).ready(function(){
  
    $.ajaxSetup({
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
        }
    });
  
    tinymce.init({
      menubar: false,
      selector:'textarea.richTextBox',
      skin_url: $('meta[name="assets-path"]').attr('content')+'?path=js/skins/voyager',
      min_height: 300,
      resize: 'vertical',
      plugins: 'link, image, code, table, textcolor, lists, paste',
      extended_valid_elements : 'input[id|name|value|type|class|style|required|placeholder|autocomplete|onclick]',
      file_browser_callback: function(field_name, url, type, win) {
              if(type =='image'){
                $('#upload_file').trigger('click');
              }
          },
      toolbar: 'styleselect bold italic underline | forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image table | code | paste',
      convert_urls: false,
      image_caption: true,
      image_title: true,
      paste_as_text: true,
      paste_auto_cleanup_on_paste : true,
      paste_remove_styles: true,
      paste_remove_styles_if_webkit: true,
      paste_strip_class_attributes: true,
      init_instance_callback: function (editor) {
          if (typeof tinymce_init_callback !== "undefined") {
              tinymce_init_callback(editor);
          }
      },
      setup: function (editor) {
          if (typeof tinymce_setup_callback !== "undefined") {
              tinymce_setup_callback(editor);
          }
      }
    });
  
  });
  