Skip to content

Label/Description for custom tags - #3329

Open
mnocon wants to merge 4 commits into
4.6from
customtag-translations
Open

Label/Description for custom tags#3329
mnocon wants to merge 4 commits into
4.6from
customtag-translations

Conversation

@mnocon

@mnocon mnocon commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Target: 4.6 5.0, 6.0

Doc for https://github.com/ibexa/fieldtype-richtext/pull/326/changes

This needs a couple of changes when merged to 5.0:

  • ezrichtext becomes ibexa_richtext
  • icon paths change

@github-actions

Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:

@mnocon
mnocon force-pushed the customtag-translations branch from 9da1b53 to 55e56dd Compare July 29, 2026 14:56
@mnocon
mnocon marked this pull request as ready for review July 30, 2026 07:37
Comment thread docs/content_management/rich_text/extend_online_editor.md Outdated
@mnocon
mnocon force-pushed the customtag-translations branch from aa1ad0e to 4c00de2 Compare July 31, 2026 07:27
@github-actions

Copy link
Copy Markdown

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/back_office/online_editor/custom_tags/factbox/config/packages/custom_tags.yaml

docs/content_management/rich_text/extend_online_editor.md@25:```yaml
docs/content_management/rich_text/extend_online_editor.md@26:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/config/packages/custom_tags.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@27:```


code_samples/back_office/online_editor/custom_tags/factbox/config/packages/custom_tags.yaml

docs/content_management/rich_text/extend_online_editor.md@25:```yaml
docs/content_management/rich_text/extend_online_editor.md@26:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/config/packages/custom_tags.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@27:```

001⫶ibexa:
002⫶ system:
003⫶ admin_group:
004⫶ fieldtypes:
005⫶ ezrichtext:
006⫶ custom_tags: [factbox]
007⫶ toolbar:
008⫶ custom_tags_group:
009⫶ buttons:
010⫶ factbox:
011⫶ priority: 5
012⫶ibexa_fieldtype_richtext:
013⫶ custom_tags:
014⫶ factbox:
015⫶ template: '@ibexadesign/field_type/ezrichtext/custom_tags/factbox.html.twig'
016⫶ icon: '/bundles/ibexaicons/img/all-icons.svg#information'
017⫶ attributes:
018⫶ name:
019⫶ type: string
020⫶ required: true
021⫶ style:
022⫶ type: choice
023⫶ required: true
024⫶ default_value: light
025⫶ choices: [light, dark]
001⫶ibexa_fieldtype_richtext:
002⫶ custom_tags:
003⫶ factbox:
004⫶ template: '@ibexadesign/field_type/ezrichtext/custom_tags/factbox.html.twig'
005⫶ icon: '/bundles/ibexaicons/img/all-icons.svg#information' # Optional
006⫶ is_inline: false # Optional
007⫶ label: 'Factbox custom tag' # Optional
008⫶ description: 'Highlight a piece of information in a box' # Optional
009⫶ attributes:
010⫶ name:
011⫶ type: string
012⫶ required: true # Optional
013⫶ label: 'My name attribute' # Optional
014⫶ style:
015⫶ type: choice
016⫶ required: true # Optional
017⫶ default_value: light
018⫶ choices: [light, dark]
019⫶ label: 'My style attribute' # Optional
020⫶
021⫶ibexa:
022⫶ system:
023⫶ admin_group:
024⫶ fieldtypes:
025⫶ ezrichtext:
026⫶ custom_tags: [factbox]
027⫶ toolbar:
028⫶ custom_tags_group:
029⫶ buttons:
030⫶ factbox:
031⫶ priority: 5

docs/content_management/rich_text/extend_online_editor.md@107:```yaml hl_lines="7-8 13 19"
docs/content_management/rich_text/extend_online_editor.md@108:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/config/packages/custom_tags.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@109:```

001⫶ibexa_fieldtype_richtext:
002⫶ custom_tags:
003⫶ factbox:
004⫶ template: '@ibexadesign/field_type/ezrichtext/custom_tags/factbox.html.twig'
005⫶ icon: '/bundles/ibexaicons/img/all-icons.svg#information' # Optional
006⫶ is_inline: false # Optional
007❇️ label: 'Factbox custom tag' # Optional
008❇️ description: 'Highlight a piece of information in a box' # Optional
009⫶ attributes:
010⫶ name:
011⫶ type: string
012⫶ required: true # Optional
013❇️ label: 'My name attribute' # Optional
014⫶ style:
015⫶ type: choice
016⫶ required: true # Optional
017⫶ default_value: light
018⫶ choices: [light, dark]
019❇️ label: 'My style attribute' # Optional
020⫶
021⫶ibexa:
022⫶ system:
023⫶ admin_group:
024⫶ fieldtypes:
025⫶ ezrichtext:
026⫶ custom_tags: [factbox]
027⫶ toolbar:
028⫶ custom_tags_group:
029⫶ buttons:
030⫶ factbox:
031⫶ priority: 5


code_samples/back_office/online_editor/custom_tags/factbox/config/packages/jms_translation.yaml



code_samples/back_office/online_editor/custom_tags/factbox/config/packages/jms_translation.yaml

docs/content_management/rich_text/extend_online_editor.md@123:```yaml hl_lines="6 8-9"
docs/content_management/rich_text/extend_online_editor.md@124:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/config/packages/jms_translation.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@125:```

