Documention
Configuration
CDN

CDN Configuration

This section is used to configure the CDN path. To reduce the size of the Umo Editor core package and improve loading speed, Umo Editor uses CDN to load some static resources, including third-party modules, images, icon resources, etc.

Default Configuration

{
  cdnUrl: 'https://unpkg.com/@umoteam/editor-external@latest', 
}

Using Public CDN

{
  // Using unpkg.com
  cdnUrl: 'https://unpkg.com/@umoteam/editor-external@latest', 
  // Or using jsdelivr.net
  // cdnUrl: 'https://cdn.jsdelivr.net/npm/@umoteam/editor-external@latest', 
}

Using Local Resources

For those who want to further improve loading speed or are in an intranet environment, you can copy the files in the node_modules/@umoteam/editor-external/ folder to the public/ directory and set cdnUrl to location.origin.

You can quickly copy the files in the project’s root directory with the following commands:

mkdir -p public/libs
mkdir -p public/icons
mkdir -p public/static
xcopy node_modules\@umoteam\editor-external\libs\* public\libs\ /E /I
xcopy node_modules\@umoteam\editor-external\icons\* public\icons\ /E /I
xcopy node_modules\@umoteam\editor-external\static\* public\static\ /E /I
⚠️

Note: After updating the version of @umoteam/editor, and copy the latest @umoteam/editor-external to the public directory. Ensure synchronization with the version number of @umoteam/editor-external.

You can also place the files in the node_modules/@umoteam/editor-external/ folder in an appropriate location and correctly configure the cdnUrl, making sure not to end with /.

Configuration Item Description

cdnUrl

Description: CDN path.

Type: String

Default: https://unpkg.com/@umoteam/editor-external@latest

Configuration Item: A valid URL value, should not end with /.