@@ -14,7 +14,7 @@ description to the Form.
1414## Configure Form attribute
1515
1616To create a ` richtext_description ` attribute,
17- add the following configuration under the ` ibexa_form_builder_fields ` [ configuration key] ( configuration.md#configuration-files ) :
17+ add the following configuration under the ` ibexa_form_builder.fields ` [ configuration key] ( configuration.md#configuration-files ) :
1818
1919``` yaml
2020[[= include_file('code_samples/forms/custom_form_attribute/config/packages/form_attribute_config.yaml') =]]
@@ -63,15 +63,15 @@ twig:
6363
6464## Add scripts
6565
66- Now you need to enable the RichText editor. Provide the required script in a new ` public /js/formbuilder-richtext-checkbox.js` file:
66+ Now you need to enable the Rich Text editor. Provide the required script in a new ` assets /js/formbuilder-richtext-checkbox.js` file:
6767
6868` ` ` js
69- [[= include_file('code_samples/forms/custom_form_attribute/public /js/formbuilder-richtext-checkbox.js') =]]
69+ [[= include_file('code_samples/forms/custom_form_attribute/assets /js/formbuilder-richtext-checkbox.js') =]]
7070` ` `
7171
7272Then, paste the highlighted part of the code into the `webpack.config.js` file :
7373
74- ` ` ` js hl_lines="49-51 "
74+ ` ` ` js hl_lines="49"
7575[[= include_file('code_samples/forms/custom_form_attribute/webpack.config.js') =]]
7676` ` `
7777
@@ -85,7 +85,7 @@ yarn encore dev
8585
8686# # Implement Field
8787
88- Now you have to implement the Field, and make sure the value from the RichText attribute is passed on to the field form.
88+ Now you have to implement the Field, and make sure the value from the Rich Text attribute is passed on to the field form.
8989
9090Create a `src/FormBuilder/Form/Type/CheckboxWithRichtextDescriptionType.php` file.
9191
@@ -118,4 +118,16 @@ In the main menu, click **Content** -> **Forms** -> **Create content**, and sele
118118
119119You should be able to see the new section in the list of available fields :
120120
121- 
121+ 
122+
123+ When editing settings, the "Description" attribute has the Rich Text input.
124+
125+ 
126+
127+ When you enter the "Description" attribute, the Rich Text toolbar appears.
128+
129+ 
130+
131+ The preview displays the formatted text along with the checkbox and its label.
132+
133+ 
0 commit comments