Open ragesoss opened 7 years ago
I would like to work on this one
@majakomel is this https://css-tricks.com/snippets/jquery/open-external-links-in-new-window/ - ok trick?
I have opened PR #1397 but it solves the issue only for links in course description (needed only markdown parser config). Timeline content is unlike course description stored as HTML and Trix editor doesn't have this option. I could either parse the content and add target="_blank"
attribute to <a>
before saving to the db or probably better solution, use suggestion @testa19 offered. I'm just not sure in which js file this kind of snippet belongs.
@testa19 one other option that might fix it 90% of the way would be to add target="_blank" to all the pregenerated timeline html from the wizard content.yml files. I'm not sure whether Trix will strip that out upon saving an edit, though.
The description is the more important part. I definitely don't want to resort to jquery to define that behavior. If we're going to do it for the Trix html, I think we should keep it within the React domain. It looks like there are some possible approaches discussed here:
The course description fix is merged.
Most of these are links to external resources, so it will be better if they open a new tab instead of navigating away.
I'm not sure whether this can be done with CSS, or whether it will require tweaks to the markdown parser config, or what.