Skip to Content Skip to Menu

Cliquable links detection in CB Activity (+ comments)

  • maxkrylov
  • maxkrylov
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
1 month 2 days ago - 1 month 2 days ago #343562 by maxkrylov
Hi Krileon, hi JoomlaPolis Team.

I'd like to report two related issues with CB Activity (itegrated into CB GroupJive) link detection in the contenteditable input field (posts and comments).

Environment:
- Community Builder 2.11.0
- CB GroupJive 3.7.0
- CB Activity 6.2.0
- Joomla 5.4.3
- Links display enables in Comment Streams


Issue 1 — Leading/trailing whitespace breaks link detection

When a user pastes a URL that contains a leading or trailing space (which commonly happens when selecting/copying text), CB Activity does not detect it as a clickable link. The URL remains plain text with no link preview.

The only workaround is to manually edit a character in the URL (e.g. remove and retype the "s" in "https") to re-trigger the link parser.

A simple trim() on the pasted content before link detection would solve this.

Issue 2 — Pasting text containing an embedded hyperlink is treated as plain text

When a user copies a block of text that contains a hyperlink (e.g. from a CB Activity post, a web page, or a document) and pastes it into a comment or post field, the entire content — including the URL — is pasted as plain text. The link parser does not detect the URL within the pasted content.

This seems to happen because the paste event inserts the clipboard's HTML as plain text into the contenteditable div, but the link detection regex only runs on direct keyboard input or clean URL-only pastes — not on mixed text+URL paste content.

Steps to reproduce (Issue 2):
1. Create a post containing some text and a URL (the URL becomes a clickable link with preview as expected)
2. Select and copy the full text of that post (text + link)
3. Paste it into a new comment or post field
4. Result: everything appears as plain text, the URL is not detected as a link


Expected behavior:
The link parser should scan pasted content for URLs and convert them to clickable links, regardless of whether the paste contains only a URL or mixed text+URL content.

I searched the forums and couldn't find this issue reported before. I will be happy to provide screenshots or additional details if needed.

Thanks for your excellent work on CB Activity and CB in general !


Best regards,
Max.
Last edit: 1 month 2 days ago by maxkrylov.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 50379
  • Thanks: 8623
  • Karma: 1472
1 month 2 days ago #343566 by krileon

Issue 1 — Leading/trailing whitespace breaks link detection

It should already be trimming pasted content. Have added a bug ticket to investigate further.

forge.joomlapolis.com/issues/9829

Issue 2 — Pasting text containing an embedded hyperlink is treated as plain text

That's actually working as expected. It doesn't handle inline links, mentions, or hashtags being pasted. contenteditable is well difficult so it's hard to handle cursor locations from the inline paste. I've added a feature ticket for a future release to try and improve this again.

forge.joomlapolis.com/issues/9830

Neither were high priority as it's frankly just not common user behavior, but will try to address both in a future release.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: maxkrylov

Please Log in or Create an account to join the conversation.

  • maxkrylov
  • maxkrylov
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
1 month 2 days ago #343570 by maxkrylov
Hello Kyle.

Thank you for your feedback. I will wait for the next release of the CB Activity and I hope that both features will be improved/fixed.


Best regards.
Max.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum