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

Links from course description and timeline should open in new tabs #1393

Open
ragesoss opened this issue Sep 13, 2017 · 5 comments
Open

Links from course description and timeline should open in new tabs #1393

ragesoss opened this issue Sep 13, 2017 · 5 comments

Comments

@ragesoss
Copy link
Member

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.

@majakomel
Copy link
Contributor

I would like to work on this one

@testa19
Copy link
Contributor

testa19 commented Sep 15, 2017

@majakomel
Copy link
Contributor

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.

@ragesoss
Copy link
Member Author

@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:

ragesoss added a commit that referenced this issue Sep 18, 2017
…ks-new-tab-#1393

Open course description links in new tab

Partially addresses #1393
@ragesoss
Copy link
Member Author

The course description fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants