-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '6.0' into dev-guide-create-a-backend-add-on
- Loading branch information
Showing
38 changed files
with
1,232 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
You can view the list of supported browsers for Classic UI at [Browserslist](https://browsersl.ist/#q=%3E%3D+0.5%25%0Alast+2+major+versions%0Anot+dead%0AChrome+%3E%3D+60%0AFirefox+%3E%3D+60%0AFirefox+ESR%0AiOS+%3E%3D+12%0ASafari+%3E%3D+12%0Anot+Explorer+%3C%3D+11). | ||
|
||
The supported web browsers for Classic UI are set according to [Bootstrap](https://getbootstrap.com/docs/5.3/getting-started/browsers-devices/#supported-browsers). | ||
The following code snippet is the [browserslist configuration for Bootstrap 5.3.3](https://github.com/twbs/bootstrap/blob/v5.3.3/.browserslistrc). | ||
|
||
```shell | ||
>= 0.5% | ||
last 2 major versions | ||
not dead | ||
Chrome >= 60 | ||
Firefox >= 60 | ||
Firefox ESR | ||
iOS >= 12 | ||
Safari >= 12 | ||
not Explorer <= 11 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
You can view the list of supported browsers for Volto at [Browserslist](https://browsersl.ist/#q=%3E1%25%0Alast+4+versions%0AFirefox+ESR%0Anot+dead). | ||
|
||
These browsers are set according to the `browserslist` key in Volto's [`package.json`](https://github.com/plone/volto/blob/1aff8d0451f5cb375ca9f5afe9b2b72a0555afd8/packages/volto/package.json#L170-L176) file, whose content is below. | ||
|
||
```shell | ||
>1% | ||
last 4 versions | ||
Firefox ESR | ||
not dead | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Install {term}`pipx` for your active Python, and ensure it is on your `$PATH`. | ||
Carefully read the console output for further instructions, and follow them, if needed. | ||
|
||
```shell | ||
python3 -m pip install pipx | ||
pipx ensurepath | ||
``` | ||
|
||
```{seealso} | ||
- [Install `pipx` as a Standalone Tool](https://realpython.com/python-pipx/#install-pipx-as-a-standalone-tool) | ||
- [Configure `pipx` Before the First Run](https://realpython.com/python-pipx/#configure-pipx-before-the-first-run) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
Installing Python is beyond the scope of this documentation. | ||
However, it is recommended to use a Python version manager, {term}`pyenv`, that allows you to install multiple versions of Python on your development environment without destroying your system's Python. | ||
% TODO: uncomment this line after upgrading to plone-sphinx-theme and latest Sphinx which supports replacements inside includes. | ||
% Plone requires Python version {SUPPORTED_PYTHON_VERSIONS_PLONE60}. | ||
|
||
Plone 6.0 requires Python version 3.8, 3.9, 3.10, 3.11, or 3.12. | ||
Plone 6.0 requires Python version {{SUPPORTED_PYTHON_VERSIONS_PLONE60}}. | ||
|
||
```{warning} | ||
Do not create or activate a Python virtual environment at this time. | ||
The instructions below will create one. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
Installing Python is beyond the scope of this documentation. | ||
However, it is recommended to use a Python version manager, {term}`pyenv`, that allows you to install multiple versions of Python on your development environment without destroying your system's Python. | ||
% TODO: uncomment this line after upgrading to plone-sphinx-theme and latest Sphinx which supports replacements inside includes. | ||
% Plone requires Python version {SUPPORTED_PYTHON_VERSIONS_PLONE61}. | ||
|
||
Plone 6.1 requires Python version 3.10, 3.11, or 3.12. | ||
Plone 6.1 requires Python version {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}. | ||
|
||
```{warning} | ||
Do not create or activate a Python virtual environment at this time. | ||
The instructions below will create one. | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
"description": "TinyMCE customization in Plone 6" | ||
"property=og:description": "TinyMCE customization in Plone 6" | ||
"property=og:title": "TinyMCE customization in Plone 6" | ||
"keywords": "Plone 6, Classic UI, Bootstrap 5, TinyMCE, customization" | ||
--- | ||
|
||
(classic-ui-tinymce-customization-label)= | ||
|
||
# TinyMCE customization | ||
|
||
This chapter is a developer reference manual for customizing {term}`TinyMCE`. | ||
|
||
|
||
## Customize {menuselection}`Format` menu | ||
|
||
There are several options to customize TinyMCE's {menuselection}`Format --> Formats` menu. | ||
|
||
The first two options use TinyMCE's [`formats` JSON configuration](https://www.tiny.cloud/docs/tinymce/latest/content-formatting/). | ||
They are less complicated to implement than the third option. | ||
|
||
|
||
### Add-on GenericSetup configuration file | ||
|
||
This option is best for system administrators and developers who write their own add-ons to ease reproducibility. | ||
|
||
You can add a GenericSetup configuration file to your add-on, such as {file}`profiles/default/registry/tinymce.xml`, with the following content. | ||
|
||
```xml | ||
<registry> | ||
<records interface="plone.base.interfaces.controlpanel.ITinyMCESchema" | ||
prefix="plone"> | ||
<value key="formats" | ||
purge="true" | ||
>{ | ||
"myformat": { | ||
"block": "div", | ||
"classes": "my-css-classes" | ||
} | ||
}</value> | ||
</records> | ||
</registry> | ||
``` | ||
|
||
|
||
### Edit the `Formats` option in the TinyMCE control panel | ||
|
||
This option is good for quick edits, but is not as reproducible as the GenericSetup option. | ||
|
||
You can manually customize the `Formats` value through-the-web in the TinyMCE control panel. | ||
|
||
1. Navigate to {menuselection}`Site Setup --> TinyMCE --> Default`, or append `@@tinymce-controlpanel` to the root of your website in your browser's location bar. | ||
1. Scroll down to {guilabel}`Formats`, and edit the JSON configuration. | ||
1. Click the {guilabel}`Save` button. | ||
|
||
|
||
|
||
### Inject formats with files named {file}`tinymce-formats.css` | ||
|
||
This option is more complex to implement than the previous options. | ||
|
||
In Plone 6, TinyMCE has a special logic that automatically reads registered files named {file}`tinymce-formats.css` and adds the CSS classes defined in those files to TinyMCE's {menuselection}`Format --> Formats` menu by using the [`importcss_file_filter` option](https://www.tiny.cloud/docs/tinymce/latest/importcss/#importcss_file_filter). | ||
|
||
To add custom formats, you can provide your own files. | ||
|
||
1. Name the file {file}`tinymce-formats.css`. | ||
1. Register the file as a resource in your Plone site. | ||
1. Include the file in the TinyMCE control panel in the textarea input {guilabel}`Choose the CSS used in WYSIWYG Editor Area`. | ||
1. Navigate to {menuselection}`Site Setup --> TinyMCE --> Default`, or append `@@tinymce-controlpanel` to the root of your website in your browser's location bar. | ||
1. Scroll down to {guilabel}`Choose the CSS used in WYSIWYG Editor Area`. | ||
|
||
CSS styles defined in this file will automatically be added to the top level of TinyMCE's {menuselection}`Format --> Formats` menu. | ||
|
||
|
||
## Remove imported formats | ||
|
||
Plone 6 Classic UI ships with the Barceloneta theme which includes two custom formats, `highlight-inline` and `p.highlight-paragraph`, in the TinyMCE {menuselection}`Format --> Formats` menu. | ||
You can remove these formats through the TinyMCE control panel. | ||
|
||
1. Navigate to {menuselection}`Site Setup --> TinyMCE --> Default`, or append `@@tinymce-controlpanel` to the root of your website in your browser's location bar. | ||
1. Scroll down to {guilabel}`Choose the CSS used in WYSIWYG Editor Area`. | ||
1. Remove the entry `++theme++barceloneta/tinymce/tinymce-formats.css`. | ||
1. Click the {guilabel}`Save` button. | ||
|
||
Once removed, the custom formats will no longer appear in the menu. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.