Skip to content

Commit d2d94ce

Browse files
committed
TASK: Add notes about new feature to readme
1 parent 2699277 commit d2d94ce

File tree

1 file changed

+67
-4
lines changed

1 file changed

+67
-4
lines changed

README.md

Lines changed: 67 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# Neos simple editor extend
22

3-
This is a small plugin to simply add some buttons to the Neos CMS CKEditor, without writing any JavaScript code. You only need to compose a YAML-File.
3+
This is a small plugin to simply add some buttons and dropdowns for formatting text to the Neos CMS CKEditor, without writing any JavaScript code.
4+
You only need to compose a YAML-File.
45

56
## Installation
6-
Most of the time you have to make small adjustments to a package (e.g., the configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site package located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:
7+
Most of the time you have to make small adjustments to a package (e.g., the configuration in `Settings.yaml`).
8+
Because of that, it is important to add the corresponding package to the composer from your theme package.
9+
Mostly this is the site package located under `Packages/Sites/`.
10+
To install it correctly go to your theme package (e.g. `Packages/Sites/Foo.Bar`) and run following command:
711

812
```bash
913
composer require breadlesscode/neos-simple-editor-extend --no-update
1014
```
1115

12-
The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Your desired package is now installed correctly.
16+
The --no-update command prevent the automatic update of the dependencies.
17+
After the package was added to your theme `composer.json`, go back to the root of the Neos installation and run composer update.
18+
Your desired package is now installed correctly.
1319

1420
## Demo
1521

1622
![result demo image](Documentation/preview.gif "Example for the configuration below")
1723

18-
## Example configuration
24+
## Example configuration for applying a single style via a button
1925

2026
```yaml
2127
Neos:
@@ -59,5 +65,62 @@ Now you can use your new formattings like this:
5965
'Test.Test:MyCustomSpan2': true
6066
```
6167
68+
## Example configuration for applying one or more style via a dropdown
69+
70+
```yaml
71+
Neos:
72+
Neos:
73+
Ui:
74+
frontendConfiguration:
75+
'Breadlesscode.SimpleEditorExtend:Dropdowns':
76+
'Breadlesscode.SimpleEditorExtend:Dropdowns.Colors':
77+
extensionName: 'colorAndSizeDropdown'
78+
icon: 'tint'
79+
tooltip: 'Mark the text in different colors and sizes'
80+
position: 'before strong'
81+
formatting:
82+
attributes:
83+
color:
84+
label: 'Color'
85+
placeholder: 'Choose color'
86+
placeholderIcon: 'tint'
87+
options:
88+
- label: 'None'
89+
icon: 'eraser'
90+
model: ''
91+
class: ''
92+
- label: 'Gelb'
93+
model: 'yellow'
94+
class: 'font-color--primary'
95+
- label: 'Blau'
96+
model: 'blue'
97+
class: 'font-color--secondary'
98+
size:
99+
label: 'Size'
100+
placeholder: 'Choose size'
101+
placeholderIcon: 'arrows-alt-v'
102+
options:
103+
- label: 'None'
104+
icon: 'eraser'
105+
model: ''
106+
class: ''
107+
- label: 'Very small'
108+
model: 'xxxsmall'
109+
class: 'font-size--xxxsmall'
110+
```
111+
112+
Now you can use your new formattings like this:
113+
114+
```yaml
115+
'Neos.NodeTypes.BaseMixins:TextMixin':
116+
properties:
117+
text:
118+
ui:
119+
inline:
120+
editorOptions:
121+
formatting:
122+
'Breadlesscode.SimpleEditorExtend:Dropdowns.Colors': true
123+
```
124+
62125
## License
63126
The MIT License (MIT). Please see [License File](LICENSE) for more information.

0 commit comments

Comments
 (0)