ตัวแปรตัวยึดตําแหน่งที่แก้ไขได้

องค์ประกอบ <var> ช่วยให้ผู้อ่านแทนที่ตัวแปรตัวยึดตำแหน่งด้วยตัวแปร

การใช้งานทั่วไป

ตัวแปรตัวยึดตำแหน่งที่แก้ไขได้ในบล็อกโค้ดคลิกเพื่อคัดลอกของมาร์กดาวน์คือ แก้ไขได้โดยค่าเริ่มต้น

Edit the name of this PROJECT_ID.

กำลังเปิดใช้ความสามารถในการแก้ไข

เพิ่มคลาส edit ลงในองค์ประกอบ <var> เพื่อสร้างตัวแปรที่ EDITABLE นอกโค้ดบล็อก

กำลังปิดใช้ความสามารถในการแก้ไข

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 เพื่อซิงค์ข้อมูล ตัวแปรในส่วนการปิดใช้การซิงค์ด้านบน