Skip to content

Commit

Permalink
fix: pat-tinymce after rebase and svelte update 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango authored and petschki committed Sep 18, 2024
1 parent 3fe361b commit fcb978c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pat/tinymce/js/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import _ from "underscore";
import tinymce from "tinymce/tinymce";
import "../../autotoc/autotoc";
import "../../modal/modal";
import PatternUpload from "../../upload/upload";
import ImageTemplate from "../templates/image.xml";
import LinkTemplate from "../templates/link.xml";

Expand Down Expand Up @@ -83,11 +82,12 @@ var InternalLink = LinkType.extend({
name: "internallinktype",
trigger: ".pat-internallinktype-dummy",
init: async function () {
if (!this.getEl().length) {
const linkEl = this.getEl();
if (!linkEl) {
return;
}
LinkType.prototype.init.call(this);
this.getEl().classList.add("pat-contentbrowser");
linkEl.classList.add("pat-contentbrowser");
await this.createContentBrowser();
},

Expand Down
3 changes: 1 addition & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ module.exports = () => {
},
});

config.resolve.alias.svelte = path.resolve('node_modules', 'svelte');
// config.resolve.alias.svelte = path.resolve("node_modules", "svelte/src/runtime");
config.resolve.alias.svelte = path.resolve('node_modules', 'svelte/src/runtime')
config.resolve.extensions = [".js", ".json", ".wasm", ".svelte"];
config.resolve.mainFields = ["browser", "module", "main", "svelte"];
// config.resolve.conditionNames = ["svelte", "browser", "import"];
Expand Down

0 comments on commit fcb978c

Please sign in to comment.