Enum ElementType
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
উপাদান প্রকার সমস্ত উপাদান প্রকারের একটি গণনা।
একটি enum কল করার জন্য, আপনি তার পিতামাতার শ্রেণী, নাম এবং সম্পত্তি কল করুন। উদাহরণস্বরূপ, DocumentApp.ElementType.BODY_SECTION
।
প্রদত্ত উপাদানের ধরন পরীক্ষা করতে Element Type
গণনা ব্যবহার করুন, উদাহরণস্বরূপ:
const documentTab =
DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();
const firstChild = documentTab.getBody().getChild(0);
if (firstChild.getType() === DocumentApp.ElementType.PARAGRAPH) {
// It's a paragraph, apply a paragraph heading.
firstChild.asParagraph().setHeading(DocumentApp.ParagraphHeading.HEADING1);
}
বৈশিষ্ট্য
সম্পত্তি | টাইপ | বর্ণনা |
---|
BODY_SECTION | Enum | Body উপাদানের সাথে সঙ্গতিপূর্ণ প্রকার। |
COMMENT_SECTION | Enum | Comment Section উপাদানের সাথে সম্পর্কিত প্রকার। |
DATE | Enum | Date উপাদানের সাথে সম্পর্কিত প্রকার। |
EQUATION | Enum | Equation উপাদানের সাথে সম্পর্কিত প্রকার। |
EQUATION_FUNCTION | Enum | Equation Function উপাদানের সাথে সম্পর্কিত প্রকার। |
EQUATION_FUNCTION_ARGUMENT_SEPARATOR | Enum | Equation Function Argument Separator উপাদানের সাথে সম্পর্কিত প্রকার। |
EQUATION_SYMBOL | Enum | Equation Symbol উপাদানের সাথে সম্পর্কিত প্রকার। |
RICH_LINK | Enum | Rich Link এলিমেন্টের সাথে সম্পর্কিত প্রকার। |
FOOTER_SECTION | Enum | Footer Section উপাদানের সাথে সম্পর্কিত প্রকার। |
FOOTNOTE | Enum | Footnote উপাদানের সাথে সম্পর্কিত প্রকার। |
FOOTNOTE_SECTION | Enum | Footnote Section উপাদানের সাথে সম্পর্কিত প্রকার। |
HEADER_SECTION | Enum | Header Section উপাদানের সাথে সম্পর্কিত প্রকার। |
HORIZONTAL_RULE | Enum | Horizontal Rule উপাদানের সাথে সম্পর্কিত প্রকার। |
INLINE_DRAWING | Enum | Inline Drawing উপাদানের সাথে সম্পর্কিত প্রকার। |
INLINE_IMAGE | Enum | Inline Image উপাদানের সাথে সম্পর্কিত প্রকার। |
LIST_ITEM | Enum | List Item উপাদানের সাথে সম্পর্কিত প্রকার। |
PAGE_BREAK | Enum | Page Break উপাদানের সাথে সম্পর্কিত প্রকার। |
PARAGRAPH | Enum | Paragraph উপাদানের সাথে সম্পর্কিত প্রকার। |
PERSON | Enum | Person উপাদানের সাথে সম্পর্কিত প্রকার। |
TABLE | Enum | Table উপাদানের সাথে সম্পর্কিত প্রকার। |
TABLE_CELL | Enum | Table Cell উপাদানের সাথে সম্পর্কিত প্রকার। |
TABLE_OF_CONTENTS | Enum | Table Of Contents উপাদানের সাথে সম্পর্কিত প্রকার। |
TABLE_ROW | Enum | Table Row উপাদানের সাথে সম্পর্কিত প্রকার। |
TEXT | Enum | Text উপাদানের সাথে সঙ্গতিপূর্ণ প্রকার। |
UNSUPPORTED | Enum | Unsupported Element সাথে সম্পর্কিত প্রকার। অসমর্থিত উপাদানগুলি নথির অংশগুলিকে উপস্থাপন করে যা স্ক্রিপ্টিং সমর্থন করে না। |
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003e\u003ccode\u003eElementType\u003c/code\u003e is an enumeration used to identify the type of elements within a Google Doc.\u003c/p\u003e\n"],["\u003cp\u003eYou can access \u003ccode\u003eElementType\u003c/code\u003e properties using the format \u003ccode\u003eDocumentApp.ElementType.PROPERTY_NAME\u003c/code\u003e, such as \u003ccode\u003eDocumentApp.ElementType.PARAGRAPH\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetType()\u003c/code\u003e method can be used to determine the type of a specific element, enabling conditional logic based on element types.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eElementType\u003c/code\u003e supports a wide range of element types like paragraphs, tables, images, equations, and more, as detailed in the provided properties table.\u003c/p\u003e\n"]]],[],null,["# Enum ElementType\n\nElementType\n\nAn enumeration of all the element types.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nDocumentApp.ElementType.BODY_SECTION`.\n\nUse the [ElementType](#) enumeration to check the type of a given element, for instance:\n\n```javascript\nconst documentTab =\n DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();\nconst firstChild = documentTab.getBody().getChild(0);\nif (firstChild.getType() === DocumentApp.ElementType.PARAGRAPH) {\n // It's a paragraph, apply a paragraph heading.\n firstChild.asParagraph().setHeading(DocumentApp.ParagraphHeading.HEADING1);\n}\n``` \n\n### Properties\n\n| Property | Type | Description |\n|----------------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `BODY_SECTION` | `Enum` | The type corresponding to the [Body](/apps-script/reference/document/body) element. |\n| `COMMENT_SECTION` | `Enum` | The type corresponding to the CommentSection element. |\n| `DATE` | `Enum` | The type corresponding to the [Date](/apps-script/reference/document/date) element. |\n| `EQUATION` | `Enum` | The type corresponding to the [Equation](/apps-script/reference/document/equation) element. |\n| `EQUATION_FUNCTION` | `Enum` | The type corresponding to the [EquationFunction](/apps-script/reference/document/equation-function) element. |\n| `EQUATION_FUNCTION_ARGUMENT_SEPARATOR` | `Enum` | The type corresponding to the [EquationFunctionArgumentSeparator](/apps-script/reference/document/equation-function-argument-separator) element. |\n| `EQUATION_SYMBOL` | `Enum` | The type corresponding to the [EquationSymbol](/apps-script/reference/document/equation-symbol) element. |\n| `RICH_LINK` | `Enum` | The type corresponding to the [RichLink](/apps-script/reference/document/rich-link) element. |\n| `FOOTER_SECTION` | `Enum` | The type corresponding to the [FooterSection](/apps-script/reference/document/footer-section) element. |\n| `FOOTNOTE` | `Enum` | The type corresponding to the [Footnote](/apps-script/reference/document/footnote) element. |\n| `FOOTNOTE_SECTION` | `Enum` | The type corresponding to the [FootnoteSection](/apps-script/reference/document/footnote-section) element. |\n| `HEADER_SECTION` | `Enum` | The type corresponding to the [HeaderSection](/apps-script/reference/document/header-section) element. |\n| `HORIZONTAL_RULE` | `Enum` | The type corresponding to the [HorizontalRule](/apps-script/reference/document/horizontal-rule) element. |\n| `INLINE_DRAWING` | `Enum` | The type corresponding to the [InlineDrawing](/apps-script/reference/document/inline-drawing) element. |\n| `INLINE_IMAGE` | `Enum` | The type corresponding to the [InlineImage](/apps-script/reference/document/inline-image) element. |\n| `LIST_ITEM` | `Enum` | The type corresponding to the [ListItem](/apps-script/reference/document/list-item) element. |\n| `PAGE_BREAK` | `Enum` | The type corresponding to the [PageBreak](/apps-script/reference/document/page-break) element. |\n| `PARAGRAPH` | `Enum` | The type corresponding to the [Paragraph](/apps-script/reference/document/paragraph) element. |\n| `PERSON` | `Enum` | The type corresponding to the [Person](/apps-script/reference/document/person) element. |\n| `TABLE` | `Enum` | The type corresponding to the [Table](/apps-script/reference/document/table) element. |\n| `TABLE_CELL` | `Enum` | The type corresponding to the [TableCell](/apps-script/reference/document/table-cell) element. |\n| `TABLE_OF_CONTENTS` | `Enum` | The type corresponding to the [TableOfContents](/apps-script/reference/document/table-of-contents) element. |\n| `TABLE_ROW` | `Enum` | The type corresponding to the [TableRow](/apps-script/reference/document/table-row) element. |\n| `TEXT` | `Enum` | The type corresponding to the [Text](/apps-script/reference/document/text) element. |\n| `UNSUPPORTED` | `Enum` | The type corresponding to [UnsupportedElement](/apps-script/reference/document/unsupported-element). Unsupported elements represent document portions that do not support scripting. |"]]