Skip to content

Comments

fix: correct the code blocks documentation#2505

Merged
nperez0111 merged 1 commit intoTypeCellOS:mainfrom
noahingh:fix-code-blocks-doc
Feb 23, 2026
Merged

fix: correct the code blocks documentation#2505
nperez0111 merged 1 commit intoTypeCellOS:mainfrom
noahingh:fix-code-blocks-doc

Conversation

@noahingh
Copy link
Contributor

@noahingh noahingh commented Feb 22, 2026

Summary

I've made two corrections to the code blocks document.

  1. Put the codeBlock field under the blockSpecs field because it's not a root field.
  2. The dark and light theme is not supported in shiki.

public extend<
AdditionalBlockSpecs extends BlockSpecs = Record<string, never>,
AdditionalInlineContentSpecs extends Record<
string,
InlineContentSpec<InlineContentConfig>
> = Record<string, never>,
AdditionalStyleSpecs extends StyleSpecs = Record<string, never>,
>(opts: {
blockSpecs?: AdditionalBlockSpecs;
inlineContentSpecs?: AdditionalInlineContentSpecs;
styleSpecs?: AdditionalStyleSpecs;
}): CustomBlockNoteSchema<
AdditionalBlockSpecs extends undefined | Record<string, never>
? BSchema
: BSchema & {
[K in keyof AdditionalBlockSpecs]: K extends string
? AdditionalBlockSpecs[K]["config"]
: never;
},
AdditionalInlineContentSpecs extends undefined | Record<string, never>
? ISchema
: ISchema & {
[K in keyof AdditionalInlineContentSpecs]: AdditionalInlineContentSpecs[K]["config"];
},
AdditionalStyleSpecs extends undefined | Record<string, never>
? SSchema
: SSchema & {
[K in keyof AdditionalStyleSpecs]: AdditionalStyleSpecs[K]["config"];
}
> {
// Merge the new specs with existing ones
Object.assign(this.opts.blockSpecs, opts.blockSpecs);
Object.assign(this.opts.inlineContentSpecs, opts.inlineContentSpecs);
Object.assign(this.opts.styleSpecs, opts.styleSpecs);
// Reinitialize the block specs with the merged specs
const {
blockSpecs,
inlineContentSpecs,
styleSpecs,
blockSchema,
inlineContentSchema,
styleSchema,
} = this.init();
this.blockSpecs = blockSpecs;
this.styleSpecs = styleSpecs;
this.styleSchema = styleSchema;
this.inlineContentSpecs = inlineContentSpecs;
this.blockSchema = blockSchema;
this.inlineContentSchema = inlineContentSchema;
return this as any;
}
}

@vercel
Copy link

vercel bot commented Feb 22, 2026

@noahingh is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@noahingh noahingh changed the title Correct the docs for code blocks fix: correct the code blocks documentation Feb 22, 2026
Copy link
Contributor

@nperez0111 nperez0111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @noahingh this is correct!

@nperez0111 nperez0111 merged commit e9a4636 into TypeCellOS:main Feb 23, 2026
0 of 2 checks passed
@noahingh noahingh deleted the fix-code-blocks-doc branch February 23, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants