Skip to content

The text in blocks has been renamed to rich_text, to be consistent with the database property type.. #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #241
KoditkarVedant opened this issue Jul 10, 2022 · 0 comments · Fixed by #262 or #276
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@KoditkarVedant
Copy link
Contributor

KoditkarVedant commented Jul 10, 2022

To be consistent with the database property type, we have renamed the text property to rich_text. This affects the following block types: paragraph, heading_1, heading_2, heading_3, callout, quote, bulleted_list_item, numbered_list_item, to_do ,toggle, code ,template.

Here is an example of the previous text property:

{
  "type": "paragraph",
  //...other keys excluded
  "paragraph": {
    "text": [{
      "type": "text",
      "text": {
        "content": "Lacinato kale",
        "link": null
      }
    }]
  }
}

Here is an example of the updated rich_text property:

{
  "type": "paragraph",
  //...other keys excluded
  "paragraph": {
    "rich_text": [{
      "type": "text",
      "text": {
        "content": "Lacinato kale",
        "link": null
      }
    }]
  }
}

Notion changelog: https://developers.notion.com/changelog/releasing-notion-version-2022-02-22

@KoditkarVedant KoditkarVedant added this to the 3.0.0 milestone Jul 10, 2022
@KoditkarVedant KoditkarVedant added enhancement New feature or request help wanted Extra attention is needed up for grabs labels Jul 10, 2022
@KoditkarVedant KoditkarVedant linked a pull request Jul 10, 2022 that will close this issue
10 tasks
@KoditkarVedant KoditkarVedant self-assigned this Jul 10, 2022
@KoditkarVedant KoditkarVedant removed help wanted Extra attention is needed up for grabs labels Jul 13, 2022
@KoditkarVedant KoditkarVedant linked a pull request Jul 17, 2022 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant