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 in description are not clickable #4950

Closed
nickvergessen opened this issue Jan 14, 2021 · 1 comment · Fixed by #4960
Closed

Links in description are not clickable #4950

nickvergessen opened this issue Jan 14, 2021 · 1 comment · Fixed by #4960

Comments

@nickvergessen
Copy link
Member

Steps to reproduce

  1. Create a conversation
  2. Edit the description:
☎️ Call every Monday at 10:00
⚙️ Development chat only
🚑 Support at https://help.nextcloud.com/c/support/spreed/52
  1. Try to click on the link

Expected behaviour

Clickable

Actual behaviour

Not clickable

Talk app

Talk app version: master

@nickvergessen
Copy link
Member Author

Better js dev:

might be doable sure
requires a proper handler in the parsing/render methods
https://github.com/nextcloud/nextcloud-vue/blob/d34d66a49959fc56b91e13a0abae65d89182f5b3/src/mixins/richEditor/index.js#L49-L74
parseContent will remove every link html elements
but the render will parse them and add them back
to have a safe html injection
so you just have to add a link regex parse that returns html
that should be it

stupid me:

https://github.com/juliushaertl/vue-richtext/blob/d1a36770cb7795841a4143f9a154a90b29a13cce/src/Link.vue
and
https://github.com/juliushaertl/vue-richtext/blob/d1a36770cb7795841a4143f9a154a90b29a13cce/src/RichText.vue#L26-L62
should be it?

Better js dev:

that is crazy complicated
why that much code to just extract a string and wrap it in a a?
If you want to inject a raw html provided by a vue component I have already a handler there
https://github.com/nextcloud/nextcloud-vue/blob/d34d66a49959fc56b91e13a0abae65d89182f5b3/src/mixins/richEditor/index.js#L102
it take a string, init the component, retrieve the html and returns it
that's how I parse the mentions, I split around users, and if the user is a mention, I render it with genSelectTemplate
that uses this.renderComponentHtml

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

Successfully merging a pull request may close this issue.

1 participant