You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a course author, I'd like to both embed 'resource' content and also link to it!
Currently we support embedding resources into Markdown via a 'resource' node ("resourceEmbed") which is written out to markdown as the resource shortcode. Currently this is a block-level node, meaning it can only be rendered at the top level (not, for instance, within a paragraph).
In addition to support a block-level embed (think an embedded video or something like that) we'd also like to support linking to resource content. These links should be inline-able within text content too, to support linking to resources freely within any part of the course content (see the 'Grading' section of this syllabus for an example: https://ocw.mit.edu/courses/chemistry/5-310-laboratory-chemistry-fall-2019/syllabus/).
To support this we should add a 'resource-link' node type to CKEditor, and serialize it to and from a resource_link shortcode. This will let us enforce different restrictions in the markdown editor for where these two nodes can be inserted, and it will also let us render them differently with Hugo.
Questions
Should we rename the existing shortcode from resource to resource-embed ?
This introduces a new dependency on our custom resource link plugin,
which is based on the code for CKEditor's standard link plugin. This
allows resource links to be inlined in the text rather than being block
nodes, by storing the UUID for the link as an attribute on a range of
text.
Resource links are translated to the `resource_link` shortcode, like
this:
```
{{< resource_link uuidforaresource "text inside the link" >}}
```
This change also required some changes to how we open the resource
picker and some related things. Now instead of having one 'Add resource'
button we now have 'Embed resource' and 'Link resource' buttons.
Together these make it a little less ambiguous for the user (at least,
that is the hope!)
closes#607closes#612
part of #536
unassigning myself, I left some comments on #615 on how to go forward on that, and I think #616 is pretty straightforward to do (it should be fairly similar to toggling italic or bold on a span of text).
As a course author, I'd like to both embed 'resource' content and also link to it!
Currently we support embedding resources into Markdown via a 'resource' node (
"resourceEmbed"
) which is written out to markdown as theresource
shortcode. Currently this is a block-level node, meaning it can only be rendered at the top level (not, for instance, within a paragraph).In addition to support a block-level embed (think an embedded video or something like that) we'd also like to support linking to resource content. These links should be inline-able within text content too, to support linking to resources freely within any part of the course content (see the 'Grading' section of this syllabus for an example: https://ocw.mit.edu/courses/chemistry/5-310-laboratory-chemistry-fall-2019/syllabus/).
To support this we should add a 'resource-link' node type to CKEditor, and serialize it to and from a
resource_link
shortcode. This will let us enforce different restrictions in the markdown editor for where these two nodes can be inserted, and it will also let us render them differently with Hugo.Questions
resource
toresource-embed
?Acceptance Criteria:
The text was updated successfully, but these errors were encountered: