عنصر <var>
به خوانندگان این امکان را میدهد که متغیرهای نگهدارنده مکان را با مقادیر خود جایگزین کنند.
استفاده عمومی
متغیرهای نگهدارنده قابل ویرایش در بلوک کد کلیک برای کپی Markdown به طور پیش فرض قابل ویرایش هستند.
Edit the name of this PROJECT_ID.
فعال کردن قابلیت ویرایش
برای ایجاد متغیری که خارج از بلوک کد EDITABLE
است، یک کلاس edit
به عنصر <var>
اضافه کنید.
غیرفعال کردن قابلیت ویرایش
This example adds the `readonly` class to the <var> element to create an
UNEDITABLE_VARIABLE.
This example adds the `readonly` class to the code block to disable editability
of both VARIABLE_1 and VARIABLE_2.
نکات ابزار
This EDITABLE variable has a tooltip that defaults to the
name of its original placeholder text.
This EDITABLE variable uses a `label`
attribute to create a custom tooltip named
Edit me.
همگام سازی
متغیرهای نگهدارنده قابل ویرایش که محدوده یکسانی دارند با یکدیگر همگام می شوند و بلافاصله به روز می شوند تا مقدار جدید را منعکس کنند.
غیرفعال کردن همگام سازی
This variable synchronizes by default because it is in a click-to-copy code
block. It has a `label` attribute named `variable with scope`:
VARIABLE
This variable adds the `no-scope` class so that it does not synchronize with the
other variables and has a `label` attribute named `variable without scope`:
VARIABLE
This variable also synchronizes by default and has a `label` attribute named
`variable with scope`:
VARIABLE
فعال کردن همگام سازی
این متغیر VARIABLE
خارج از یک بلوک کد تنظیم شده است و از ویژگی scope
برای همگام سازی با متغیرهای موجود در بخش غیرفعال کردن همگام سازی در بالا استفاده می کند.