{
"type": "text",
"text": {
"content": "Some words ",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Some words ",
"href": null
}| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
type | string(列挙型) | このリッチ テキスト オブジェクトのタイプ。可能なタイプの値は次のとおりです。"text" "mention" "equation" | "text" |
text | |||
annotations | object | リッチ テキスト オブジェクトのスタイル設定に使用される情報。詳細については、以下の注釈オブジェクトのセクションを参照してください。 | 例については、以下の注釈オブジェクトのセクションを参照してください。 |
plain_text | string | 注釈なしのプレーン テキスト。 | "Some words " |
href | string(オプション) | このテキスト内のリンクまたは Notion に関する言及がある場合は、その URL。 | "https://www.notion.so/Avocado-d093f1d200464ce78b36e58a3f0d8043" |
annotationsオブジェクトが含まれています。annotationsには次のフィールドが含まれます。| 財産 | タイプ | 説明 | 例の値 |
|---|---|---|---|
bold | boolean | テキストを太字にするかどうか。 | true |
italic | boolean | テキストを斜体にするかどうか。 | true |
strikethrough | boolean | テキストに取り消し線を引くかどうか。 | false |
underline | boolean | テキストに下線を付けるかどうか。 | false |
code | boolean | テキストがcode style かどうか。 | true |
color | string(列挙型) | テキストの色。 可能な値は次の とおりです。 -"blue" "blue_background" "brown" "brown_background" "default" "gray" "gray_background" "green" "green_background" "orange" "orange_background" "pink" "pink_background" "purple" "purple_background" "red" "red_background” "yellow" "yellow_background" | "green" |
"equation"タイプ値が のリッチ テキスト オブジェクトとしてインライン LaTeX 方程式をサポートします。対応の方程式タイプ オブジェクトには、次のものが含まれます。| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
expression | string | インライン式を表す LaTeX 文字列。 | "\frac{{ - b \pm \sqrt {b^2 - 4ac} }}{{2a}}" |
equationオブジェクトの例{
"type": "equation",
"equation": {
"expression": "E = mc^2"
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "E = mc^2",
"href": null
}@を入力すると、Notion UI にメンションが作成されます 。type値が "mention"の場合、対応のmentionオブジェクトには次のものが含まれます。| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
type | string (列挙型) | インライン メンションのタイプ。可能な値は次のとおりです。 -"database" "date" "link_preview" "page" "template_mention" "user" | "user" |
database | date | link_preview | page |
databaseフィールド内のデータベース参照が含まれます 。 データベース参照は、idキーとデータベース ID に対応するキーと文字列値 (UUIDv4)を持つオブジェクトです 。plain_text値は "Untitled"として表示され、注釈オブジェクトの値はデフォルトです。databaseメンションのリッチ テキストmentionオブジェクトの例{
"type": "mention",
"mention": {
"type": "database",
"database": {
"id": "a1d8501e-1ac1-43e9-a6bd-ea9fe6c8822b"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Database with test things",
"href": "https://www.notion.so/a1d8501e1ac143e9a6bdea9fe6c8822b"
}dateフィールド内の 日付プロパティ値オブジェクトが含まれます 。mentionオブジェクトのdateメンション例{
"type": "mention",
"mention": {
"type": "date",
"date": {
"start": "2022-12-16",
"end": null
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "2022-12-16",
"href": null
}type値がlink_preview のリッチ テキスト オブジェクトとして処理します。リンク プレビューのリッチ テキスト メンションには、リンク プレビュー メンションの作成に使用される urlを含む対応するlink_previewオブジェクトが含まれます。mentionオブジェクトのlink_previewメンション例{
"type": "mention",
"mention": {
"type": "link_preview",
"link_preview": {
"url": "https://workspace.slack.com/archives/C04PF0F9QSD/z1671139297838409?thread_ts=1671139274.065079&cid=C03PF0F9QSD"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "https://workspace.slack.com/archives/C04PF0F9QSD/z1671139297838409?thread_ts=1671139274.065079&cid=C03PF0F9QSD",
"href": "https://workspace.slack.com/archives/C04PF0F9QSD/z1671139297838409?thread_ts=1671139274.065079&cid=C03PF0F9QSD"
}pageフィールド内のページ参照が含まれます 。 ページ参照は、ページ ID に対応するidプロパティと文字列値 (UUIDv4)を持つオブジェクトです 。plain_text値は "Untitled"として表示され、注釈オブジェクトの値はデフォルトです。mentionオブジェクトのpageメンション例{
"type": "mention",
"mention": {
"type": "page",
"page": {
"id": "3c612f56-fdd0-4a30-a4d6-bda7d7426309"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "This is a test page",
"href": "https://www.notion.so/3c612f56fdd04a30a4d6bda7d7426309"
}"template_mention_date"または "template_mention_user"のいずれ か のネストされた typeキーを 持つオtemplate_mentionブジェクトが含まれます。typeキーが "template_mention_date"の 場合 、リッチ テキスト オブジェクトには次のtemplate_mention_dateフィールドが含まれます。| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
template_mention_date | string (列挙型) | 日付言及のタイプ。可能な値は 次のとおり です。"today" "now" | "today" |
mentionオブジェクトのtemplate_mention_dateメンション例{
"type": "mention",
"mention": {
"type": "template_mention",
"template_mention": {
"type": "template_mention_date",
"template_mention_date": "today"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "@Today",
"href": null
}"template_mention_user" の場合 、リッチ テキスト オブジェクトには次のtemplate_mention_userフィールドが含まれます。| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
template_mention_user | string (列挙型) | ユーザー メンションのタイプ。可能な値は だけです 。"me" | "me" |
mentionオブジェクトのtemplate_mention_userメンション例{
"type": "mention",
"mention": {
"type": "template_mention",
"template_mention": {
"type": "template_mention_user",
"template_mention_user": "me"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "@Me",
"href": null
}type値が "user"の場合、対応するユーザー フィールドには ユーザー オブジェクトが含まれます。📘
インテグレーションがまだ前述のユーザーにアクセスできない場合、ユーザーの名前を含む plain_textは"@Anonymous"として読み取られます。ユーザーにアクセスできるように統合を更新するには、統合設定ページで統合機能を更新します。
mentionオブジェクトのuserメンション例{
"type": "mention",
"mention": {
"type": "user",
"user": {
"object": "user",
"id": "b2e19928-b427-4aad-9a9d-fde65479b1d9"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "@Anonymous",
"href": null
}type値が"text" の場合、対応するtextフィールドには次のようなオブジェクトが含まれます。| 分野 | タイプ | 説明 | 例の値 |
|---|---|---|---|
content | string | テキストの実際のテキスト コンテンツ。 | "Some words " |
link | object (オプション) | 含まれている場合、このテキスト内のインライン リンクに関する情報を含むオブジェクト。 テキストにインライン リンクが含まれている場合、オブジェクト キーは url で、値は URL の文字列 Web アドレスです。テキストにインライン リンクがない場合、値は nullです。 | { "url": "https://developers.notion.com/" } |
textオブジェクトの例{
"type": "text",
"text": {
"content": "This is an ",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "This is an ",
"href": null
}text オブジェクトの例{
"type": "text",
"text": {
"content": "inline link",
"link": {
"url": "https://developers.notion.com/"
}
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "inline link",
"href": "https://developers.notion.com/"
}📘リッチ テキスト オブジェクトの制限
リッチ テキスト オブジェクトのサイズ制限については、リクエスト制限のドキュメント ページを参照してください。