AI Integration on Italic Links
@YousefED is already working on this.
Since Oct 8, 2025.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
Trying to perform any action using the BlockNote AI Integration on an italic link fails with the following error:
Trying to perform any action using the BlockNote AI Integration on an italic link fails with the following error:
e3e6529578fa2cc6.js:1 Uncaught (in promise) ChunkExecutionError: Tool execution failed: html diff
at Object.transform (e3e6529578fa2cc6.js:1:460951)Caused by: Error: html diff
at Object.ep [as rebaseTool] (e3e6529578fa2cc6.js:1:483874)
at async Object.execute (e3e6529578fa2cc6.js:1:481423)
at async Object.transform (e3e6529578fa2cc6.js:1:460871)
transform @ e3e6529578fa2cc6.js:1
312de30df321b361.js:1 Error calling LLM ChunkExecutionError: Tool execution failed: html diff
at Object.transform (e3e6529578fa2cc6.js:1:460951)Caused by: Error: html diff
at Object.ep [as rebaseTool] (e3e6529578fa2cc6.js:1:483874)
at async Object.execute (e3e6529578fa2cc6.js:1:481423)
at async Object.transform (e3e6529578fa2cc6.js:1:460871) (5) [{…}, {…}, {…}, {…}, {…}]
(anonymous) @ 312de30df321b361.js:1
invokeAI @ e3e6529578fa2cc6.js:1
await in invokeAI
onItemClick @ e3e6529578fa2cc6.js:1
onItemClick @ e3e6529578fa2cc6.js:1
i2 @ c9e188f9efdcb6cb.js:1
(anonymous) @ c9e188f9efdcb6cb.js:1
nS @ c9e188f9efdcb6cb.js:1
i9 @ c9e188f9efdcb6cb.js:1
cu @ c9e188f9efdcb6cb.js:1
ca @ c9e188f9efdcb6cb.js:1
l @ 312de30df321b361.js:1
Object that should be transformed( at async Object.transform (e3e6529578fa2cc6.js:1:460871) (5) [{…}, {…}, {…}, {…}, {…}]):
[
{
"role": "system",
"id": "document-state-intro",
"parts": [
{
"type": "text",
"text": "You're manipulating a selected part of a text document using HTML blocks. \n Make sure to follow the json schema provided and always include the trailing $ in ids.\n List items are 1 block with 1 list item each, so block content `<ul><li>item1</li></ul>` is valid, but `<ul><li>item1</li><li>item2</li></ul>` is invalid. We'll merge them automatically.\n This is the selection as an array of html blocks:"
}
]
},
{
"role": "system",
"id": "document-state-selection",
"parts": [
{
"type": "text",
"text": "[{\"id\":\"30714b89-769b-4a60-af60-43eda8b6611b$\",\"block\":\"<p><em><a target=\\\"_blank\\\" rel=\\\"noopener noreferrer nofollow\\\" href=\\\"https://test.de\\\">Italic Link</a></em></p>\"}]"
}
]
},
{
"role": "system",
"id": "document-state-context",
"parts": [
{
"type": "text",
"text": "This is the entire document (INCLUDING the selected text), find the selected text in there to understand the context:"
},
{
"type": "text",
"text": "[{\"block\":\"<h1>Open source software</h1>\"},{\"block\":\"<p>Open source software refers to computer programs whose source code is made available to the public, allowing anyone to view, modify, and distribute the code. This model stands in contrast to proprietary software, where the source code is kept secret and only the original creators have the right to make changes. Open projects are developed collaboratively, often by communities of developers from around the world, and are typically distributed under licenses that promote sharing and openness.</p>\"},{\"block\":\"<p>One of the primary benefits of open source is the promotion of digital autonomy. By providing access to the source code, these programs empower users to control their own technology, customize software to fit their needs, and avoid vendor lock-in. This level of transparency also allows for greater security, as anyone can inspect the code for vulnerabilities or malicious elements. As a result, users are not solely dependent on a single company for updates, bug fixes, or continued support.</p>\"},{\"block\":\"<p>Additionally, open development fosters innovation and collaboration. Developers can build upon existing projects, share improvements, and learn from each other, accelerating the pace of technological advancement. The open nature of these projects often leads to higher quality software, as bugs are identified and fixed more quickly by a diverse group of contributors. Furthermore, using open source can reduce costs for individuals, businesses, and governments, as it is often available for free and can be tailored to specific requirements without expensive licensing fees.<br><strong>Alphabet:</strong> Könnte bis 2030 wertvoller als Nvidia und Palantir zusammen werden (<em><a target=\\\"_blank\\\" rel=\\\"noopener noreferrer nofollow\\\" href=\\\"https://www.fool.com/investing/2025/09/28/prediction-1-artificial-intelligence-ai-stock-will/\\\">Deep Dive</a></em>)</p>\"},{\"block\":\"<ul><li><p class=\\\"bn-inline-content\\\"><strong>Alphabet: </strong>Könnte bis 2030 wertvoller als Nvidia und <em>Palantir</em> zusammen werden (<em><a target=\\\"_blank\\\" rel=\\\"noopener noreferrer nofollow\\\" href=\\\"https://test.de\\\">Link</a></em>)</p></li></ul>\"},{\"block\":\"<p><em><a target=\\\"_blank\\\" rel=\\\"noopener noreferrer nofollow\\\" href=\\\"https://test.de\\\">Italic Link</a></em></p>\"},{\"block\":\"<p></p>\"}]"
}
]
},
{
"role": "user",
"id": "user-prompt",
"parts": [
{
"type": "text",
"text": "Fix spelling"
}
]
},
{
"id": "fE0QgMXRatuwYRaE",
"role": "assistant",
"parts": [
{
"type": "step-start"
},
{
"type": "tool-applyDocumentOperations",
"toolCallId": "call_vJXGLjTAP7h7xLpmPd1T7u6Z",
"state": "output-available",
"input": {
"operations": [
{
"type": "update",
"id": "30714b89-769b-4a60-af60-43eda8b6611b$",
"block": "<p><em><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://test.de\">Italics Link</a></em></p>"
}
]
},
"output": {
"status": "error",
"error": "Tool execution failed: html diff"
},
"callProviderMetadata": {
"openai": {
"itemId": "fc_0b266fd264e1ca5c0068e4f7c10fb08194b12954197b951e2f"
}
}
}
]
}
]
To Reproduce
- Create Italic link ( https://stackblitz.com/edit/github-dvx2rbxa?file=src%2FApp.tsx)
- Perform any action using the BlockNote AI Integration
- Review the error in the console
The bug can alternatively be reproduced using this example of the official documentation
Misc
- Node version: Node.js v20.19.1
- Package manager: NPM
- Browser: Chrome Version 140.0.7339.133
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 772
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TypeCellOS/BlockNote
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
TypeCellOS/BlockNote#3098 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TypeCellOS/BlockNote#3073 ·
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
TypeCellOS/BlockNote#3072 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TypeCellOS/BlockNote#2949 · 1 comment ·
-
a11y
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
TypeCellOS/BlockNote#2855 ·
All issues in TypeCellOS/BlockNote
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·