kopia lustrzana https://github.com/wagtail/wagtail
Docs - Add note about including the feature in text editor settings
rodzic
09c125189d
commit
86ed0ab9f7
|
@ -46,6 +46,7 @@ Changelog
|
|||
* Docs: Replace incorrect screenshot for authors listing on tutorial (Shreshth Srivastava)
|
||||
* Docs: Add documentation for building non-model-based choosers using the _queryish_ library (Matt Westcott)
|
||||
* Docs: Fix incorrect tag library import on focal points example (Hatim Makki Hoho)
|
||||
* Docs: Add reminder about including your custom Draftail feature in any overridden `WAGTAILADMIN_RICH_TEXT_EDITORS` setting (Charlie Sue)
|
||||
* Maintenance: Fix snippet search test to work on non-fallback database backends (Matt Westcott)
|
||||
* Maintenance: Update Eslint, Prettier, Jest, a11y-dialog, axe-core and js-cookie npm packages (LB (Ben) Johnston)
|
||||
* Maintenance: Add npm scripts for TypeScript checks and formatting SCSS files (LB (Ben) Johnston)
|
||||
|
|
|
@ -736,6 +736,7 @@
|
|||
* TopDevPros
|
||||
* Sandra Ashipala
|
||||
* Omkar Jadhav
|
||||
* Charlie Sue
|
||||
|
||||
## Translators
|
||||
|
||||
|
|
|
@ -392,6 +392,23 @@ window.draftail.registerPlugin({
|
|||
}, 'controls');
|
||||
```
|
||||
|
||||
```{note}
|
||||
Remember to include this feature in any custom Draft configs set up in the `WAGTAILADMIN_RICH_TEXT_EDITORS` setting. So that this new 'sentences' feature is available.
|
||||
```
|
||||
|
||||
For example:
|
||||
|
||||
```python
|
||||
WAGTAILADMIN_RICH_TEXT_EDITORS = {
|
||||
'default': {
|
||||
'WIDGET': 'wagtail.admin.rich_text.DraftailRichTextArea',
|
||||
'OPTIONS': {
|
||||
'features': ['bold', 'italic', 'link', 'sentences'], # Add 'sentences' here
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Text decorators
|
||||
|
||||
The [decorators API](https://www.draftail.org/docs/decorators) is how Draftail / Draft.js supports highlighting text with special formatting in the editor. It uses the [CompositeDecorator](https://draftjs.org/docs/advanced-topics-decorators/#compositedecorator) API, with each entry having a `strategy` function to determine what text to target, and a `component` function to render the decoration.
|
||||
|
|
|
@ -64,6 +64,7 @@ depth: 1
|
|||
* Replace incorrect screenshot for authors listing on tutorial (Shreshth Srivastava)
|
||||
* Add documentation for building non-model-based choosers using the _queryish_ library (Matt Westcott)
|
||||
* Fix incorrect tag library import on focal points example (Hatim Makki Hoho)
|
||||
* Add reminder about including your custom Draftail feature in any overridden `WAGTAILADMIN_RICH_TEXT_EDITORS` setting (Charlie Sue)
|
||||
|
||||
### Maintenance
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue