Skip to content

Commit 0ae23c4

Browse files
authored
Update Sanity schema to allow italics in rich text blocks (#481)
1 parent c15b7a3 commit 0ae23c4

5 files changed

Lines changed: 20 additions & 5 deletions

File tree

src/sanity/schema/blocks/blockquote.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const blockquoteBlock: ObjectDefinition = {
1818
type: "block",
1919
styles: [{ title: "Normal", value: "normal" }],
2020
marks: {
21-
decorators: [{ title: "Bold", value: "strong" }],
21+
decorators: [
22+
{ title: "Bold", value: "strong" },
23+
{ title: "Emphasis", value: "em" },
24+
],
2225
annotations: [
2326
defineArrayMember(externalLink),
2427
defineArrayMember(internalLink),

src/sanity/schema/blocks/details.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ export const detailsBlock: ObjectDefinition = {
2121
type: "block",
2222
styles: [{ title: "Normal", value: "normal" }],
2323
marks: {
24-
decorators: [{ title: "Bold", value: "strong" }],
24+
decorators: [
25+
{ title: "Bold", value: "strong" },
26+
{ title: "Emphasis", value: "em" },
27+
],
2528
annotations: [
2629
defineArrayMember(externalLink),
2730
defineArrayMember(internalLink),

src/sanity/schema/blocks/image.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export const imageBlock = {
2828
type: "block",
2929
styles: [{ title: "Normal", value: "normal" }],
3030
marks: {
31-
decorators: [{ title: "Bold", value: "strong" }],
31+
decorators: [
32+
{ title: "Bold", value: "strong" },
33+
{ title: "Emphasis", value: "em" },
34+
],
3235
annotations: [
3336
defineArrayMember(externalLink),
3437
defineArrayMember(internalLink),

src/sanity/schema/blocks/richText.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export const richTextBlock = {
1818
{ title: "Numbered", value: "number" },
1919
],
2020
marks: {
21-
decorators: [{ title: "Bold", value: "strong" }],
21+
decorators: [
22+
{ title: "Bold", value: "strong" },
23+
{ title: "Emphasis", value: "em" },
24+
],
2225
annotations: [externalLink, internalLink],
2326
},
2427
};

src/sanity/schema/formType.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ export const formType = defineType({
3232
type: "block",
3333
styles: [{ title: "Normal", value: "normal" }],
3434
marks: {
35-
decorators: [{ title: "Bold", value: "strong" }],
35+
decorators: [
36+
{ title: "Bold", value: "strong" },
37+
{ title: "Emphasis", value: "em" },
38+
],
3639
annotations: [
3740
defineArrayMember(externalLink),
3841
defineArrayMember(internalLink),

0 commit comments

Comments
 (0)