リッチテキストマークアップ

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。

UI rich text は、シンプルなマークアップタグを使用して、文字列のセクションを強調、イタリック、下線、色を塗り、ストロークバージョンなどをスタイルに応用します。You can apply styling tags to TextLabelTextButton、および TextBox オブジェクト。

リッチテキストを有効にする

プロパティウィンドウの [リッチテキスト] プロパティを通じて、または [クラス.ローカルスクリプト] プロパティを設定して、リッチテキスト を有効にする必要があります。


local title = Instance.new("TextLabel")
title.RichText = true
title.Text = "Use a <b>bold title</b>"

サポートされたタグ

リッチテキストタグは、XML/HTML タグと似ていますが、フォーマットされたテキストの周りに開始タグと終了タグを含める必要があります。

<b>Formatted text</b>

タグを逆順に開いた方法で閉じると、他のタグを中にネストすることもできます。

<b><i><u>Formatted text</u></i></b>

<font color=""> </font>

I want the <font color="#FF7800">orange</font> candy.``I want the <font color="rgb(255,125,0)">orange</font> candy.

サイズ

<font size=""> </font>

<font size="40">This is big.</font> <font size="20">This is small.</font>

フォント面

<font face=""> </font>

<font face="Michroma">This is Michroma face.</font>

フォントファミリー

<font family=""> </font>

<font family="rbxasset://fonts/families/Michroma.json">This is Michroma face.</font>

フォントの重量

<font weight=""> </font>

This is normal. <font weight="heavy">This is heavy.</font>``This is normal. <font weight="900">This is heavy.</font>

ストローク

<stroke> </stroke>

You won <stroke color="#00A2FF" joins="miter" thickness="2" transparency="0.25">25 gems</stroke>.

透明度

<font transparency=""> </font>

Text at <font transparency="0.5">50% transparency</font>.

大きな

<b> </b>

Text in <b>bold</b>.

イタリック

<i> </i>

Text <i>italicized</i>.

[Underline]

<u> </u>

Text <u>underlined</u>.

ストライクスルー

Text with strikethrough

行の空行

<br />

New line occurs after this sentence.<br />Next sentence...次の文...

大文字

<uppercase> </uppercase>``<uc> </uc>

<uppercase>Uppercase</uppercase> makes words read loudly!``<uc>Uppercase</uc> makes words read loudly!

小さなキャップ

<smallcaps> </smallcaps>``<sc> </sc>

My name is <smallcaps>Diva Dragonslayer</smallcaps>.``My name is <sc>Diva Dragonslayer</sc>.

マーク

<mark> </mark>

Text <mark color="#009966" transparency="0">highlighted</mark>.

コメント

<!-- -->

After this is a comment...<!--This does not appear in the final text--> and now more text...

脱出フォーム

特定のキャラクターを < または > といったようにレンダリングし、リッチテキストタグの一部として考慮されないようにするには、彼らの エスケープフォーム に書き込むことができます。

Personagem逃脱ExemploResultado
<) &lt;10 &lt; 100 ]]10 <100
> &gt;&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;1&lt;100 &gt; 10100 > 10
"título de exemplo" &quot;Meet &quot;Diva Dragonslayer&quot;Conheça "Diva Dragonslayer"
&apos;Diva&apos;s pet is a falcon!Animal de estimação da Diva é um falcão!
&amp;Render another escape form <b>&amp;lt;</b> by escaping an ampersandRender outro formulário de fuga &lt; ao escapar de um ampersand