تمام پاراگراف هایی که با محدوده داده شده همپوشانی دارند، گلوله می شوند. اگر محدوده مشخص شده با یک جدول همپوشانی داشته باشد، گلوله ها در سلول های جدول اعمال می شوند. سطح تودرتوی هر پاراگراف با شمارش زبانه های پیشرو در مقابل هر پاراگراف تعیین می شود.
نمیتوانید سطح تودرتوی یک گلوله موجود را تنظیم کنید. در عوض، باید گلوله را حذف کنید، تب های پیشرو را در مقابل پاراگراف قرار دهید و سپس دوباره گلوله را ایجاد کنید. برای اطلاعات بیشتر، به حذف گلولهها از فهرست مراجعه کنید.
همچنین می توانید از CreateParagraphBulletsRequest برای تغییر سبک گلوله برای لیست موجود استفاده کنید.
نمونه کد زیر یک درخواست دستهای را نشان میدهد که ابتدا متنی را در ابتدای سند وارد میکند و سپس فهرستی از پاراگرافهایی ایجاد میکند که شامل 50 کاراکتر اول است. BulletGlyphPreset از BULLET_ARROW_DIAMOND_DISC استفاده می کند که به این معنی است که سه سطح تودرتوی اول لیست گلوله ای با یک فلش، یک الماس و یک دیسک نشان داده می شوند.
این روش تمام گلوله هایی را که با محدوده داده شده همپوشانی دارند، صرف نظر از سطح تودرتو، حذف می کند. برای حفظ بصری سطح تودرتو، تورفتگی به ابتدای هر پاراگراف مربوطه اضافه می شود.
نمونه کد زیر یک درخواست دسته ای را نشان می دهد که گلوله ها را از لیست پاراگراف حذف می کند.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Work with lists\n\nThe Google Docs API supports converting plain paragraphs to bulleted lists and\nremoving bullets from paragraphs.\n\nConvert a paragraph to a list\n-----------------------------\n\nA common paragraph formatting operation is converting paragraphs into a bulleted\nlist.\n\nTo create a list, use the\n[`documents.batchUpdate`](/workspace/docs/api/reference/rest/v1/documents/batchUpdate)\nmethod and supply a\n[`CreateParagraphBulletsRequest`](/workspace/docs/api/reference/rest/v1/documents/request#createparagraphbulletsrequest).\nInclude a [`Range`](/workspace/docs/api/reference/rest/v1/documents#Range) to specify the\naffected cells and a\n[`BulletGlyphPreset`](/workspace/docs/api/reference/rest/v1/documents/request#bulletglyphpreset)\nto set the pattern for the bullet.\n\nAll paragraphs that overlap with the given range are bulleted. If the specified\nrange overlaps with a table, the bullets are applied within the table cells. The\nnesting level of each paragraph is determined by counting leading tabs in front\nof each paragraph.\n\nYou can't adjust the nesting level of an existing bullet.\nInstead, you must delete the bullet, set the leading tabs in front of the\nparagraph, and then create the bullet again. For more information, see [Remove\nbullets from a list](#remove-list).\n\nYou can also use `CreateParagraphBulletsRequest` to change the bullet style for\nan existing list.\n\nThe following code sample shows a batch request that first inserts text at the\nstart of the document, and then it creates a list from the paragraphs spanning\nthe first 50 characters. The `BulletGlyphPreset` uses\n`BULLET_ARROW_DIAMOND_DISC` which means the first three nesting levels of the\nbulleted list are represented by an arrow, a diamond, and a disc. \n\n### Java\n\n```java\nList\u003cRequest\u003e requests = new ArrayList\u003c\u003e();\nrequests.add(new Request().setInsertText(new InsertTextRequest()\n .setText(\"Item One\\n\")\n .setLocation(new Location().setIndex(1).setTabId(TAB_ID))));\n\nrequests.add(new Request().setCreateParagraphBullets(\n new CreateParagraphBulletsRequest()\n .setRange(new Range()\n .setStartIndex(1)\n .setEndIndex(50)\n .setTabId(TAB_ID))\n .setBulletPreset(\"BULLET_ARROW_DIAMOND_DISC\")));\n\nBatchUpdateDocumentRequest body = new BatchUpdateDocumentRequest().setRequests(requests);\nBatchUpdateDocumentResponse response = docsService.documents()\n .batchUpdate(DOCUMENT_ID, body).execute();\n```\n\n### Python\n\n```python\nrequests = [\n {\n 'insertText': {\n 'location': {\n 'index': 1,\n 'tabId': TAB_ID\n },\n 'text': 'Item One\\n',\n }}, {\n 'createParagraphBullets': {\n 'range': {\n 'startIndex': 1,\n 'endIndex': 50,\n 'tabId': TAB_ID\n },\n 'bulletPreset': 'BULLET_ARROW_DIAMOND_DISC',\n }\n }\n]\n\nresult = service.documents().batchUpdate(\n documentId=DOCUMENT_ID, body={'requests': requests}).execute()\n```\n**Figure 1.** Convert a paragraph to a list.\n\nRemove bullets from a list\n--------------------------\n\nTo remove bullets from a paragraph list, use the\n[`documents.batchUpdate`](/workspace/docs/api/reference/rest/v1/documents/batchUpdate)\nmethod and supply a\n[`DeleteParagraphBulletsRequest`](/workspace/docs/api/reference/rest/v1/documents/request#deleteparagraphbulletsrequest).\nInclude a [`Range`](/workspace/docs/api/reference/rest/v1/documents#Range) to specify the\naffected cells.\n\nThe method deletes all bullets that overlap with the given range, regardless of\nnesting level. To visually preserve the nesting level, indentation is added to\nthe start of each corresponding paragraph.\n\nThe following code sample shows a batch request that deletes bullets from a\nparagraph list. \n\n### Java\n\n```java\nList\u003cRequest\u003e requests = new ArrayList\u003c\u003e();\nrequests.add(new Request().setDeleteParagraphBullets(\n new DeleteParagraphBulletsRequest()\n .setRange(new Range()\n .setStartIndex(1)\n .setEndIndex(50)\n .setTabId(TAB_ID))));\n\nBatchUpdateDocumentRequest body = new BatchUpdateDocumentRequest().setRequests(requests);\nBatchUpdateDocumentResponse response = docsService.documents()\n .batchUpdate(DOCUMENT_ID, body).execute();\n```\n\n### Python\n\n```python\nrequests = [\n {\n 'deleteParagraphBullets': {\n 'range': {\n 'startIndex': 1,\n 'endIndex': 50,\n 'tabId': TAB_ID\n },\n }\n }\n]\n\nresult = service.documents().batchUpdate(\n documentId=DOCUMENT_ID, body={'requests': requests}).execute()\n```"]]