گسترش Google Docs با افزونهها
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Google Docs یک راه حل سند مبتنی بر ابر با همکاری بلادرنگ و ابزارهای قدرتمند برای نوشتن، ویرایش و اشتراک گذاری اسناد است.
میتوانید Docs را با افزونههایی گسترش دهید که بهبودهای گردش کار سفارشیسازی شده ایجاد میکنند، اتصال به سیستمهای شخص ثالث را ایجاد میکنند، و اسناد خود را با سایر برنامههای Google Workspace (مانند Google Slides) یکپارچه میکنند.
میتوانید افزونه Docs را ببینید که دیگران در Google Workspace Marketplace ساختهاند.
کاری که می توانید انجام دهید
در اینجا چند کار وجود دارد که می توانید با افزونه ای که Google Docs را گسترش می دهد انجام دهید:
- میتوانید با استفاده از سرویس داخلی Apps Script Document، متن را در Google Docs بخوانید، ویرایش، تجسم و قالببندی کنید. این سرویس همچنین به شما امکان می دهد جداول، تصاویر، نقشه ها و معادلات ظاهر شده در Google Docs را ایجاد و اصلاح کنید.
- شما می توانید منوهای سفارشی ایجاد کنید و چندین دیالوگ سفارشی و رابط های نوار کناری را با استفاده از HTML و CSS استاندارد تعریف کنید.
- میتوانید از محرکهای افزودنی برای اجرای توابع مشخص شده در هنگام وقوع رویدادهای راهاندازی خاص استفاده کنید.
افزونههای Docs با استفاده از Apps Script ساخته میشوند. برای کسب اطلاعات بیشتر درباره نحوه دسترسی و مدیریت Google Docs با Apps Script، به گسترش Google Docs مراجعه کنید.
ساختار سند
اسناد ایجاد شده در Google Docs دارای ساختارهای داخلی و درخت مانند (مشابه HTML یا JSON) هستند که مکان و نحوه نمایش متن، تصاویر، جداول و سایر عناصر را مشخص می کنند. سرویس Apps Script Document چندین کلاس (مانند Paragraph
یا Table
) را برای کمک به مدیریت انواع عناصر مختلف تعریف میکند.
برای آشنایی با این کلاسهای عنصر و قوانین حاکم بر ترتیب آنها، به ساختار یک سند مراجعه کنید.
محرک ها
راهاندازهای Apps Script به پروژه اسکریپت اجازه میدهد تا زمانی که شرایط خاصی وجود دارد، مانند زمانی که یک سند باز میشود یا زمانی که یک افزونه نصب میشود، یک عملکرد مشخص را اجرا کند.
برای اطلاعات بیشتر در مورد اینکه چه محرک هایی را می توان با افزونه های Docs استفاده کرد و چه محدودیت هایی برای استفاده از آنها اعمال می شود، به محرک های افزودنی مراجعه کنید.
شروع کردن
وقتی آماده نگاهی به برخی کدها هستید، نمونههای افزودنی ما را بررسی کنید، از جمله افزونه Docs Quickstart با Google Translate.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-30 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-30 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eGoogle Docs is a cloud-based document solution enabling real-time collaboration and offering robust tools for composing, editing, and sharing documents.\u003c/p\u003e\n"],["\u003cp\u003eDocs add-ons, built using Apps Script, extend functionality by enabling workflow customization, integration with third-party systems, and connectivity with other Google Workspace applications.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons can manipulate document content, create custom interfaces, and automate tasks through triggers based on specific events.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides comprehensive documentation and resources, including code samples, to guide developers in building Docs add-ons.\u003c/p\u003e\n"]]],["Google Docs is a cloud-based document solution that can be extended with add-ons via Apps Script. These add-ons can read, edit, visualize, and format text, create custom menus and dialogs, and integrate with other Google Workspace applications. Add-ons utilize Apps Script triggers to run functions when specific events occur. The documents' tree-like structure is managed through the Apps Script Document service. Resources are available, including add-on samples and a quickstart guide, to help begin developing.\n"],null,["# Extending Google Docs with add-ons\n\n[Google Docs](https://workspace.google.com/products/docs/) is a cloud-based document\nsolution with real-time collaboration and powerful tools to compose, edit,\nand share documents.\n\nYou can extend Docs with add-ons that build customized workflow improvements,\nestablish connectivity to third-party systems, and integrate your documents\nwith other Google Workspace applications (like\nGoogle Slides).\n\nYou can see the Docs add-on others have built on the\n[Google Workspace Marketplace](https://workspace.google.com/marketplace/category/works-with-doc).\n\nWhat you can do\n---------------\n\nHere are a few things you can do with an add-on that extends Google Docs:\n\n- You can read, edit, visualize, and format text in Google Docs using the built-in Apps Script [Document service](/apps-script/reference/document). The service also lets you create and modify tables, images, drawings, and equations appearing in Google Docs.\n- You can create [custom menus](/workspace/add-ons/concepts/menus) and define multiple [custom dialogs and sidebars](/workspace/add-ons/concepts/dialogs) interfaces using standard HTML and CSS.\n- You can use add-on [triggers](#triggers) to run specified functions when certain triggering events occur.\n\nDocs add-ons are built using Apps Script. To learn more about how to access\nand manage Google Docs with Apps Script, see\n[Extending Google Docs](/apps-script/guides/docs).\n\nDocument structure\n------------------\n\nThe documents created in Google Docs have internal, tree-like structures\n(similar to HTML or JSON) that define where and how text, images, tables, and\nother elements appear. The Apps Script\n[Document service](/apps-script/reference/document) defines several\nclasses (such as [`Paragraph`](/apps-script/reference/document/paragraph)\nor [`Table`](/apps-script/reference/document/table)) to help manage the\ndifferent element types.\n\nSee [Structure of a document](/apps-script/guides/docs#structure_of_a_document)\nto learn about these element classes and the rules that govern their\narrangement.\n\nTriggers\n--------\n\nApps Script **triggers** let a script project execute a specified function\nwhen certain conditions are met, such as when a document is opened or when an\nadd-on is installed.\n\nSee [add-on triggers](/workspace/add-ons/concepts/editor-triggers) for more information\non what triggers can be used with Docs add-ons and what restrictions apply to\ntheir use.\n\nGetting started\n---------------\n\nWhen you're ready to take a look at some code, check out our\n[add-on samples](/workspace/add-ons/samples), including the\n[Docs add-on Quickstart](/workspace/add-ons/editors/docs/quickstart/translate)\nfeaturing Google Translate."]]