Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form class="form-horizontal" method="post">
- <textarea class="form-control my-editor" placeholder="Оставьте Ваш комментарий" name="addComment" id="add" maxlength="8000" required></textarea>
- var editor_config = {
- path_absolute: "/",
- selector: "textarea.my-editor",
- plugins: [
- "advlist autolink lists charmap preview hr",
- "searchreplace fullscreen",
- "nonbreaking save contextmenu directionality",
- "paste textcolor colorpicker "
- ],
- toolbar: "insertfile | styleselect | bold | emoticons ",
- relative_urls: false,
- file_browser_callback: function (field_name, url, type, win) {
- var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
- var y = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
- var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
- if (type == 'image') {
- cmsURL = cmsURL + "&type=Images";
- } else {
- cmsURL = cmsURL + "&type=Files";
- }
- tinyMCE.activeEditor.windowManager.open({
- file: cmsURL,
- title: 'Filemanager',
- width: x * 0.8,
- height: y * 0.8,
- resizable: "yes",
- close_previous: "no"
- });
- }
- };
- tinymce.init(editor_config);
Add Comment
Please, Sign In to add comment