Skip to content

ETS-Pandey/tinymce-docs

 
 

Repository files navigation

TinyMCE documentation

wercker status

This project maintains the documentation for TinyMCE at https://www.tiny.cloud/docs. If you have any modifications you wish to contribute, fork this project, make the changes and submit a pull request. You will need to sign the contributors license agreement, which will be emailed to you upon creating the pull request.

This project is built using Antora.

Contributing to the TinyMCE Documentation

If you would like to contribute to the TinyMCE project please read the TinyMCE Documentation Contributor's Guide at either:

Working on TinyMCE documentation

Compiling or building the documentation

The following procedure assists with building (or compiling) the documentation locally. Tiny recommends testing and reviewing changes locally prior to submitting a pull request.

Installing Prerequisites

Linux users

You need the following programs installed on your computer:

First time set up

Once you have installed any missing prerequisites, in a terminal or on a command prompt:

  1. Clone the git repository:

    git clone git@github.com:tinymce/tinymce-docs.git
    
  2. Change directory into the cloned git repository:

    cd tinymce-docs
    
  3. Run yarn install

    yarn install
    

Run the development version of the documentation

To create a development version of the documentation, run:

yarn build
yarn serve

To view the documentation; in a web browser, navigate to http://127.0.0.1:4000.

Note: The development version of the documentation will update automatically when you save changes locally.

The yarn build step will download the latest TinyMCE package and generate new API reference content from source code. To change the version of TinyMCE API, open the _scripts/api-reference.sh file and edit the API_VERSION to the TinyMCE version you would like to generate API docs for. Alternatively, to build using a local version of TinyMCE, yarn build-local ../path/to/local/TinyMCE.

Note: The development server does not need to be stopped prior to running the yarn build command, antora should pick up the new changes generated by the build step.

TinyMCE API documentation

The TinyMCE API documentation is maintained within the TinyMCE project repository and compiled for the documentation site using MoxieDoc.

Prerequisites

Live Demos [WIP]

Live demos can be added to content using the "live-demo.html" include, such as:

{% include live-demo.html id="basic-example" %}

There are several options for this include file - please see live-demo.html for details.

The source for each live demo is store in the _includes/live-demos/ directory.

Overriding the tinymce URL in live demos

All live demos usually get their tinymce.min.js URL from the tinymce_live_demo_url setting in the _config.yml file. However, there are some instances where you wish to override this, e.g.

  • You want to push/deploy a branch for a new feature that's only on the 'dev' channel.
  • You want to run the site locally, but test out the live demos in a different channel.

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

  1. Set tinymce_live_demo_url in _config-local-override.yml.

    • This will override the tinymce_live_demo_url setting in config.yml.
    • This file is not intended to be checked in.
    • This option changes the URL for all live demos.
  2. Set the script_url_override setting when including live-demo.html.

    • This is useful if you want to deploy the develop branch for a feature only in the 'dev' channel.
    • This only overrides the URL for one live demo.
    • Don't use this in more than one live demo on a page.
    • Don't use this long-term - when the feature is fully rolled-out, use the standard channel.
    • See live-demo.html for details.

Note: Jekyll is pretty bad at automatically reloading code when you're playing with include files. Sometimes you need to restart the server.

About

TinyMCE Documentation

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.0%
  • HTML 34.5%
  • CSS 4.4%
  • Liquid 1.8%
  • Shell 1.3%