-
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-31231: Fixed storing align and anchor attributes for custom styles #166
Conversation
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.
LGTM 👍
src/lib/eZ/RichText/Resources/stylesheets/xhtml5/edit/docbook.xsl
Outdated
Show resolved
Hide resolved
Co-authored-by: Konrad Oboza <34310128+konradoboza@users.noreply.github.com>
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.
Not sure why you needed to change edit mode output, we only needed to expose that for view output custom template.
The change to edit output is a BC break.
src/lib/eZ/RichText/Resources/stylesheets/docbook/xhtml5/edit/core.xsl
Outdated
Show resolved
Hide resolved
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.
To sum up #166 (comment):
Custom Tag alignment with the current changes stopped working.
Custom Style (eztemplate of "style"
type
) can have text-align instead of data-ezalign
.
Custom Tag still needs to have data-ezalign
.
src/lib/eZ/RichText/Resources/stylesheets/docbook/xhtml5/edit/core.xsl
Outdated
Show resolved
Hide resolved
@barw4, storing align and anchor works fine but user cannot link to saved anchor
Result: Clicking on the link does not lead to the place of adding the anchor. I am not sure, is it in scope of this PR and customer request or it should be reported separately? |
In order for anchor to work properly one must include it in the custom style template like this:
It's the same behavior as in custom tags as there could be plenty of HTML tags in custom style template - we cannot impose where it should be placed and we just don't know it - the end-user should do it himself. In the example above we have two tags: The same problem occurs with the |
You can merge it up. |
Align and anchor attributes were not storing and displaying properly when working with custom style, also additional option to render
id
attribute has been added in form of:where the code above is some custom style.
QA
// maintainer update:
TODO:
$ composer fix-cs
).