feat: Self-host TinyMCE — switch CDN to /lib/tinymce/

This commit is contained in:
2026-05-21 11:05:00 +10:00
parent 29a7af4950
commit 5c3d3805d1
+2 -1
View File
@@ -92,7 +92,7 @@
} }
@section Scripts { @section Scripts {
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script> <script src="/lib/tinymce/tinymce.min.js"></script>
<script> <script>
document.getElementById('slideType').addEventListener('change', function () { document.getElementById('slideType').addEventListener('change', function () {
document.getElementById('contentSection').style.display = this.value === '0' ? '' : 'none'; document.getElementById('contentSection').style.display = this.value === '0' ? '' : 'none';
@@ -105,6 +105,7 @@
if (tinymce.get('contentEditor')) return; if (tinymce.get('contentEditor')) return;
tinymce.init({ tinymce.init({
selector: '#contentEditor', height: 500, selector: '#contentEditor', height: 500,
license_key: 'gpl',
menubar: 'file edit view insert format table', menubar: 'file edit view insert format table',
plugins: 'advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table help wordcount', plugins: 'advlist autolink lists link image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table help wordcount',
toolbar: 'undo redo | blocks | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image media table | removeformat code fullscreen', toolbar: 'undo redo | blocks | bold italic forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | image media table | removeformat code fullscreen',