Enum ElementType

ElementType

Lista wszystkich typów elementów.

Aby wywołać wyliczenie, wywołaj jej klasę nadrzędną, nazwę i właściwość. Na przykład: DocumentApp.ElementType.BODY_SECTION.

Aby sprawdzić typ danego elementu, użyj wyliczenia ElementType, na przykład:

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);
}

Właściwości

WłaściwośćTypOpis
BODY_SECTIONEnumTyp odpowiadający elementowi Body.
COMMENT_SECTIONEnumTyp odpowiadający elementowi CommentSection.
DATEEnumTyp odpowiadający elementowi Date.
DOCUMENTEnumTyp odpowiadający elementowi głównemu dokumentu.
EQUATIONEnumTyp odpowiadający elementowi Equation.
EQUATION_FUNCTIONEnumTyp odpowiadający elementowi EquationFunction.
EQUATION_FUNCTION_ARGUMENT_SEPARATOREnumTyp odpowiadający elementowi EquationFunctionArgumentSeparator.
EQUATION_SYMBOLEnumTyp odpowiadający elementowi EquationSymbol.
RICH_LINKEnumTyp odpowiadający elementowi RichLink.
FOOTER_SECTIONEnumTyp odpowiadający elementowi FooterSection.
FOOTNOTEEnumTyp odpowiadający elementowi Footnote.
FOOTNOTE_SECTIONEnumTyp odpowiadający elementowi FootnoteSection.
HEADER_SECTIONEnumTyp odpowiadający elementowi HeaderSection.
HORIZONTAL_RULEEnumTyp odpowiadający elementowi HorizontalRule.
INLINE_DRAWINGEnumTyp odpowiadający elementowi InlineDrawing.
INLINE_IMAGEEnumTyp odpowiadający elementowi InlineImage.
LIST_ITEMEnumTyp odpowiadający elementowi ListItem.
PAGE_BREAKEnumTyp odpowiadający elementowi PageBreak.
PARAGRAPHEnumTyp odpowiadający elementowi Paragraph.
PERSONEnumTyp odpowiadający elementowi Person.
TABLEEnumTyp odpowiadający elementowi Table.
TABLE_CELLEnumTyp odpowiadający elementowi TableCell.
TABLE_OF_CONTENTSEnumTyp odpowiadający elementowi TableOfContents.
TABLE_ROWEnumTyp odpowiadający elementowi TableRow.
TEXTEnumTyp odpowiadający elementowi Text.
UNSUPPORTEDEnumTyp odpowiadający atrybutowi UnsupportedElement. Nieobsługiwane elementy reprezentują fragmenty dokumentu, które nie obsługują obsługi skryptów.