Enum ElementType

Restez organisé à l'aide des collections Enregistrez et classez les contenus selon vos préférences.
Type d'élément

Énumération de tous les types d'éléments.

Utilisez l'énumération ElementType pour vérifier le type d'un élément donné, par exemple:

var firstChild = DocumentApp.getActiveDocument().getBody().getChild(0);
if (firstChild.getType() == DocumentApp.ElementType.PARAGRAPH) {
  // It's a paragraph, apply a paragraph heading.
  firstChild.asParagraph().setHeading(DocumentApp.ParagraphHeading.HEADING1);
}

Propriétés

PropriétéTypeDescription
BODY_SECTIONEnumType correspondant à l'élément Body.
COMMENT_SECTIONEnumType correspondant à l'élément CommentSection.
DATEEnumType correspondant à l'élément Date.
DOCUMENTEnumType correspondant à la racine du document.
EQUATIONEnumType correspondant à l'élément Equation.
EQUATION_FUNCTIONEnumType correspondant à l'élément EquationFunction.
EQUATION_FUNCTION_ARGUMENT_SEPARATOREnumType correspondant à l'élément EquationFunctionArgumentSeparator.
EQUATION_SYMBOLEnumType correspondant à l'élément EquationSymbol.
RICH_LINKEnumType correspondant à l'élément RichLink.
FOOTER_SECTIONEnumType correspondant à l'élément FooterSection.
FOOTNOTEEnumType correspondant à l'élément Footnote.
FOOTNOTE_SECTIONEnumType correspondant à l'élément FootnoteSection.
HEADER_SECTIONEnumType correspondant à l'élément HeaderSection.
HORIZONTAL_RULEEnumType correspondant à l'élément HorizontalRule.
INLINE_DRAWINGEnumType correspondant à l'élément InlineDrawing.
INLINE_IMAGEEnumType correspondant à l'élément InlineImage.
LIST_ITEMEnumType correspondant à l'élément ListItem.
PAGE_BREAKEnumType correspondant à l'élément PageBreak.
PARAGRAPHEnumType correspondant à l'élément Paragraph.
PERSONEnumType correspondant à l'élément Person.
TABLEEnumType correspondant à l'élément Table.
TABLE_CELLEnumType correspondant à l'élément TableCell.
TABLE_OF_CONTENTSEnumType correspondant à l'élément TableOfContents.
TABLE_ROWEnumType correspondant à l'élément TableRow.
TEXTEnumType correspondant à l'élément Text.
UNSUPPORTEDEnumType correspondant à UnsupportedElement. Les éléments non compatibles représentent des parties de document qui ne sont pas compatibles avec les scripts.