# Feature OP-14939 - Text editor macro: Create work package from selected text to break down necessary tasks (task extraction)

Project: OpenProject
Status: in specification
URL: https://community.openproject.org/work_packages/OP-14939

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Sprint |  |
| Backlog bucket |  |
| Votes | 6 |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

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

## Details

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

## People

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

## Estimates and progress

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

## Description

I am not sure if that was already specified somewhere else. I could not find anything.

**As** a user that is editing a text such as a work package description, a wiki page or a meeting agenda protocol  
**I want to** quickly break down and assign tasks (work packages) based on the current text  
**so that** the text becomes "executable"

  - Assign a person that is responsible and accountable

  - Notify that person

  - Reference the new work packages right where the text was selected so that we can follow up on them later.

**Acceptance criteria**

  - Add a button to the rich text editor's toolbar

  - make the same button available on text selection via contextual menu (CKeditor5 allows that)

  - A click on that button
    
      - takes the selected text
    
      - opens a work package creation form in modal
        
          - pastes the selected text into the subject field
        
          - tries to set the parent work package if available, otherwise adds a link to the original context into the description of the new work package. "Extracted from here"
    
      - After creation of the work package a double or triple hash sign plus the new work package ID get places where the originally selected text was `##<work-package-id>` so original context links to the extracted work package.
