Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Google Tài liệu là một giải pháp tài liệu dựa trên đám mây, có tính năng cộng tác theo thời gian thực và các công cụ mạnh mẽ để soạn thảo, chỉnh sửa và chia sẻ tài liệu.
Bạn có thể mở rộng Tài liệu bằng các tiện ích bổ sung giúp cải thiện quy trình làm việc theo cách tuỳ chỉnh, thiết lập khả năng kết nối với các hệ thống của bên thứ ba và tích hợp tài liệu với các ứng dụng khác của Google Workspace (chẳng hạn như Google Trang trình bày).
Sau đây là một số việc bạn có thể làm với một tiện ích bổ sung mở rộng Google Tài liệu:
Bạn có thể đọc, chỉnh sửa, hình dung và định dạng văn bản trong Google Tài liệu bằng Dịch vụ tài liệu Apps Script tích hợp. Dịch vụ này cũng cho phép bạn tạo và sửa đổi các bảng, hình ảnh, bản vẽ và phương trình xuất hiện trong Google Tài liệu.
Bạn có thể sử dụng trình kích hoạt của tiện ích bổ sung để chạy các hàm được chỉ định khi một số sự kiện kích hoạt nhất định xảy ra.
Tiện ích bổ sung cho Tài liệu được tạo bằng Apps Script. Để tìm hiểu thêm về cách truy cập và quản lý Google Tài liệu bằng Apps Script, hãy xem phần Mở rộng Google Tài liệu.
Cấu trúc tài liệu
Các tài liệu được tạo trong Google Tài liệu có cấu trúc nội bộ dạng cây (tương tự như HTML hoặc JSON) xác định vị trí và cách văn bản, hình ảnh, bảng và các phần tử khác xuất hiện. Dịch vụ Tài liệu của Apps Script xác định một số lớp (chẳng hạn như Paragraph hoặc Table) để giúp quản lý các loại phần tử khác nhau.
Hãy xem phần Cấu trúc của một tài liệu để tìm hiểu về các lớp phần tử này và các quy tắc chi phối cách sắp xếp của chúng.
Điều kiện kích hoạt
Điều kiện kích hoạt của Apps Script cho phép một dự án tập lệnh thực thi một hàm cụ thể khi đáp ứng một số điều kiện, chẳng hạn như khi một tài liệu được mở hoặc khi một tiện ích bổ sung được cài đặt.
Hãy xem phần trình kích hoạt tiện ích bổ sung để biết thêm thông tin về những trình kích hoạt có thể dùng với tiện ích bổ sung cho Tài liệu và những quy định hạn chế áp dụng cho việc sử dụng trình kích hoạt.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-31 UTC."],[[["\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,["[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\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\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\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\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."]]