# Feature BNE-47 - Create a work package link when pasting a work package URL into BlockNote editor (Paste from clipboard)

Project: Stream BlockNote extensions
Status: closed
URL: https://community.openproject.org/work_packages/BNE-47

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Target versions | 17.7.0 |
| Sprint | Sprint 6 - Cleanup Versions backend |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| BNE-123 | Bug | Documents: cursor misplaced after block is created on work package url copy-paste | closed |  | 17.8.0 |  | Modules and project features / Documents, Modules and project features / Text editor / BlockNoteJS / OpenProject Extensions |
| BNE-122 | Bug | Documents: block from the pasted link is highlighted  | closed |  | Product Backlog |  | Modules and project features / Documents, Modules and project features / Text editor / BlockNoteJS / OpenProject Extensions |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Modules and project features / Documents, Modules and project features / Text editor / BlockNoteJS / OpenProject Extensions |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

As a user copying a link to a work package in a document  
I want not to see a plain link, but the rich link representation with additional information

**Acceptance Criteria**

*   When a link to a work package of the same OpenProject instance is pasted into BlockNote it is transformed to a link work package block
    
    *   When a markdown link is pasted, the label and markdown markup needs to be removed and should not be left over
        
*   The size is of the link is determined by the context it is pasted into (re-use the same size selection logic as when included via slash command)
    
    *   Into an empty paragraph: Card link
        
    *   Into a non-empty paragraph: Regular
        

**Technical notes**

*   [https://www.blocknotejs.org/docs/reference/editor/paste-handling](https://www.blocknotejs.org/docs/reference/editor/paste-handling)
    
*   Hint from Wieland: The nextcloud OpenProject plugin also does something like this and Titan also built support for pasting work package links into the XWiki-Integration - we could ask them on tipps on how to detect / decide on which URLs to take or maybe take a look at what is done in CKEditor for that.