001⫶jms_translation:
002⫶ configs:
003⫶ app_translation_config:
004⫶ dirs: ['%kernel.project_dir%/src']
005⫶ output_dir: '%kernel.project_dir%/translations'
006❇️ output_format: yaml
007⫶ extractors:
008❇️ - 'app.translation_extractor.factbox'
009❇️ - 'app.translation_extractor.factbox_choice'


code_samples/back_office/online_editor/custom_tags/factbox/config/services.yaml


code_samples/back_office/online_editor/custom_tags/factbox/config/services.yaml

docs/content_management/rich_text/extend_online_editor.md@117:```yaml hl_lines="7 17"
docs/content_management/rich_text/extend_online_editor.md@118:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/config/services.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@119:```

001⫶services:
002⫶ app.extractor.custom_tag:
003⫶ class: Ibexa\FieldTypeRichText\Translation\Extractor\CustomTagExtractor
004⫶ arguments:
005⫶ $customTags: '%ibexa.field_type.richtext.custom_tags%'
006⫶ $domain: '%ibexa.field_type.richtext.custom_tags.translation_domain%'
007❇️ $allowlist: ['factbox']
008⫶ tags:
009⫶ - name: jms_translation.extractor
010⫶ alias: app.translation_extractor.factbox
011⫶
012⫶ app.extractor.custom_tag_choice:
013⫶ class: Ibexa\FieldTypeRichText\Translation\Extractor\ChoiceAttributeExtractor
014⫶ arguments:
015⫶ $customTags: '%ibexa.field_type.richtext.custom_tags%'
016⫶ $domain: '%ibexa.field_type.richtext.custom_tags.translation_domain%'
017❇️ $allowlist: ['factbox']
018⫶ tags:
019⫶ - name: jms_translation.extractor
020⫶ alias: app.translation_extractor.factbox_choice


code_samples/back_office/online_editor/custom_tags/factbox/templates/themes/standard/field_type/ezrichtext/custom_tags/factbox.html.twig


code_samples/back_office/online_editor/custom_tags/factbox/templates/themes/standard/field_type/ezrichtext/custom_tags/factbox.html.twig

docs/content_management/rich_text/extend_online_editor.md@40:```html+twig
docs/content_management/rich_text/extend_online_editor.md@41:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/templates/themes/standard/field_type/ezrichtext/custom_tags/factbox.html.twig') =]]
docs/content_management/rich_text/extend_online_editor.md@42:```

001⫶<div class="ibexa-factbox ibexa-factbox--{{ params.style }}">
002⫶ <p>{{ params.name }}</p>
003⫶ <div>
004⫶ {{ content|raw }}
005⫶ </div>
006⫶</div>
docs/content_management/rich_text/extend_online_editor.md@48:```html+twig
docs/content_management/rich_text/extend_online_editor.md@49:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/templates/themes/standard/field_type/ezrichtext/custom_tags/factbox.html.twig') =]]
docs/content_management/rich_text/extend_online_editor.md@50:```

001⫶{{ encore_entry_link_tags('factbox') }}
002⫶
003⫶<div class="ibexa-factbox ibexa-factbox--{{ params.style }}">
004⫶ <p>{{ params.name }}</p>
005⫶ <div>
006⫶ {{ content|raw }}
007⫶ </div>
008⫶</div>


code_samples/back_office/online_editor/custom_tags/factbox/translations/custom_tags.en.yaml



code_samples/back_office/online_editor/custom_tags/factbox/translations/custom_tags.en.yaml

docs/content_management/rich_text/extend_online_editor.md@57:```yaml
docs/content_management/rich_text/extend_online_editor.md@58:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/translations/custom_tags.en.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@59:```
docs/content_management/rich_text/extend_online_editor.md@96:```yaml
docs/content_management/rich_text/extend_online_editor.md@97:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/translations/custom_tags.en.yaml') =]]
docs/content_management/rich_text/extend_online_editor.md@98:```

001⫶ezrichtext.custom_tags.factbox.label: 'Factbox'

001⫶ezrichtext.custom_tags.factbox.label: 'Factbox'
002⫶ezrichtext.custom_tags.factbox.attributes.name.label: 'Name'
003⫶ezrichtext.custom_tags.factbox.attributes.style.label: 'Style'
002⫶ezrichtext.custom_tags.factbox.description: 'Highlight a piece of information in a box'
003⫶ezrichtext.custom_tags.factbox.attributes.name.label: 'Name'
004⫶ezrichtext.custom_tags.factbox.attributes.style.label: 'Style'
005⫶ezrichtext.custom_tags.factbox.attributes.style.choice.dark.label: 'Dark'
006⫶ezrichtext.custom_tags.factbox.attributes.style.choice.light.label: 'Light'


code_samples/back_office/online_editor/custom_tags/factbox/webpack.config.js



code_samples/back_office/online_editor/custom_tags/factbox/webpack.config.js

docs/content_management/rich_text/extend_online_editor.md@82:``` js
docs/content_management/rich_text/extend_online_editor.md@83:[[= include_file('code_samples/back_office/online_editor/custom_tags/factbox/webpack.config.js') =]]
docs/content_management/rich_text/extend_online_editor.md@84:```

001⫶Encore.addStyleEntry('factbox', [
002⫶ path.resolve(__dirname, './assets/scss/factbox.scss'),
003⫶]);

Download colorized diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants