diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 32648ffa10..aa281fa948 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -113,7 +113,6 @@ "new-extension": "plop --plopfile ./devops/plop/plop.js", "compile": "tsc", "check": "npm run lint && npm run compile && npm run build-storybook", - "postinstall": "npm run generate:tinymce", "generate:tinymce": "node ./devops/tinymce/index.js", "prepublishOnly": "node ./devops/publish/cleanse-pkg.js" }, diff --git a/src/Umbraco.Web.UI.Client/src/external/tinymce/index.ts b/src/Umbraco.Web.UI.Client/src/external/tinymce/index.ts index 16fa4ba987..07eb2f29d0 100644 --- a/src/Umbraco.Web.UI.Client/src/external/tinymce/index.ts +++ b/src/Umbraco.Web.UI.Client/src/external/tinymce/index.ts @@ -4,7 +4,7 @@ import * as tiny from 'tinymce'; declare const tinymce: tiny.TinyMCE; const defaultConfig: tiny.RawEditorOptions = { - base_url: '/tinymce', + base_url: '/umbraco/backoffice/tinymce', }; /* Initialize TinyMCE */ diff --git a/src/Umbraco.Web.UI.Client/src/rollup.config.js b/src/Umbraco.Web.UI.Client/src/rollup.config.js index 10fe97f10f..35efc0410d 100644 --- a/src/Umbraco.Web.UI.Client/src/rollup.config.js +++ b/src/Umbraco.Web.UI.Client/src/rollup.config.js @@ -31,6 +31,11 @@ console.log('--- Copying UUI Fonts ---'); cpSync('./node_modules/@umbraco-ui/uui-css/assets/fonts', './dist-cms/assets/fonts', { recursive: true }); console.log('--- Copying src UUI Fonts done ---'); +// Copy TinyMCE +console.log('--- Copying TinyMCE ---'); +cpSync('./node_modules/tinymce', './dist-cms/tinymce', { recursive: true }); +console.log('--- Copying TinyMCE done ---'); + const readFolders = (path) => readdirSync(path).filter((folder) => lstatSync(`${path}/${folder}`).isDirectory()); const createModuleDescriptors = (folderName) => readFolders(`./src/${folderName}`).map((moduleName) => { diff --git a/src/Umbraco.Web.UI.Client/vite.config.ts b/src/Umbraco.Web.UI.Client/vite.config.ts index 132b97a7c5..403b01c08d 100644 --- a/src/Umbraco.Web.UI.Client/vite.config.ts +++ b/src/Umbraco.Web.UI.Client/vite.config.ts @@ -17,6 +17,10 @@ export const plugins: PluginOption[] = [ src: 'src/assets/*.svg', dest: 'umbraco/backoffice/assets', }, + { + src: 'node_modules/tinymce/**/*', + dest: 'umbraco/backoffice/tinymce' + } ], }), viteTSConfigPaths(),