Skip to content
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

IBX-6077: Custom classes and attributes on table in ReichText Online Editor are not saved #106

Closed
wants to merge 2 commits into from

Conversation

vidarl
Copy link
Contributor

@vidarl vidarl commented Jul 16, 2023

Question Answer
JIRA issue IBX-6077
Bug/Improvement yes
New feature no
Target version 4.5
BC breaks no
Tests pass yes
Doc needed no

EDIT : I have made a new PR where the whole problem is solved in XSLT. I think that is a better alternative : #107

The editor used in 4.x saves tables inside a <figure> element. The editor would then save class and data-ezattribute on the <figure> element, instead of in the <table>.
We did apparently not fix our converters accordingly for 4.x.

I have solved it by making a php converter that simply copies the class and data-ezattribute attributes from <figure> to <table> element. It could have been done in XSLT too, but AFAIK we could not have reused templates like ezattribute. Instead it would be cut&paste from that template but fetching attributes from ancestor instead of current node.

I have not done anything with docbook->xhtml5.edit transformation. It seems like editor is backward compatible and also deals fine with having missing <figure> element and the attributes stored on <table> element as before..

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@vidarl vidarl changed the base branch from main to 4.5 July 16, 2023 15:05
@sonarcloud
Copy link

sonarcloud bot commented Jul 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vidarl
Copy link
Contributor Author

vidarl commented Jul 20, 2023

#107 is the way to go, so closing this one

@vidarl vidarl closed this Jul 20, 2023
@vidarl vidarl deleted the ibx-6077_custom_classes_and_attributes_table branch July 20, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants