-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: Styling issue in TinyMCE editor in Studio #31212
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
fix: Styling issue in TinyMCE editor in Studio #31212
Conversation
6a7a44b to
2431880
Compare
rayzhou-bit
left a comment
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! I tested this with new editor and it looks fine.
| visualEditor = this.getVisualEditor(); | ||
| raw_content = visualEditor.getContent({ | ||
| format: "text", | ||
| format: "raw", |
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.
This reverts a change in https://github.com/openedx/edx-platform/pull/30335/files#diff-bd3e3877ed43b0228f0227205afd052479229747ee194918aab121957b9b0edbR1393
@DubeySandeep @Agrendalath I don't suppose you could tell us why you made this change when upgrade TinyMCE to v5.5.1?
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.
@pdpinch, TinyMCE docs replaced all occurrences of the raw format with text between v4 and v5. These formats are undocumented, and we mistakenly assumed that this is the new way to get/set content in TinyMCE v5.
cc: @tecoholic
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.
@pdpinch What @Agrendalath mentioned in the previous comment. I made the change thinking that the TinyMCE has changed the values from raw to text as there were no references to raw as a value in the docs.
Agrendalath
left a comment
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.
Thanks for fixing this, @asadali145.
👍
- I tested this: checked that HTML changes are submitted correctly.
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
|
Although this pull request is already merged, I'm still watching it for updates. There is nothing you have to do. No action is needed from your side. Thanks again for your contribution. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
During the upgrade to TinyMCE v5, we changed the content format to `text`. However, it ignores changes in HTML tags. This reverts the format to `raw`.
…x#31500) During the upgrade to TinyMCE v5, we changed the content format to `text`. However, it ignores changes in HTML tags. This reverts the format to `raw`.
…x#31500) During the upgrade to TinyMCE v5, we changed the content format to `text`. However, it ignores changes in HTML tags. This reverts the format to `raw`.
Description
textas format instead ofrawto get the content from the editor object.Hyperlinksare also not working.Before these changes:
Screen.Recording.2022-10-27.at.3.22.01.PM.mov
After these changes:
Screen.Recording.2022-10-27.at.3.49.43.PM.mov
Supporting information
https://github.mit.edu/mitxonline/mitxonline-issues/issues/162
Testing instructions
Deadline
"None"