feat: Self-host TinyMCE — switch CDN to /lib/tinymce/
This commit is contained in:
@@ -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';
|
||||||
@@ -103,7 +103,9 @@
|
|||||||
function initTinyMCE() {
|
function initTinyMCE() {
|
||||||
if (tinymce.get('contentEditor')) return;
|
if (tinymce.get('contentEditor')) return;
|
||||||
tinymce.init({
|
tinymce.init({
|
||||||
selector: '#contentEditor', height: 500, menubar: 'file edit view insert format table',
|
selector: '#contentEditor', height: 500,
|
||||||
|
license_key: 'gpl',
|
||||||
|
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',
|
||||||
images_upload_handler: function (blobInfo) {
|
images_upload_handler: function (blobInfo) {
|
||||||
|
|||||||
Reference in New Issue
Block a user