-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-30393: Moved all Online Editor front-end code to the RichText Bundle #46
Conversation
826410b
to
14584b3
Compare
14584b3
to
2405988
Compare
2405988
to
8208662
Compare
Moved from AdminUI
Moved from AdminUI
Moved from AdminUI
539feee
to
cf8d087
Compare
|
||
/** | ||
* @deprecated 3.0.0 The alternative and more flexible solution will be introduced. | ||
* @deprecated 3.0.0 So you will need to update Online Editor Extra Buttons as part of eZ Platform 3.x upgrade. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: to be resolved later on.
src/bundle/Templating/Twig/Extension/RichTextConfigurationExtension.php
Outdated
Show resolved
Hide resolved
src/bundle/Templating/Twig/Extension/RichTextConfigurationExtension.php
Outdated
Show resolved
Hide resolved
src/lib/Configuration/UI/Mapper/CustomTag/ChoiceAttributeMapper.php
Outdated
Show resolved
Hide resolved
Deprecation is now reported only if user is using this setting.
Created Configuration\UI\Mapper\CustomTemplateConfigMapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, just a few comments from my side. What I find lacking is a description on what was added. I was not sure if I should write comments on the code which was most likely just moved and not even belong to you.
src/bundle/Templating/Twig/Extension/RichTextConfigurationExtension.php
Outdated
Show resolved
Hide resolved
@webhdx I've addressed all your comments. I value your input regardless of if this is a copied code or a new one. All the reviews for this PR prove that reviewing copied code is also useful. |
master (2.0@dev)
for eZ Platformv3.0
Summary
This PR moves front-end code and back-end configuration related to AlloyEditor from AdminUI, keeping there minimal code just for embedding RichText.
Backward incompatible changes
eZ.richText
with proper keys replacedeZ.adminUiConfig.alloyEditor
,eZ.adminUiConfig.richTextCustomTags
, andeZ.adminUiConfig.richTextCustomStyles
,New features
eZ.richText
.ez_richtext_config
Twig function.\EzSystems\EzPlatformRichText\API\Configuration\ProviderService
Symfony service.\EzSystems\EzPlatformRichText\SPI\Configuration\Provider
allows extending configuration by custom settings.Documentation
eZ Platform RichText Bundle exposes Twig global variable
ez_richtext_config
which contains RichText and AlloyEditor configuration. In AdminUI this configuration is exposed for front-end aseZ.richText
JavaScript variable and currently out-of-the-box provides the following configs:alloyEditor
,customStyles
,customTags
. Please note that in any case AdminUI requires the RichText Bundle to be enabled.The bundle also provides PHP API to retrieve that configuration. To use it, inject
\EzSystems\EzPlatformRichText\API\Configuration\ProviderService
(the service supports autowiring).It is also possible to extend the configuration by implementing the SPI
\EzSystems\EzPlatformRichText\SPI\Configuration\Provider
. It's enough to register service implementing that interface and autoconfigure it.TODO:
- Move
eZ.adminUiConfig.alloyEditor
toeZ.richText
,- Move
eZ.adminUiConfig.richTextCustomTags
toeZ.richText.customTags
,- Move
eZ.adminUiConfig.richTextCustomStyles
toeZ.richText.customStyles
.