Rediģējams viettura mainīgais

Elements <var> ļauj lasītājiem aizstāt vietturu mainīgos ar savām vērtībām.

Vispārējs lietojums

Rediģējamie vietturu mainīgie Markdown “noklikšķināt, lai kopētu” koda blokā pēc noklusējuma ir rediģējami.

Edit the name of this PROJECT_ID.

Rediģējamības iespējošana

Pievienojiet edit klasi elementam <var> , lai izveidotu mainīgo, kas ir EDITABLE ārpus koda bloka.

Rediģējamības atspējošana

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.

Rīku padomi

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.

Sinhronizācija

Rediģējamie vietturu mainīgie, kuriem ir vienāds tvērums, tiek sinhronizēti viens ar otru un nekavējoties tiek atjaunināti, lai atspoguļotu jauno vērtību.

Sinhronizācijas atspējošana

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

Sinhronizācijas iespējošana

Šis vietturis VARIABLE ir iestatīts ārpus koda bloka un izmanto scope atribūtu, lai sinhronizētu ar mainīgajiem sinhronizācijas atspējošanas sadaļā iepriekš .