Guest User

Untitled

a guest
May 24th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <form class="form-horizontal" method="post">
  2. <textarea class="form-control my-editor" placeholder="Оставьте Ваш комментарий" name="addComment" id="add" maxlength="8000" required></textarea>
  3.  
  4. var editor_config = {
  5. path_absolute: "/",
  6. selector: "textarea.my-editor",
  7. plugins: [
  8. "advlist autolink lists charmap preview hr",
  9. "searchreplace fullscreen",
  10. "nonbreaking save contextmenu directionality",
  11. "paste textcolor colorpicker "
  12. ],
  13. toolbar: "insertfile | styleselect | bold | emoticons ",
  14. relative_urls: false,
  15. file_browser_callback: function (field_name, url, type, win) {
  16. var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
  17. var y = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
  18.  
  19. var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
  20. if (type == 'image') {
  21. cmsURL = cmsURL + "&type=Images";
  22. } else {
  23. cmsURL = cmsURL + "&type=Files";
  24. }
  25.  
  26. tinyMCE.activeEditor.windowManager.open({
  27. file: cmsURL,
  28. title: 'Filemanager',
  29. width: x * 0.8,
  30. height: y * 0.8,
  31. resizable: "yes",
  32. close_previous: "no"
  33. });
  34. }
  35. };
  36. tinymce.init(editor_config);
Add Comment
Please, Sign In to add comment