refactor(editor): support dynamic text attribute key (#12947)

#### PR Dependency Tree


* **PR #12946**
  * **PR #12947** 👈
    * **PR #12948**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
L-Sun
2025-07-02 16:09:01 +08:00
committed by GitHub
parent facf6ee28b
commit a66096cdf9
11 changed files with 101 additions and 49 deletions

View File

@@ -20,7 +20,9 @@ import { z } from 'zod';
export const CodeBlockUnitSpecExtension =
InlineSpecExtension<AffineTextAttributes>({
name: 'code-block-unit',
schema: z.undefined(),
schema: z.object({
'code-block-uint': z.undefined(),
}),
match: () => true,
renderer: ({ delta }) => {
return html`<affine-code-unit .delta=${delta}></affine-code-unit>`;