JSFiddle - React, Tailwind, and code Playground
by textboxio
HTML
<script src="https://cloud.tinymce.com/5-testing/tinymce.min.js"></script>
<form method="post" action="dump.php">
<textarea name="content"></textarea>
</form>
JavaScript
tinymce.init({
selector: 'textarea',
plugins: 'image media link tinydrive code imagetools save',
api_key: 'pdotdn6ajz23g86qg3ra8vbddxap1vl6k4h6rvyf51ye7ef9',
height: 600,
imagetools_cors_hosts: ['picsum.photos'],
external_plugins: {
tinydrive: 'http://wpuff/prod19/plugin.js'
},
// tinydrive_upload_path: 'ul',
tinydrive_token_provider: function (success, failure) {
success({ token: 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiSm9obiBEb2UiLCJzdWIiOiJqb2huZG9lIiwiaHR0cHM6Ly9jbGFpbXMudGlueS5jbG91ZC9kcml2ZS9yb290IjoiL2pvaG5kb2UiLCJpYXQiOjE1NDcwMTI0OTR9.HfTrNXbAjrox8zuV-VPqZaGr4Es6r49RbfCwrM7UNO8I8eWs9rMJ89taswmUT9xBok8RervSX3rAJYQSt7whCLdY_KR6heNk7AbfcoPVwN2p2cA3PZoVnBLvF8TPbLVNDiW1GCtQ3BEEIDwVJkpMivqe4hZouWUBgErT_JBK-hoIYp2ptha2UuVwrorSZnPXBKmxiH4UdNoxxOQB01HdHdfN4J7kkfJfG13V8uOV0OS2vpUA7nCz2tj6sUQbxwREeDPQcNqof3h61N4T2CoCkOGCJ13bwwjrnpTnCeBgr3JWQGedncKzrF5d58Z5vVXGDG1hejAAC8uLYVoPp1AVQA' });
},
// tinydrive_token_provider: '/tokenprovider',
// tinydrive_service_url: 'http://localhost:4000/',
tinydrive_service_url: 'https://08xjnrso3f.execute-api.us-west-2.amazonaws.com/',
// tinydrive_demo_files_url: '../json/demo_files.json',
// tinydrive_max_image_dimension: 1024,
toolbar: 'insertfile tinydrive image media link | code| save',
menu: {
file: {title: 'File', items: 'opendocument newdocument'},
edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall'},
insert: {title: 'Insert', items: 'link media insertfile | template hr'},
view: {title: 'View', items: 'visualaid'},
format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'},
table: {title: 'Table', items: 'inserttable tableprops deletetable | cell row column'},
tools: {title: 'Tools', items: 'spellchecker code'}
},
save_onsavecallback: (editor) => {
newFile(editor);
}
});