OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
_backup
/
tinymce
/
tinymce
/
src
/
core
/
demo
/
ts
/
demo
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/20/2020 05:41:34 AM
rwxr-xr-x
📄
AnnotationsDemo.ts
1.64 KB
02/20/2020 05:41:36 AM
rw-r--r--
📄
CommandsDemo.ts
3.06 KB
02/20/2020 05:41:36 AM
rw-r--r--
📄
ContentEditableFalseDemo.ts
2.53 KB
02/20/2020 05:41:37 AM
rw-r--r--
📄
CustomThemeDemo.ts
1.79 KB
02/20/2020 05:41:37 AM
rw-r--r--
📄
Demos.ts
725 bytes
02/20/2020 05:41:38 AM
rw-r--r--
📄
FixedToolbarContainerDemo.ts
231 bytes
02/20/2020 05:41:38 AM
rw-r--r--
📄
FullDemo.ts
4.07 KB
02/20/2020 05:41:39 AM
rw-r--r--
📄
InlineDemo.ts
1.31 KB
02/20/2020 05:41:39 AM
rw-r--r--
📄
SourceDumpDemo.ts
1.74 KB
02/20/2020 05:41:41 AM
rw-r--r--
📄
TinyMceDemo.ts
922 bytes
02/20/2020 05:41:41 AM
rw-r--r--
📄
UiContainerDemo.ts
3.95 KB
02/20/2020 05:41:42 AM
rw-r--r--
Editing: SourceDumpDemo.ts
Close
import { document, HTMLTextAreaElement, HTMLInputElement } from '@ephox/dom-globals'; declare let tinymce: any; export default function () { tinymce.init({ selector: 'textarea#editor', skin_url: '../../../../js/tinymce/skins/lightgray', content_css: '../../../../js/tinymce/skins/content/default/content.css', templates: [ { title: 'Some title 1', description: 'Some desc 1', content: 'My content' }, { title: 'Some title 2', description: 'Some desc 2', content: '<div class="mceTmpl"><span class="cdate">cdate</span><span class="mdate">mdate</span>My content2</div>' } ], image_caption: true, plugins: [ 'autosave advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker toc', 'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking', 'save table contextmenu directionality emoticons template paste textcolor importcss colorpicker textpattern', 'codesample help noneditable print' ], add_unload_trigger: false, autosave_ask_before_unload: false, toolbar: 'fontsizeselect fontselect insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | ' + 'bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons table codesample code | ltr rtl', init_instance_callback(editor) { editor.on('init keyup change', () => dumpSource(editor)); } }); const dumpSource = (editor) => { const textArea = document.getElementById('source') as HTMLTextAreaElement; const raw = document.getElementById('raw') as HTMLInputElement; textArea.value = raw.checked ? editor.getBody().innerHTML : editor.getContent(); }; }