feat: self-host timymce

This commit is contained in:
Azgaar 2024-05-17 11:23:29 +02:00
parent 31cb908f43
commit bbbf6835c7
7 changed files with 22153 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -64,7 +64,7 @@ function editNotes(id, name) {
async function initEditor() {
if (!window.tinymce) {
const url = "https://azgaar.github.io/Fantasy-Map-Generator/libs/tinymce/tinymce.min.js";
const url = "/libs/tinymce/tinymce.min.js";
try {
await import(url);
} catch (error) {
@ -79,11 +79,12 @@ function editNotes(id, name) {
}
if (window.tinymce) {
window.tinymce._setBaseUrl("https://azgaar.github.io/Fantasy-Map-Generator/libs/tinymce");
tinymce.init({
selector: "#notesLegend",
height: "90%",
menubar: false,
plugins: `autolink lists link charmap print code fullscreen image link media table paste hr wordcount`,
plugins: `autolink lists link charmap code fullscreen image link media table wordcount`,
toolbar: `code | undo redo | removeformat | bold italic strikethrough | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media table | fontselect fontsizeselect | blockquote hr charmap | print fullscreen`,
media_alt_source: false,
media_poster: false,