diff --git a/editors/markdown/README.md b/editors/markdown/README.md index 75dd732..2498bb6 100644 --- a/editors/markdown/README.md +++ b/editors/markdown/README.md @@ -15,6 +15,8 @@ npm i npm run build ``` +If you want to run the editor from a subfolder of your domain instead of the domains root you have to configure your base (url) inside the `vite.config.js` before running the build or you can pass a base path via the build command inside the `package.json` by appending `--base=/your/path/here` after the call to Vite. + The build process will put all files to the dist folders. Put these files to a web server and use the URL to your webserver in the Squidex UI, for example: ``` diff --git a/editors/markdown/vite.config.js b/editors/markdown/vite.config.js new file mode 100644 index 0000000..97b3252 --- /dev/null +++ b/editors/markdown/vite.config.js @@ -0,0 +1,6 @@ +// vite.config.js +export default { + // base url [prefix] (you need to configure this, if you want to run the editor out of a subdirectory of the domain) + // either add the full url or the directory path like e.g. '/squidex-samples/editors/richtext' + base: "/", +}; diff --git a/editors/richtext/README.md b/editors/richtext/README.md index 6b43969..4bfff20 100644 --- a/editors/richtext/README.md +++ b/editors/richtext/README.md @@ -15,6 +15,8 @@ npm i npm run build ``` +If you want to run the editor from a subfolder of your domain instead of the domains root you have to configure your base (url) inside the `vite.config.js` before running the build or you can pass a base path via the build command inside the `package.json` by appending `--base=/your/path/here` after the call to Vite. + The build process will put all files to the dist folders. Put these files to a web server and use the URL to your webserver in the Squidex UI, for example: ``` diff --git a/editors/richtext/vite.config.js b/editors/richtext/vite.config.js new file mode 100644 index 0000000..14ab92a --- /dev/null +++ b/editors/richtext/vite.config.js @@ -0,0 +1,6 @@ +// vite.config.js +export default { + // base url [prefix] (you need to configure this, if you want to run the editor out of a subdirectory of the domain) + // either add the full url or the directory path like e.g. '/squidex-samples/editors/richtext' + base: "/", +};