/* Copyright 2017 Ziadin Givan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. https://github.com/givanz/VvvebJs */ //doesn't support elements from iframe https://github.com/tinymce/tinymce/issues/3117 //use ckeditor instead that supports inline editing for iframe elements var tinyMceOptions = { //selector: 'textarea', target:false, inline:false,//see comment above toolbar_mode: 'floating', toolbar_persist: true, plugins: 'print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help quickbars emoticons', //imagetools_cors_hosts: ['picsum.photos'], menubar: false,//'file edit view insert format tools table help', toolbar: [ 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect', 'alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist', 'forecolor backcolor removeformat | insertfile image media link anchor codesample | fullscreen preview save print| ltr rtl | code template | charmap emoticons'], toolbar_sticky: true, autosave_ask_before_unload: true, autosave_interval: '30s', autosave_prefix: '{path}{query}-{id}-', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, /* link_list: [ { title: 'My page 1', value: 'https://www.tiny.cloud' }, { title: 'My page 2', value: 'http://www.moxiecode.com' } ], image_list: [ { title: 'My page 1', value: 'https://www.tiny.cloud' }, { title: 'My page 2', value: 'http://www.moxiecode.com' } ], image_class_list: [ { title: 'None', value: '' }, { title: 'Some class', value: 'class-name' } ], */ importcss_append: true, file_picker_callback: function (callback, value, meta) { /* Provide file and text for the link dialog */ if (meta.filetype === 'file') { callback('https://www.google.com/logos/google.jpg', { text: 'My text' }); } /* Provide image and alt text for the image dialog */ if (meta.filetype === 'image') { callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' }); } /* Provide alternative source and posted for the media dialog */ if (meta.filetype === 'media') { callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' }); } }, /* templates: [ { title: 'New Table', description: 'creates a new table', content: '