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 uploading images through the TinyMCE Editor #1398

Open
ormsbee opened this issue Oct 17, 2024 · 3 comments
Open

Support uploading images through the TinyMCE Editor #1398

ormsbee opened this issue Oct 17, 2024 · 3 comments

Comments

@ormsbee
Copy link
Contributor

ormsbee commented Oct 17, 2024

Background

From courses, you can upload images in the editor via a modal dialog:

add-image

We need to implement this same functionality for content libraries.

Acceptance criteria:

  1. Modal dialog is triggered from the "Add Image" button in the Tiny MCE editor when editing HTML or ProblemBlock content in Content Libraries.
  2. Assets that have already been uploaded to the Component Version are displayed (this is available via the LibraryBlockAssetListView endpoint in Studio: /api/libraries/v2/blocks/{usage_key}/assets/. This endpoint does not contain the timestamp for when these assets were added, so just ignore that for display purposes.
  3. Images are selectable for insertion into the editor.
  4. Images are uploadable via the "Upload a New Image" button.
  5. Search and sort is not important for this release because we expect to only have a small handful of assets (unlike a course, which can have hundreds or thousands). Implement this only if it's easier than hiding it. The backend API currently returns results sorted by asset path (case-sensitive).
  6. Images in the list should display to the user without the 'static/' prefix, but they should insert into the OLX with the '/static/` prefix, per our OLX conventions (which we may not like, but which we will stay compatible with).
  7. This modal should work for both the HTML component and the ProblemBlock standard editor. Supporting the advanced problem editor is not required.
  8. These changes are only for libraries and should not impact the course editing experience in any way.
@ormsbee
Copy link
Contributor Author

ormsbee commented Oct 17, 2024

@Ian2012: To be clear, we want to get something thin and workable into Sumac without shooting ourselves in the foot with complexity. If there's something in here that is harder than it sounds and we can get 80% of the end goal with less effort, let's talk about it. This would be the next task after you get the inline preview working.

@jmakowski1123
Copy link

This AC looks good. I'd say we could descope the search bar and sort.

@ormsbee
Copy link
Contributor Author

ormsbee commented Oct 18, 2024

@jmakowski1123: Changed the wording of the AC so that search/sort boils down to: "Implement this only if it's easier than hiding it." Moving it to the backlog.

@ormsbee ormsbee assigned Ian2012 and unassigned Ian2012 Oct 18, 2024
kdmccormick added a commit to kdmccormick/frontend-app-course-authoring that referenced this issue Oct 24, 2024
kdmccormick added a commit to kdmccormick/frontend-app-course-authoring that referenced this issue Oct 24, 2024
kdmccormick added a commit to kdmccormick/frontend-app-course-authoring that referenced this issue 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: Backlog
Development

No branches or pull requests

3 participants