Content
Updated by Bruno Pagno 4 days ago
For the HackDays in Paris we created a variation of OpenProject in which we used BlockNote for creating work package comments <mention class="mention" data-id="63508" data-type="work_package" data-text="#63508">#63508</mention> . We want to keep those effort for the future. Would be nice to have it cleaned up so far and behind a feature flag, so that we can activate it whenever we need it. Also, that we can continue the development on it whenever our road-map is ready for it.
**Acceptance criteria**
* There is a feature flag \`Block note editor\`
* When it is enabled
* ~~Make BlockNote the editor for the work package comment submit~~
* Decided not to because it would cause extra risk and maintenance on the activity tab
* ~~Make BlockNote the editor for the Wiki~~
* We decided not make it part of the wiki to prevent any possible data inconsistencies between CKEditor and BlockNote
* Make BlockNote the editor for Documents (module)
**How to test**
* Go to _/admin/settings/experimental_
* Enable the _Block note editor_ feature flag
* Go to _admin/settings/document\_categories_ and create a document category called "**Experimental**"
* Go to any project with the documents module enabled (or enable it)
* Go to the documents module and save a document with the category "**Experimental**"
* Edit such document
* See the BlockNote editor
**Additional changes**
To be able to properly implement this feature it was necessary to "primerize" the Documents form. This means the UI changes slightly, even when the BlockNote editor is not visible
_Before:_
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/707589/content">
_After:_
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/707590/content">
**Out of scope**
* Replace all other instances of CKEditor 5, e.g. work package description.
* Guaranteeing any CKEditor specific functionality (e.g. @mentions or #expressions)
**Acceptance criteria**
* There is a feature flag \`Block note editor\`
* When it is enabled
* ~~Make BlockNote the editor for the work package comment submit~~
* Decided not to because it would cause extra risk and maintenance on the activity tab
* ~~Make BlockNote the editor for the Wiki~~
* We decided not make it part of the wiki to prevent any possible data inconsistencies between CKEditor and BlockNote
* Make BlockNote the editor for Documents (module)
**How to test**
* Go to _/admin/settings/experimental_
* Enable the _Block note editor_ feature flag
* Go to _admin/settings/document\_categories_ and create a document category called "**Experimental**"
* Go to any project with the documents module enabled (or enable it)
* Go to the documents module and save a document with the category "**Experimental**"
* Edit such document
* See the BlockNote editor
**Additional changes**
To be able to properly implement this feature it was necessary to "primerize" the Documents form. This means the UI changes slightly, even when the BlockNote editor is not visible
_Before:_
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/707589/content">
_After:_
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/707590/content">
**Out of scope**
* Replace all other instances of CKEditor 5, e.g. work package description.
* Guaranteeing any CKEditor specific functionality (e.g. @mentions or #expressions)