<var>
要素を使用すると、リーダーはプレースホルダ変数を独自の変数に置き換えることができます。
使用できます。
一般的な使用方法
マークダウン「クリックしてコピー」コードブロック内の編集可能なプレースホルダ変数は、 デフォルトで編集可能です。
Edit the name of this PROJECT_ID.
編集可能性を有効にする
<var>
要素に edit
クラスを追加して、
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
属性を使用して
上記の同期の無効化のセクションの変数を設定します。