সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
বেশিরভাগ এডিটর অ্যাড-অনের জন্য, ডায়ালগ উইন্ডো এবং সাইডবার প্যানেল হল প্রাথমিক অ্যাড-অন ইউজার ইন্টারফেস। উভয়ই স্ট্যান্ডার্ড HTML এবং CSS ব্যবহার করে সম্পূর্ণরূপে কাস্টমাইজযোগ্য, এবং ব্যবহারকারী যখন সাইডবার বা ডায়ালগের সাথে ইন্টারঅ্যাক্ট করে তখন আপনি Apps Script ফাংশন চালানোর জন্য Apps Script-এর ক্লায়েন্ট-সার্ভার যোগাযোগ মডেল ব্যবহার করতে পারেন। আপনার অ্যাড-অন একাধিক সাইডবার এবং ডায়ালগ সংজ্ঞায়িত করতে পারে, কিন্তু অ্যাড-অন একবারে শুধুমাত্র একটি প্রদর্শন করতে পারে।
আপনি যখন ব্যবহারকারীকে অ্যাড-অন ইন্টারফেসে কিছু পছন্দ না করা পর্যন্ত সম্পাদকের সাথে ইন্টারঅ্যাক্ট করা থেকে বিরত রাখতে চান, একটি ডায়ালগ ব্যবহার করুন; অন্যথায় একটি সাইডবার ব্যবহার করুন।
ডায়ালগ
ডায়ালগ হল উইন্ডো প্যানেল যা প্রাথমিক সম্পাদকের বিষয়বস্তুকে ওভারলে করে। অ্যাপস স্ক্রিপ্ট ডায়ালগগুলি মডেল; যখন সেগুলি খোলা থাকে তখন ব্যবহারকারী সম্পাদক ইন্টারফেসের অন্যান্য উপাদানগুলির সাথে যোগাযোগ করতে পারে না। আপনি কন্টেন্ট এবং ডায়ালগ আকার কাস্টমাইজ করতে পারেন.
আপনি অ্যাপস স্ক্রিপ্ট কাস্টম ডায়ালগগুলির মতোই অ্যাড-অন ডায়ালগ তৈরি করেন; সাধারণ প্রস্তাবিত পদ্ধতি নিম্নরূপ:
একটি স্ক্রিপ্ট প্রকল্প ফাইল তৈরি করুন যা আপনার ডায়ালগের HTML গঠন, CSS এবং ক্লায়েন্ট-সাইড জাভাস্ক্রিপ্ট আচরণকে সংজ্ঞায়িত করে। ডায়ালগ সংজ্ঞায়িত করার সময়, এডিটর অ্যাড-অন শৈলী নির্দেশিকা পড়ুন।
ডায়ালগ খোলা থাকা অবস্থায় সার্ভার-সাইড স্ক্রিপ্ট স্থগিত করে না। ক্লায়েন্ট-সাইড জাভাস্ক্রিপ্ট google.script.run() এবং সংশ্লিষ্ট হ্যান্ডলার ফাংশন ব্যবহার করে সার্ভার-সাইডে অ্যাসিঙ্ক্রোনাস কল করতে পারে। আরও বিশদ বিবরণের জন্য, ক্লায়েন্ট-টু-সার্ভার যোগাযোগ দেখুন।
ফাইল-খোলা ডায়ালগ
ফাইল-ওপেন ডায়ালগগুলি হল পূর্ব-নির্মিত ডায়ালগ যা আপনার ব্যবহারকারীদের তাদের Google ড্রাইভ থেকে ফাইল নির্বাচন করতে দেয়৷ আপনি এটি ডিজাইন করার প্রয়োজন ছাড়াই আপনার অ্যাড-অনে একটি ফাইল-ওপেন ডায়ালগ যোগ করতে পারেন, তবে এটির জন্য কিছু অতিরিক্ত কনফিগারেশন প্রয়োজন। Google পিকার এপিআই সক্ষম করার জন্য আপনার অ্যাড-অনের ক্লাউড প্ল্যাটফর্ম প্রকল্পে অ্যাক্সেসেরও প্রয়োজন৷
সাইডবারগুলি হল প্যানেল যা সম্পাদক ইন্টারফেসের ডানদিকে প্রদর্শিত হয় এবং অ্যাড-অন ইন্টারফেসের সবচেয়ে সাধারণ প্রকার। ডায়ালগের বিপরীতে, সাইডবার খোলা থাকাকালীন আপনি সম্পাদক ইন্টারফেসের অন্যান্য উপাদানগুলির সাথে যোগাযোগ চালিয়ে যেতে পারেন। সাইডবারগুলির একটি নির্দিষ্ট প্রস্থ থাকে তবে আপনি তাদের সামগ্রী কাস্টমাইজ করতে পারেন।
আপনি Apps Script কাস্টম সাইডবারগুলির মতোই অ্যাড-অন সাইডবার তৈরি করেন; সাধারণ প্রস্তাবিত পদ্ধতি নিম্নরূপ:
একটি স্ক্রিপ্ট প্রকল্প ফাইল তৈরি করুন যা আপনার সাইডবারের HTML গঠন, CSS এবং ক্লায়েন্ট-সাইড জাভাস্ক্রিপ্ট আচরণকে সংজ্ঞায়িত করে। সাইডবার সংজ্ঞায়িত করার সময়, এডিটর অ্যাড-অন শৈলী নির্দেশিকা পড়ুন।
সাইডবার খোলা থাকা অবস্থায় সার্ভার-সাইড স্ক্রিপ্ট স্থগিত করে না। ক্লায়েন্ট-সাইড জাভাস্ক্রিপ্ট google.script.run() এবং সংশ্লিষ্ট হ্যান্ডলার ফাংশন ব্যবহার করে সার্ভার-সাইডে অ্যাসিঙ্ক্রোনাস কল করতে পারে। আরও বিশদ বিবরণের জন্য, ক্লায়েন্ট-টু-সার্ভার যোগাযোগ দেখুন।
[null,null,["2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eEditor add-ons primarily use customizable dialog windows and sidebar panels for user interfaces, built with HTML, CSS, and Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eDialogs are modal windows, overlaying editor content and preventing interaction until a choice is made, while sidebars allow continued editor interaction.\u003c/p\u003e\n"],["\u003cp\u003eBoth dialogs and sidebars are created using HtmlService to define their structure and displayed using Ui methods.\u003c/p\u003e\n"],["\u003cp\u003eFile-open dialogs are pre-built for selecting files from Google Drive but need extra configuration and Cloud Platform project access.\u003c/p\u003e\n"],["\u003cp\u003eAdd-on sidebars have a fixed width of 300 pixels and appear on the right of the editor, enabling user interaction with other editor elements.\u003c/p\u003e\n"]]],["Editor add-ons utilize customizable dialogs and sidebars as user interfaces, built with HTML, CSS, and Apps Script. Dialogs, which overlay the editor, prevent user interaction until closed, created via `HtmlService` and displayed with `Ui.showModalDialog`. Sidebars, residing on the editor's right, allow continued editor interaction and are created and displayed similarly, using `Ui.showSidebar`. Both interfaces facilitate client-server communication through `google.script.run()` for asynchronous interactions. File-open dialogs offer pre-built file selection.\n"],null,["# Dialogs and sidebars for Editor add-on\n\nFor most [Editor add-on](/workspace/add-ons/concepts/types#editor_add-ons),\ndialog windows and sidebar panels are the primary add-on user interfaces.\nBoth are fully customizable using standard HTML and CSS, and you can use\nApps Script's\n[client-server communication model](/apps-script/guides/html/communication)\nto run Apps Script functions when the user interacts with the sidebar or dialog.\nYour add-on can define multiple sidebars and dialogs, but the add-on can display\nonly one at a time.\n\nWhen you want to prevent the user from interacting with the editor until they\nmake some choice in the add-on interface, use a dialog; otherwise use a\nsidebar.\n\nDialogs\n-------\n\n*Dialogs* are window panels that overlay the primary editor content. Apps Script\ndialogs are modal; while they are opened the user can't interact with the\nother elements of the editor interface. You can customize the content and size\nof dialogs.\n\nYou build add-on dialogs the same way as Apps Script\n[custom dialogs](/apps-script/guides/dialogs#custom_dialogs); the general\nrecommended procedure is the following:\n\n1. Create a script project file that defines your dialog's HTML structure, CSS, and client-side JavaScript behavior. When defining the dialog, refer to the [Editor add-on style guidelines](/workspace/add-ons/guides/editor-style#dialogs).\n2. In your server-side code where you want the dialog to open, call [`HtmlService.createHtmlOutputFromFile(filename)`](/apps-script/reference/html/html-service#createhtmloutputfromfilefilename) to create an [`HtmlOutput`](/apps-script/reference/html/html-output) object representing the dialog. Alternatively, if you are using [templated HTML](/apps-script/guides/html/templates) you can call [`HtmlService.createTemplateFromFile(filename)`](/apps-script/reference/html/html-service#createtemplatefromfilefilename) to generate a template and then [`HtmlTemplate.evaluate()`](/apps-script/reference/html/html-template#evaluate()) to convert it to an [`HtmlOutput`](/apps-script/reference/html/html-output) object.\n3. Call [`Ui.showModalDialog(htmlOutput, dialogTitle)`](/apps-script/reference/base/ui#showModalDialog(Object,String)) to display the dialog using that [`HtmlOutput`](/apps-script/reference/html/html-output).\n\nDialogs don't suspend the server-side script while they are open. The\nclient-side JavaScript can make asynchronous calls to the server-side\nusing [`google.script.run()`](/apps-script/guides/html/reference/run) and\nassociated handler functions. For more details, see\n[Client-to-server communication](/apps-script/guides/html/communication).\n\n### File-open dialogs\n\n*File-open dialogs* are pre-built dialogs that let your users select files\nfrom their Google Drive. You can add a file-open dialog to your add-on without\nneeding to design it, but it requires some additional configuration. You also\nrequire access to the add-on's\n[Cloud Platform project](/apps-script/guides/cloud-platform-projects)\nin order to enable the Google Picker API.\n\nFor full details, see [File-open dialogs](/apps-script/guides/dialogs#file-open_dialogs).\n\nSidebars\n--------\n\n*Sidebars* are panels that appear in the right of the editor interface, and\nare the most common type of add-on interface. Unlike dialogs, you can continue\nto interact with the other elements of the editor interface while a sidebar is\nopen. Sidebars have a fixed width, but you can customize their content.\n\nYou build add-on sidebars the same way as Apps Script\n[custom sidebars](/apps-script/guides/dialogs#custom_sidebars); the general\nrecommended procedure is the following:\n\n1. Create a script project file that defines your sidebar's HTML structure, CSS, and client-side JavaScript behavior. When defining the sidebar, refer to the [Editor add-on style guidelines](/workspace/add-ons/guides/editor-style#sidebars).\n2. In your server-side code where you want the sidebar to open, call\n [`HtmlService.createHtmlOutputFromFile(filename)`](/apps-script/reference/html/html-service#createhtmloutputfromfilefilename)\n to create an [`HtmlOutput`](/apps-script/reference/html/html-output)\n object representing the sidebar. Alternatively, if you are using\n [templated HTML](/apps-script/guides/html/templates) you can call\n [`HtmlService.createTemplateFromFile(filename)`](/apps-script/reference/html/html-service#createtemplatefromfilefilename)\n to generate a template and then\n [`HtmlTemplate.evaluate()`](/apps-script/reference/html/html-template#evaluate())\n to convert it to an\n [`HtmlOutput`](/apps-script/reference/html/html-output) object.\n\n | **Note:** Add-on sidebars have a fixed width of 300 pixels that you can't alter by calling [`HtmlOutput.setWidth(width)`](/apps-script/reference/html/html-output#setwidthwidth).\n3. Call [`Ui.showSidebar(htmlOutput)`](/apps-script/reference/base/ui#showSidebar(Object))\n to display the sidebar using that\n [`HtmlOutput`](/apps-script/reference/html/html-output).\n\nSidebars don't suspend the server-side script while they are open. The\nclient-side JavaScript can make asynchronous calls to the server-side\nusing [`google.script.run()`](/apps-script/guides/html/reference/run) and\nassociated handler functions. For more details, see\n[Client-to-server communication](/apps-script/guides/html/communication)."]]