Skip to content

Latest commit

 

History

History
87 lines (70 loc) · 2.34 KB

File metadata and controls

87 lines (70 loc) · 2.34 KB

Bundling an npm version of TinyMCE with ES6 and Vite

Requirements

This guide requires the following:

  • Node.js and npm.

  • Basic knowledge of how to use Vite.

  • For self-hosted deployments: A valid license key starting with T8LK: from your {accountpage}

  • (Optional: For premium features) The latest premium .zip bundle of TinyMCE that includes premium plugins.

Important

When self-hosting TinyMCE 8:

  • A license key is required for commercial deployments

  • Keys must start with the T8LK: prefix

  • For hybrid deployments that need both cloud features and local fallback, you can use both license_key and api_key

Procedures

  1. Import the index.js file in the index.html page, such as:

    <!doctype html>
    <html lang="en">
    
    <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0" />
      <title>Vite App</title>
    </head>
    
    <body>
      <script type="module" src="/src/index.js"></script>
    </body>
    
    </html>
  2. Run vite in dev mode to test the application

    npx vite dev
  3. If Vite

    1. runs successfully, check that the editor loads in the application.

    2. fails, review any errors and the configuration changes in this procedure; you may need to adjust for conflicts or other issues when bundling {productname} into an existing project.

  4. Run vite in production mode to generate the bundle

    npx vite build
  5. If vite runs successfully, check that it generated by running:

    npx vite preview