Skip to content

tinymce/tinymce-docs

Repository files navigation

TinyMCE Documentation

This project maintains the official documentation for TinyMCE, available at https://www.tiny.cloud/docs. TinyMCE 8 is the current stable version. Use tinymce@8 or tinymce/8 in CDN URLs and package installations for new projects.

If you have modifications or improvements to contribute, fork this repository, make the necessary changes, and submit a pull request (PR). A contributor's license agreement (CLA) must be signed before your contribution can be merged. This agreement will be sent via email when you create a PR.

This project is built using Antora

Contributing to the TinyMCE Documentation

To contribute to the TinyMCE documentation project, please review the following resources:

These guides cover contribution guidelines, project structure, style conventions, and best practices for submitting changes.

Setting Up Your Development Environment

To contribute effectively, you should set up a local development environment. This allows you to preview and test your changes before submitting a PR.

Prerequisites

Ensure the following software is installed:

Cloning the Repository

Clone the TinyMCE documentation repository:

git clone [email protected]:tinymce/tinymce-docs.git
cd tinymce-docs
yarn

Running the Development Server

To build and serve the documentation locally:

yarn build
yarn start-dev

Visit http://127.0.0.1:4000 to view the documentation. The server supports hot-reloading, so changes will automatically reflect when you save your work.

Note: The yarn build command generates the API reference documentation from the TinyMCE source code. To adjust the API version, edit the API_VERSION variable in the scripts/api-reference.sh file. Alternatively, use yarn build-local to build using a local TinyMCE instance:

Example:

yarn build-local ../path/to/local/tinymce

API Documentation

The TinyMCE API documentation is compiled and generated using MoxieDoc from the core TinyMCE project repository. To update the published API docs:

  1. Update the .api-version file.

  2. Run yarn build:

    • Running yarn build downloads the TinyMCE package specified in .api-version and generates new API reference content from source.
  3. Commit the changes.

Warning: The API documentation should not be edited manually. Always generate it from source to ensure accuracy.

Live Demos

Live demos can be added to the modules/ROOT/examples/live-demos directory. Reference them in your documentation with:

liveDemo::{sub-directory-name}[]

Overriding the TinyMCE URL in Live Demos

By default, live demos load TinyMCE from the URL specified in the tinymce_live_demo_url attribute in the antora.yml file. This can be overridden for specific use cases:

  • Testing a new feature on the dev channel.
  • Running the site locally while testing live demos on a different channel.

To help with this, there are two mechanisms for overriding the tinymce.min.js URL:

  1. Global Override: To change the TinyMCE URL for all live demos, modify the tinymce_live_demo_url attribute in antora-playbook-dev.yml:

    asciidoc:
      attributes:
        tinymce_live_demo_url: https://your-custom-url.com/tinymce.min.js
  2. Per-Demo Override: Use the script_url_override attribute: To override the URL for a specific live demo:

    liveDemo::{sub-directory-name}[script_url_override='https://your-custom-url.com/tinymce.min.js']

Caution: Use this sparingly. Avoid using different URLs for multiple demos on the same page, and remember to revert these changes once the feature is fully released.

Resources for AI and LLM Consumers

The published documentation site provides several artifacts optimized for AI agents and LLM-based tools:

Resource URL Description
llms.txt https://www.tiny.cloud/docs/llms.txt Concise overview with key links and code examples
llms-full.txt https://www.tiny.cloud/docs/llms-full.txt Full index of documentation pages with URLs

Version guidance: Always prefer TinyMCE 8 for new projects. The /tinymce/latest/ URL segment serves TinyMCE 8 content. Use tinymce@8 or tinymce/8 in CDN URLs and package installations.

In addition, each HTML page has a Markdown sibling (.md) for content negotiation. Clients that send Accept: text/markdown can request plain markdown instead of HTML for lower-token consumption. These markdown files are generated during deployment and are not produced by local builds or PR previews.

Contributors