Dipnotu temsil eden bir öğe. Her Footnote
, bir ListItem
veya Paragraph
içinde yer alır ve dipnotun içerikleri için karşılık gelen bir FootnoteSection
öğesine sahiptir. Footnote
öğesinin kendisi başka öğe içeremez. Doküman yapısı hakkında daha fazla bilgi için Google Dokümanlar'ı genişletme kılavuzuna bakın.
Yöntemler
Yöntem | Dönüş türü | Kısa açıklama |
---|---|---|
copy() | Footnote | Geçerli öğenin ayrı, derin bir kopyasını döndürür. |
getAttributes() | Object | Öğenin özelliklerini alır. |
getFootnoteContents() | FootnoteSection | Dipnot öğesinin içeriğini alır. |
getNextSibling() | Element | Öğenin sonraki eşdüzey öğesini alır. |
getParent() | ContainerElement | Öğenin üst öğesini alır. |
getPreviousSibling() | Element | Öğenin önceki eşdüzey öğesini alır. |
getType() | ElementType | Öğenin ElementType değerini alır. |
isAtDocumentEnd() | Boolean | Öğenin, Document öğesinin sonunda olup olmadığını belirler. |
removeFromParent() | Footnote | Öğeyi üst öğesinden kaldırır. |
setAttributes(attributes) | Footnote | Öğenin özelliklerini ayarlar. |
Ayrıntılı belgeler
copy()
Geçerli öğenin ayrı, derin bir kopyasını döndürür.
Öğede bulunan alt öğeler de kopyalanır. Yeni öğenin bir üst öğesi yoktur.
Return
Footnote
: Yeni kopya.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getAttributes()
Öğenin özelliklerini alır.
Sonuç, geçerli her öğe özelliği için bir özellik içeren bir nesnedir. Burada her özellik adı, DocumentApp.Attribute
numaralandırmasındaki bir öğeye karşılık gelir.
var body = DocumentApp.getActiveDocument().getBody(); // Append a styled paragraph. var par = body.appendParagraph('A bold, italicized paragraph.'); par.setBold(true); par.setItalic(true); // Retrieve the paragraph's attributes. var atts = par.getAttributes(); // Log the paragraph attributes. for (var att in atts) { Logger.log(att + ":" + atts[att]); }
Return
Object
: Öğenin özellikleridir.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getFootnoteContents()
Dipnot öğesinin içeriğini alır.
Return
FootnoteSection
— dipnot bölümü
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getNextSibling()
Öğenin sonraki eşdüzey öğesini alır.
Bir sonraki kardeş aynı üst öğeye sahiptir ve geçerli öğeyi takip eder.
Return
Element
: Sonraki kardeş öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getParent()
Öğenin üst öğesini alır.
Üst öğe, geçerli öğeyi içerir.
Return
ContainerElement
: Üst öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getPreviousSibling()
Öğenin önceki eşdüzey öğesini alır.
Önceki eşdüzey öğe aynı üst öğeye sahiptir ve geçerli öğeden önce gelir.
Return
Element
: Önceki kardeş öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
getType()
Öğenin ElementType
değerini alır.
Belirli bir öğenin tam türünü belirlemek için getType()
kullanın.
var body = DocumentApp.getActiveDocument().getBody(); // Obtain the first element in the document body. var firstChild = body.getChild(0); // Use getType() to determine the element's type. if (firstChild.getType() == DocumentApp.ElementType.PARAGRAPH) { Logger.log('The first element is a paragraph.'); } else { Logger.log('The first element is not a paragraph.'); }
Return
ElementType
: Öğe türü.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
isAtDocumentEnd()
Öğenin, Document
öğesinin sonunda olup olmadığını belirler.
Return
Boolean
: Öğenin dokümanın sonunda olup olmadığı.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
removeFromParent()
Öğeyi üst öğesinden kaldırır.
var body = DocumentApp.getActiveDocument().getBody(); // Remove all images in the document body. var imgs = body.getImages(); for (var i = 0; i < imgs.length; i++) { imgs[i].removeFromParent(); }
Return
Footnote
: Kaldırılan öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents
setAttributes(attributes)
Öğenin özelliklerini ayarlar.
Belirtilen özellik parametresi, her özellik adının DocumentApp.Attribute
numaralandırmasındaki bir öğe ve her özellik değerinin ise uygulanacak yeni değer olduğu bir nesne olmalıdır.
var body = DocumentApp.getActiveDocument().getBody(); // Define a custom paragraph style. var style = {}; style[DocumentApp.Attribute.HORIZONTAL_ALIGNMENT] = DocumentApp.HorizontalAlignment.RIGHT; style[DocumentApp.Attribute.FONT_FAMILY] = 'Calibri'; style[DocumentApp.Attribute.FONT_SIZE] = 18; style[DocumentApp.Attribute.BOLD] = true; // Append a plain paragraph. var par = body.appendParagraph('A paragraph with custom style.'); // Apply the custom style. par.setAttributes(style);
Parametreler
Ad | Tür | Açıklama |
---|---|---|
attributes | Object | Öğenin özellikleri. |
Return
Footnote
: Geçerli öğe.
Yetkilendirme
Bu yöntemi kullanan komut dosyaları, aşağıdaki kapsamların biri veya daha fazlasıyla yetkilendirme gerektirir:
-
https://www.googleapis.com/auth/documents.currentonly
-
https://www.googleapis.com/auth/documents