---
title: "Discussion on \"DraftJS Tip — Getting the bounding rect of a content block in DraftJS\" | Hashnode"
description: "Discussion on \"DraftJS Tip — Getting the bounding rect of a content block in DraftJS\". Is there a way to grab the bounding rect of a sentence in draft? Or do I need to setup some kind of decorator/custom block function to get that information?\n\nThis question has originally been asked on the official DraftJS slack group.\n\nThe blocks in ..."
url: "https://hashnode.com/posts/draftjs-tip-getting-the-bounding-rect-of-a-content-block-in-draftjs/58e4d051b9e9cddf3e4e9cd6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [DraftJS Tip — Getting the bounding rect of a content block in DraftJS](https://saiki.hashnode.dev/draftjs-tip-getting-the-bounding-rect-of-a-content-block-in-draftjs?utm_source=hashnode&utm_medium=feed)

Is there a way to grab the bounding rect of a sentence in draft? Or do I need to setup some kind of decorator/custom block function to get that information? This question has originally been asked on the official DraftJS slack group. The blocks in ...

Apr 5, 2017 · 1 min read · saiki.hashnode.dev  
Updated Apr 30, 2022  
Read the article

-   [#draftjs](https://hashnode.com/tag/draftjs)

## Written by

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

@saiki · Bangalore, India

  
[View profile](https://hashnode.com/@saiki)

Engineering an eGovernance Product | Hashnode Alumnus | I love pixel art

I have been in love with computers and everything related since I played my first game of Dangerous Dave back in the 90s. Graduating with a master&#39;s degree in Biology, and a bachelor&#39;s in Pharmacy; I have been fortunate enough to dabble my hands in things ranging from copywriting to computer networks. I love pixel art! I&#39;ve written a few more things about me, here and here !

## Responses 1

Markdown supported · ⌘↵ to post

[Arihant](https://hashnode.com/@arihant)

[Nov 21, 2017](https://hashnode.com/posts/draftjs-tip-getting-the-bounding-rect-of-a-content-block-in-draftjs/58e4d051b9e9cddf3e4e9cd6/comment/5a147884a328d0457c8f4b95)

This helped big time! Thanks again [Sai](https://hashnode.com/@saiki "Sai Kishore Komanduri's Profile - Hashnode")!

[Sai Kishore Komanduri](https://hashnode.com/@saiki)

[Nov 21, 2017](https://hashnode.com/posts/draftjs-tip-getting-the-bounding-rect-of-a-content-block-in-draftjs/58e4d051b9e9cddf3e4e9cd6/comment/5a147884a328d0457c8f4b95#reply-5a147d46a328d0457c8f4baa)

I'm glad it was of help! :)
