با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
قبل از ساختن افزونه ویرایشگر خود، سهمیه ها و محدودیت های Apps Script را بررسی کنید تا مطمئن شوید طراحی پروژه شما با این دستورالعمل ها مطابقت دارد. آشنایی با این محدودیت ها در مراحل اولیه توسعه می تواند به جلوگیری از مشکلات احتمالی در آینده کمک کند. Apps Script برای توسعه افزودنی های سبک وزن برای خود، تیم یا سازمانتان ایده آل است. با این حال، اگر پیشبینی میکنید افزونهای در مقیاس بزرگ بسازید که نیاز به رسیدگی به کاربران زیادی دارد، به تأخیر کم نیاز دارد یا نیاز به کنترل کامل بر زیرساختهای شما دارد، یک افزونه Google Workspace را در یک محیط زمان اجرا متفاوت توسعه دهید.
هنگام ساختن افزونه ویرایشگر این روش کلی را دنبال کنید:
یک پروژه Apps Script ایجاد کنید.
با استفاده از سرویس HTML Apps Script داخلی، برای تعریف ظاهر و رفتار افزونه، کد بنویسید.
افزونه را تست کنید.
افزونه را منتشر کنید.
یک پروژه اسکریپت ایجاد کنید
افزونه ویرایشگر یک پروژه مستقل Apps Script است. راهنمای اسکریپت مستقل دستورالعمل هایی را برای ایجاد پروژه های جدید ارائه می دهد. شما همچنین می توانید فقط یک اسکریپت جدید باز کنید . اگر این کار را انجام دهید، فایل پروژه (در ابتدا Untitled project نام داشت) در پوشه root Drive شما قرار می گیرد.
همکاری
هنگامی که با دیگران در توسعه یک افزونه همکاری می کنید، یک حساب کاربری واحد مالک پروژه الحاقی است. هنگامی که یک افزونه منتشر می کنید، یک حساب کاربری به عنوان ناشر عمل می کند. حساب انتشار باید به پروژه اسکریپت افزودنی دسترسی ویرایش داشته باشد، اما نیازی نیست که مالک پروژه باشد.
بسیار مهم است که از موقعیتهایی که دسترسی به کد یا تنظیمات افزونه را از دست میدهید، به دلیل اینکه صاحب پروژه سازمان شما را ترک کرده است، اجتناب کنید.
برای جلوگیری از از دست دادن دسترسی به کد افزودنی، ما شما را تشویق میکنیم که هنگام همکاری در یک افزونه از درایوهای مشترک استفاده کنید. قرار دادن فایل اسکریپت افزودنی خود در یک درایو مشترک تضمین می کند که هیچ حساب کاربری تنها مالک پروژه نیست.
هنگامی که یک پروژه اسکریپت ایجاد کردید، می توانید شروع به نوشتن کد برای تعریف ظاهر و رفتار افزونه کنید. شما از Apps Script HtmlService برای ساختن رابط کاربری افزودنی - گفتگوها و نوارهای کناری - با استفاده از HTML و CSS معمولی استفاده می کنید. افزونه های ویرایشگر می توانند آیتم های منوی سفارشی را نیز تعریف کنند.
همانطور که کدنویسی می کنید، برای دستورالعمل هایی در مورد نحوه طراحی تجربه کاربری افزودنی خود به راهنمای سبک افزودنی ویرایشگر مراجعه کنید. همچنین، مطمئن شوید که وضعیتهای مختلف چرخه حیات مجوز را که افزونه شما میتواند با آن مواجه شود، درک کرده و برنامهریزی کنید.
افزونه را تست کنید
میتوانید افزونههای ویرایشگر را قبل از انتشار آزمایش کنید تا مطمئن شوید که مطابق انتظار رفتار میکنند. آزمایش از شما نیاز دارد که یک پیکربندی آزمایشی ایجاد کنید و از یک سند آزمایشی، صفحه گسترده، فرم یا ارائه استفاده کنید.
انتشار برافزای شما آن را در دسترس دیگران، چه به صورت عمومی و چه فقط برای کاربران دامنه شما، می کند. قبل از شروع فرآیند انتشار، حتماً نمای کلی انتشارات را مرور کنید.
تاریخ آخرین بهروزرسانی 2025-04-23 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-04-23 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eEditor add-ons are built using Apps Script, requiring a standalone Apps Script project and code for the add-on's functionality and user interface.\u003c/p\u003e\n"],["\u003cp\u003eThorough testing is crucial before publishing using a dedicated test configuration and sample documents, ensuring the add-on functions as intended.\u003c/p\u003e\n"],["\u003cp\u003eCollaboration involves shared ownership and access, recommending the use of shared drives and adding collaborators to the Cloud Platform project for sustained accessibility.\u003c/p\u003e\n"],["\u003cp\u003ePublishing makes the add-on accessible to others, either publicly or within a domain, involving a review process for public listings on the Google Workspace Marketplace.\u003c/p\u003e\n"],["\u003cp\u003eThe add-on's appearance and behavior are defined using Apps Script's HTML service, allowing for custom menus, dialogs, and sidebars constructed with HTML and CSS.\u003c/p\u003e\n"]]],["Begin by creating a standalone Apps Script project, which can be done via a new script or through specific instructions. Next, code the add-on's appearance and functionality using Apps Script's HTML service for the user interface. Before releasing, test the add-on with a test configuration and document. To make the add-on available to users, publish it on the Google Workspace Marketplace after ensuring the add-on complies with publication guidelines. Utilizing shared drives for code access is encouraged.\n"],null,["# Building Editor add-ons\n\nBefore building your Editor add-on, review the\n[Apps Script quotas and limitations](/apps-script/guides/services/quotas) to\nensure your project design aligns with these guidelines. Familiarizing yourself\nwith these limits early in your development process can help prevent potential\nissues later on. Apps Script is ideal for lightweight\nadd-on development for yourself, your team, or your\norganization. However, if you anticipate building a large-scale\nadd-on that needs to handle many users, requires low\nlatency, or demands full control over your infrastructure, consider developing\na Google Workspace add-on on a\n[different runtime](/workspace/add-ons/guides/alternate-runtimes) environment.\n\nFollow this general procedure when building an Editor add-on:\n\n1. Create an Apps Script project.\n2. Write code to define the add-on's appearance and behavior, using the built-in Apps Script [HTML service](/apps-script/reference/html).\n3. Test the add-on.\n4. Publish the add-on.\n\nCreate a script project\n-----------------------\n\nAn Editor add-on is a [standalone](/apps-script/guides/standalone) Apps Script\nproject. The standalone script guide provides\n[instructions to create new projects](/apps-script/guides/standalone#creating_a_standalone_script).\nYou can also just\n[open a new script](https://script.google.com/create).\nIf you do this, the project file (initially named `Untitled project`) is\nplaced in your root Drive folder.\n| **Note:** If you intend to publish your add-on, you must use a [standard Cloud Platform (GCP) project](/apps-script/guides/cloud-platform-projects#standard_cloud_platform_projects).\n\n### Collaboration\n\nWhen you collaborate with others in developing an add-on, a single user account\nowns the add-on project. When you publish an add-on, a single user account acts\nas the publisher. The publishing account must have edit access to the add-on\nscript project, but it doesn't need to be project owner.\n\n**It's very important to avoid situations where you lose access to an add-on's\ncode or settings because the owner of the project left your organization.**\n\nTo prevent losing access to add-on code, we encourage you to use\n[shared drives](/apps-script/collaborating#collaborating_with_shared_drives)\nwhen you collaborate on an add-on. Placing your add-on script file in a shared\ndrive ensures that no single account is the sole owner of the project.\n\nIt is also recommended that you\n[add collaborators to the script project's Cloud Platform (GCP) project](/apps-script/guides/cloud-platform-projects#adding_additional_owners_to_a_standard_gcp_project).\nThis helps ensure someone on your team always can access the add-on's\nCloud settings.\n| **Warning:** If you don't add collaborators to your add-on project, it is vital that you transfer ownership of the script project prior to the owner's account being shutdown or removed. Otherwise you could lose access to the add-on code and settings entirely.\n\nCode the add-on\n---------------\n\nOnce you have created a script project, you can begin writing\ncode to define the add-on appearance and behavior. You use the Apps Script\n[HtmlService](/apps-script/reference/html) to construct the add-on user\ninterface---[dialogs and sidebars](/workspace/add-ons/concepts/dialogs)---\nusing conventional HTML and CSS. Editor add-ons can define custom\n[menu items](/workspace/add-ons/concepts/menus) as well.\n\nAs you code, refer to the [Editor add-on style guide](/workspace/add-ons/guides/editor-style)\nfor guidelines on how to design your add-on user experience. Also, be sure\nyou understand and program for the different\n[authorization lifecycle states](/workspace/add-ons/concepts/editor-auth-lifecycle)\nyour add-on can encounter.\n\nTest the add-on\n---------------\n\nYou can test Editor add-ons before they are published to ensure they behave\nas expected. Testing requires you to create a\n[test configuration](/workspace/add-ons/how-tos/testing-editor-addons#create_a_test_configuration)\nand use a testing document, spreadsheet, form, or presentation.\n\nSee [Test an Editor add-on](/workspace/add-ons/how-tos/testing-editor-addons)\nfor details.\n\nPublish the add-on\n------------------\n\nPublishing your add-on makes it available to others, either publicly or just\nusers in your domain. Before you start the publishing process, be sure to\nreview the [publication overview](/workspace/add-ons/how-tos/editor-publish-overview).\n\nEditor add-ons are published to the [Google Workspace Marketplace](https://workspace.google.com/marketplace/). Publicly available add-ons\nmust complete [add-on review](/workspace/marketplace/about-app-review) before they are published.\n\nSee [Publishing an Editor add-on](/workspace/add-ons/how-tos/publishing-editor-addons)\nfor more details."]]