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

Support library assets when doing TinyMCE Editor image URL rewriting. #1358

Closed
ormsbee opened this issue Oct 3, 2024 · 0 comments · Fixed by #1403
Closed

Support library assets when doing TinyMCE Editor image URL rewriting. #1358

ormsbee opened this issue Oct 3, 2024 · 0 comments · Fixed by #1403
Assignees

Comments

@ormsbee
Copy link
Contributor

ormsbee commented Oct 3, 2024

The code for the HTML editor currently transforms course image references in the OLX to asset keys. But this substitution was written for courses and does not work for content libraries.

For now, I've disabled the rewrites for libraries entirely with 234496b

The approach we use in courses is to convert the "/static" asset link to an AssetKey and then request that from the base URL of the LMS.

Content Library assets change with every version, because the asset URL is based on the ComponentVersion UUID. It's possible that we could reset the document_base_url with every save. It's also possible that we could create a different static asset endpoint that always shows the draft version for the purpose of showing it in the editor. One note on document_base_url: because our assets start with a "/" by OLX convention, it would have to be converted to strip that leading slash before document_base_url would work properly. (So "/static/deer.jpg" would have to become "static/deer.jpg")

Acceptance criteria:

  • images appear inline in the editor, and always display the draft version of the image
  • the OLX is still stored with the normal convention of a leading slash, like "/static/deer.jpg".
@ormsbee ormsbee moved this to Backlog in Libraries Overhaul Oct 3, 2024
@ormsbee ormsbee moved this from Backlog to In grooming in Libraries Overhaul Oct 3, 2024
@ormsbee ormsbee self-assigned this Oct 3, 2024
@ormsbee ormsbee assigned Ian2012 and unassigned ormsbee Oct 17, 2024
@ormsbee ormsbee moved this from In grooming to Backlog in Libraries Overhaul Oct 17, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Libraries Overhaul Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants