Skip to content

Commit dea49aa

Browse files
kemister85tiny-ben-transhanmen-tiny
authored
DOC-3220: Update the README.md file for tinymce/docs project to include updated information. (#3733) (#3800)
* DOC-3220: Update the `README.md` file for `tinymce/docs` project to include updated information. (#3733) * DOC-3220: Update the README.md file for tinymce/docs to include updated information. * Update README.md * Update README.md * Update README.md Co-authored-by: tiny-ben-tran <[email protected]> * Update README.md Co-authored-by: Shan <[email protected]> --------- Co-authored-by: tiny-ben-tran <[email protected]> Co-authored-by: Shan <[email protected]>
1 parent 50de985 commit dea49aa

File tree

1 file changed

+59
-77
lines changed

1 file changed

+59
-77
lines changed

README.md

Lines changed: 59 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,101 @@
1-
# TinyMCE documentation
1+
# TinyMCE Documentation
22

3-
This project maintains the documentation for TinyMCE at
4-
[https://www.tiny.cloud/docs](https://www.tiny.cloud/docs). If you have any
5-
modifications you wish to contribute, fork this project, make the changes
6-
and submit a pull request. You will need to sign the contributor’s license
7-
agreement, which will be emailed to you upon creating the pull request.
3+
This project maintains the official documentation for TinyMCE, available at [https://www.tiny.cloud/docs](https://www.tiny.cloud/docs). 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.
84

9-
This project is built using [Antora](https://antora.org/).
5+
This project is built using [Antora](https://antora.org/)
106

117
## Contributing to the TinyMCE Documentation
128

13-
If you would like to contribute to the TinyMCE project please read the TinyMCE Documentation Contributor’s Guide at either:
9+
To contribute to the TinyMCE documentation project, please review the following resources:
1410

15-
- [TinyMCE Documentation - Contributor's Guide](https://www.tiny.cloud/docs/configure/contributing-docs/).
16-
- [GitHub - How to contribute to TinyMCE’s documentation](https://github.com/tinymce/tinymce-docs/blob/release/docs-6/CONTRIBUTING.md#how-to-contribute-to-tinymces-documentation).
11+
- [GitHub - How to contribute to TinyMCE’s documentation](https://github.com/tinymce/tinymce-docs/blob/main/CONTRIBUTING.md#how-to-contribute-to-tinymces-documentation)
1712

18-
## Working on TinyMCE documentation
13+
These guides cover contribution guidelines, project structure, style conventions, and best practices for submitting changes.
1914

20-
### Compiling or building the documentation
15+
## Setting Up Your Development Environment
2116

22-
The following procedure assists with building (or compiling) the documentation locally. Tiny recommends testing and reviewing changes locally prior to submitting a pull request.
17+
To contribute effectively, you should set up a local development environment. This allows you to preview and test your changes before submitting a PR.
2318

24-
#### Installing Prerequisites
19+
### Prerequisites
2520

26-
##### Linux users
21+
Ensure the following software is installed:
2722

28-
You need the following programs installed on your computer:
23+
- [Node.js](https://nodejs.org/en/) (version 22.9 or lower)
24+
- [Yarn](https://yarnpkg.com/)
25+
- Git
2926

30-
#### First time set up
27+
### Cloning the Repository
3128

32-
Once you have installed any missing prerequisites, in a terminal or on a command prompt:
29+
Clone the TinyMCE documentation repository:
3330

34-
1. Clone the git repository:
35-
```
36-
git clone [email protected]:tinymce/tinymce-docs.git
37-
```
38-
39-
2. Change directory into the cloned git repository:
40-
```
41-
cd tinymce-docs
42-
```
43-
44-
3. Run yarn install
45-
```
46-
yarn install
47-
```
31+
```bash
32+
git clone [email protected]:tinymce/tinymce-docs.git
33+
cd tinymce-docs
34+
yarn
35+
```
4836

49-
#### Run the development version of the documentation
37+
### Running the Development Server
5038

51-
To create a development version of the documentation, run:
39+
To build and serve the documentation locally:
5240

53-
```
41+
```bash
5442
yarn build
55-
yarn serve
43+
yarn start-dev
5644
```
5745

46+
Visit [http://127.0.0.1:4000](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.
5847

59-
To view the documentation; in a web browser, navigate to [http://127.0.0.1:4000](http://127.0.0.1:4000).
60-
61-
> **Note**: The development version of the documentation will update automatically when you save changes locally.
48+
> **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:
6249
63-
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`.
50+
Example:
6451

65-
> **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.
52+
```bash
53+
yarn build-local ../path/to/local/tinymce
54+
```
6655

67-
#### TinyMCE API documentation
56+
### API Documentation
6857

69-
The TinyMCE API documentation is maintained within the [TinyMCE project repository](https://github.com/tinymce/tinymce) and compiled for the documentation site using [MoxieDoc](https://github.com/tinymce/moxiedoc).
58+
The TinyMCE API documentation is compiled and generated using [MoxieDoc](https://github.com/tinymce/moxiedoc) from the core [TinyMCE project repository](https://github.com/tinymce/tinymce). To update the published API docs:
7059

71-
To update the published API documentation:
60+
1. Update the `.api-version` file.
61+
2. Run `yarn build`:
7262

73-
1. Change the version in `.api-version`.
74-
2. Run `yarn build`.
63+
* Running `yarn build` downloads the TinyMCE package specified in `.api-version` and generates new API reference content from source.
7564
3. Commit the changes.
7665

77-
Running `yarn build` downloads the TinyMCE package specified in `.api-version` and generates new API reference content from source.
66+
> **Warning:** The API documentation should not be edited manually. Always generate it from source to ensure accuracy.
7867
79-
**Note:** The API documentation should never be edited manually.
68+
## Live Demos
8069

81-
##### Prerequisites
70+
Live demos can be added to the `modules/ROOT/examples/live-demos` directory. Reference them in your documentation with:
8271

83-
- [Node.js](https://nodejs.org/en/).
84-
85-
86-
### Live Demos
72+
```asciidoc
73+
liveDemo::{sub-directory-name}[]
74+
```
8775

88-
New live demos can be added to the [modules/ROOT/examples/live-demos directory](modules/ROOT/examples/live-demos). It then can be referenced in your doc with the following code:
76+
### Overriding the TinyMCE URL in Live Demos
8977

90-
```
91-
liveDemo::{sub-directory-name}[]
92-
```
78+
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:
9379

94-
#### Overriding the tinymce URL in live demos
80+
* Testing a new feature on the `dev` channel.
81+
* Running the site locally while testing live demos on a different channel.
9582
96-
All live demos usually get their `tinymce.min.js` URL from the `tinymce_live_demo_url` setting in the `antora.yml` file.
97-
However, there are some instances where you wish to override this, e.g.
83+
To help with this, there are two mechanisms for overriding the `tinymce.min.js` URL:
9884

99-
- You want to push/deploy a branch for a new feature that's only on the 'dev' channel.
100-
- You want to run the site locally, but test out the live demos in a different channel.
85+
1. **Global Override:**
86+
To change the TinyMCE URL for all live demos, modify the `tinymce_live_demo_url` attribute in `antora-playbook-dev.yml`:
10187
102-
To help with this, there are two mechanisms for overriding the `tinymce.min.js` URL.
88+
```yaml
89+
asciidoc:
90+
attributes:
91+
tinymce_live_demo_url: https://your-custom-url.com/tinymce.min.js
92+
```
10393
104-
1. Change the URL for all live demos by setting the `tinymce_live_demo_url` attribute in `antora-playbook-dev.yml`. For example:
105-
```
106-
asciidoc
107-
attributes:
108-
tinymce_live_demo_url: URL_to_script_file
109-
```
94+
2. **Per-Demo Override:** Use the `script_url_override` attribute:
95+
To override the URL for a specific live demo:
11096
111-
2. Change the URL for an individual live demo by setting `script_url_override` attribute in the live demo markup. For example:
112-
```
113-
liveDemo::{sub-directory-name}[script_url_override='URL_to_script_file']
114-
```
97+
```asciidoc
98+
liveDemo::{sub-directory-name}[script_url_override='https://your-custom-url.com/tinymce.min.js']
99+
```
115100
116-
- This is useful if you want to deploy the develop branch for a feature only in the 'dev' channel.
117-
- This only overrides the URL for one live demo.
118-
- Don't use this in more than one live demo on a page.
119-
- Don't use this long-term - when the feature is fully rolled-out, use the standard channel.
101+
> **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.

0 commit comments

Comments
 (0)