[Rich text editor] Add link functionality to rich text editor (#1309)

* Add link functionality to rich text editor
* Add 'list dialog' component compound design library
* Add 'text field list item' component to compound design library
This commit is contained in:
jonnyandrew 2023-09-19 12:20:07 +01:00 committed by GitHub
parent 1eb949146a
commit ee8d27e927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 742 additions and 246 deletions

View file

@ -45,7 +45,9 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@ -82,6 +84,7 @@ import io.element.android.wysiwyg.compose.RichTextEditor
import io.element.android.wysiwyg.compose.RichTextEditorDefaults
import io.element.android.wysiwyg.compose.RichTextEditorState
import io.element.android.wysiwyg.view.models.InlineFormat
import io.element.android.wysiwyg.view.models.LinkAction
import uniffi.wysiwyg_composer.ActionState
import uniffi.wysiwyg_composer.ComposerAction
@ -183,7 +186,7 @@ fun TextComposer(
placeholder = if (composerMode.inThread) {
stringResource(id = CommonStrings.action_reply_in_thread)
} else {
stringResource(id = CommonStrings.rich_text_editor_composer_placeholder)
stringResource(id = R.string.rich_text_editor_composer_placeholder)
},
roundedCorners = roundedCorners,
bgColor = bgColor,
@ -337,67 +340,87 @@ private fun TextFormatting(
state = state.actions[ComposerAction.BOLD].toButtonState(),
onClick = { state.toggleInlineFormat(InlineFormat.Bold) },
imageVector = ImageVector.vectorResource(VectorIcons.Bold),
contentDescription = stringResource(CommonStrings.rich_text_editor_format_bold)
contentDescription = stringResource(R.string.rich_text_editor_format_bold)
)
FormattingOption(
state = state.actions[ComposerAction.ITALIC].toButtonState(),
onClick = { state.toggleInlineFormat(InlineFormat.Italic) },
imageVector = ImageVector.vectorResource(VectorIcons.Italic),
contentDescription = stringResource(CommonStrings.rich_text_editor_format_italic)
contentDescription = stringResource(R.string.rich_text_editor_format_italic)
)
FormattingOption(
state = state.actions[ComposerAction.UNDERLINE].toButtonState(),
onClick = { state.toggleInlineFormat(InlineFormat.Underline) },
imageVector = ImageVector.vectorResource(VectorIcons.Underline),
contentDescription = stringResource(CommonStrings.rich_text_editor_format_underline)
contentDescription = stringResource(R.string.rich_text_editor_format_underline)
)
FormattingOption(
state = state.actions[ComposerAction.STRIKE_THROUGH].toButtonState(),
onClick = { state.toggleInlineFormat(InlineFormat.StrikeThrough) },
imageVector = ImageVector.vectorResource(VectorIcons.Strikethrough),
contentDescription = stringResource(CommonStrings.rich_text_editor_format_strikethrough)
contentDescription = stringResource(R.string.rich_text_editor_format_strikethrough)
)
var linkDialogAction by remember { mutableStateOf<LinkAction?>(null) }
linkDialogAction?.let {
TextComposerLinkDialog(
onDismissRequest = { linkDialogAction = null },
onCreateLinkRequest = state::insertLink,
onSaveLinkRequest = state::setLink,
onRemoveLinkRequest = state::removeLink,
linkAction = it,
)
}
FormattingOption(
state = state.actions[ComposerAction.LINK].toButtonState(),
onClick = { linkDialogAction = state.linkAction },
imageVector = ImageVector.vectorResource(VectorIcons.Link),
contentDescription = stringResource(R.string.rich_text_editor_link)
)
FormattingOption(
state = state.actions[ComposerAction.UNORDERED_LIST].toButtonState(),
onClick = { state.toggleList(ordered = false) },
imageVector = ImageVector.vectorResource(VectorIcons.BulletList),
contentDescription = stringResource(CommonStrings.rich_text_editor_bullet_list)
contentDescription = stringResource(R.string.rich_text_editor_bullet_list)
)
FormattingOption(
state = state.actions[ComposerAction.ORDERED_LIST].toButtonState(),
onClick = { state.toggleList(ordered = true) },
imageVector = ImageVector.vectorResource(VectorIcons.NumberedList),
contentDescription = stringResource(CommonStrings.rich_text_editor_numbered_list)
contentDescription = stringResource(R.string.rich_text_editor_numbered_list)
)
FormattingOption(
state = state.actions[ComposerAction.INDENT].toButtonState(),
onClick = { state.indent() },
imageVector = ImageVector.vectorResource(VectorIcons.IndentIncrease),
contentDescription = stringResource(CommonStrings.rich_text_editor_indent)
contentDescription = stringResource(R.string.rich_text_editor_indent)
)
FormattingOption(
state = state.actions[ComposerAction.UNINDENT].toButtonState(),
onClick = { state.unindent() },
imageVector = ImageVector.vectorResource(VectorIcons.IndentDecrease),
contentDescription = stringResource(CommonStrings.rich_text_editor_unindent)
contentDescription = stringResource(R.string.rich_text_editor_unindent)
)
FormattingOption(
state = state.actions[ComposerAction.INLINE_CODE].toButtonState(),
onClick = { state.toggleInlineFormat(InlineFormat.InlineCode) },
imageVector = ImageVector.vectorResource(VectorIcons.InlineCode),
contentDescription = stringResource(CommonStrings.rich_text_editor_inline_code)
contentDescription = stringResource(R.string.rich_text_editor_inline_code)
)
FormattingOption(
state = state.actions[ComposerAction.CODE_BLOCK].toButtonState(),
onClick = { state.toggleCodeBlock() },
imageVector = ImageVector.vectorResource(VectorIcons.CodeBlock),
contentDescription = stringResource(CommonStrings.rich_text_editor_code_block)
contentDescription = stringResource(R.string.rich_text_editor_code_block)
)
FormattingOption(
state = state.actions[ComposerAction.QUOTE].toButtonState(),
onClick = { state.toggleQuote() },
imageVector = ImageVector.vectorResource(VectorIcons.Quote),
contentDescription = stringResource(CommonStrings.rich_text_editor_quote)
contentDescription = stringResource(R.string.rich_text_editor_quote)
)
}

View file

@ -0,0 +1,236 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.textcomposer
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import io.element.android.libraries.designsystem.components.dialogs.ListDialog
import io.element.android.libraries.designsystem.components.list.TextFieldListItem
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.theme.components.ListItem
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
import io.element.android.libraries.ui.strings.CommonStrings
import io.element.android.wysiwyg.view.models.LinkAction
@Composable
fun TextComposerLinkDialog(
onDismissRequest: () -> Unit,
linkAction: LinkAction,
onSaveLinkRequest: (url: String) -> Unit,
onCreateLinkRequest: (url: String, text: String) -> Unit,
onRemoveLinkRequest: () -> Unit,
modifier: Modifier = Modifier,
) {
val urlToEdit by remember(linkAction) {
derivedStateOf {
(linkAction as? LinkAction.SetLink)?.currentUrl
}
}
urlToEdit.let { url ->
when {
url != null -> {
EditLinkDialog(
currentUrl = url,
onDismissRequest = onDismissRequest,
onSaveLinkRequest = onSaveLinkRequest,
onRemoveLinkRequest = onRemoveLinkRequest,
modifier = modifier,
)
}
linkAction is LinkAction.InsertLink -> {
CreateLinkWithTextDialog(
onDismissRequest = onDismissRequest,
onCreateLinkRequest = onCreateLinkRequest,
modifier = modifier,
)
}
linkAction is LinkAction.SetLink -> {
CreateLinkWithoutTextDialog(
onDismissRequest = onDismissRequest,
onSaveLinkRequest = onSaveLinkRequest,
modifier = modifier,
)
}
}
}
}
@Composable
private fun CreateLinkWithTextDialog(
onDismissRequest: () -> Unit,
onCreateLinkRequest: (url: String, text: String) -> Unit,
modifier: Modifier = Modifier,
) {
var linkText by remember { mutableStateOf("") }
var linkUrl by remember { mutableStateOf("") }
val titleText = stringResource(R.string.rich_text_editor_create_link)
fun onSubmit() {
onCreateLinkRequest(linkUrl, linkText)
onDismissRequest()
}
ListDialog(
onDismissRequest = onDismissRequest,
onSubmit = ::onSubmit,
title = titleText,
modifier = modifier
) {
item {
TextFieldListItem(
placeholder = stringResource(id = CommonStrings.common_text),
text = linkText,
onTextChanged = { linkText = it },
)
}
item {
TextFieldListItem(
placeholder = stringResource(id = R.string.rich_text_editor_url_placeholder),
text = linkUrl,
onTextChanged = { linkUrl = it },
)
}
}
}
@Composable
private fun CreateLinkWithoutTextDialog(
onDismissRequest: () -> Unit,
onSaveLinkRequest: (url: String) -> Unit,
modifier: Modifier = Modifier,
) {
var linkUrl by remember { mutableStateOf("") }
val titleText = stringResource(R.string.rich_text_editor_create_link)
fun onSubmit() {
onSaveLinkRequest(linkUrl)
onDismissRequest()
}
ListDialog(
onDismissRequest = onDismissRequest,
onSubmit = ::onSubmit,
title = titleText,
modifier = modifier
) {
item {
TextFieldListItem(
placeholder = stringResource(id = R.string.rich_text_editor_url_placeholder),
text = linkUrl,
onTextChanged = { linkUrl = it },
)
}
}
}
// The edit link dialog does not yet support displaying or editing the text of a link
// https://github.com/matrix-org/matrix-rich-text-editor/issues/617
@Composable
private fun EditLinkDialog(
currentUrl: String,
onDismissRequest: () -> Unit,
onSaveLinkRequest: (url: String) -> Unit,
onRemoveLinkRequest: () -> Unit,
modifier: Modifier = Modifier,
) {
var linkUrl by remember { mutableStateOf(currentUrl) }
val titleText = stringResource(R.string.rich_text_editor_edit_link)
fun onSubmit() {
onSaveLinkRequest(linkUrl)
onDismissRequest()
}
fun onRemoveClicked() {
onRemoveLinkRequest()
onDismissRequest()
}
ListDialog(
onDismissRequest = onDismissRequest,
onSubmit = ::onSubmit,
title = titleText,
modifier = modifier
) {
item {
TextFieldListItem(
placeholder = stringResource(id = R.string.rich_text_editor_url_placeholder),
text = linkUrl,
onTextChanged = { linkUrl = it },
)
}
item {
ListItem(
headlineContent = {
Text(
text = stringResource(R.string.rich_text_editor_remove_link),
color = ElementTheme.colors.textCriticalPrimary
)
},
onClick = ::onRemoveClicked,
)
}
}
}
@DayNightPreviews
@Composable
internal fun TextComposerLinkDialogCreateLinkPreview() {
TextComposerLinkDialog(
onDismissRequest = {},
linkAction = LinkAction.InsertLink,
onSaveLinkRequest = {},
onCreateLinkRequest = { _, _ -> },
onRemoveLinkRequest = {},
)
}
@DayNightPreviews
@Composable
internal fun TextComposerLinkDialogCreateLinkWithoutTextPreview() {
TextComposerLinkDialog(
onDismissRequest = {},
linkAction = LinkAction.SetLink(null),
onSaveLinkRequest = {},
onCreateLinkRequest = { _, _ -> },
onRemoveLinkRequest = {},
)
}
@DayNightPreviews
@Composable
internal fun TextComposerLinkDialogEditLinkPreview() {
TextComposerLinkDialog(
onDismissRequest = {},
linkAction = LinkAction.SetLink("https://element.io"),
onSaveLinkRequest = {},
onCreateLinkRequest = { _, _ -> },
onRemoveLinkRequest = {},
)
}

View file

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Přepnout seznam s odrážkami"</string>
<string name="rich_text_editor_code_block">"Přepnout blok kódu"</string>
<string name="rich_text_editor_composer_placeholder">"Zpráva…"</string>
<string name="rich_text_editor_format_bold">"Použít tučný text"</string>
<string name="rich_text_editor_format_italic">"Použít kurzívu"</string>
<string name="rich_text_editor_format_strikethrough">"Použít přeškrtnutí"</string>
<string name="rich_text_editor_format_underline">"Použít podtržení"</string>
<string name="rich_text_editor_full_screen_toggle">"Přepnout režim celé obrazovky"</string>
<string name="rich_text_editor_indent">"Odsazení"</string>
<string name="rich_text_editor_inline_code">"Použít formát inline kódu"</string>
<string name="rich_text_editor_link">"Nastavit odkaz"</string>
<string name="rich_text_editor_numbered_list">"Přepnout číslovaný seznam"</string>
<string name="rich_text_editor_quote">"Přepnout citaci"</string>
<string name="rich_text_editor_unindent">"Zrušit odsazení"</string>
<string name="rich_text_editor_a11y_add_attachment">"Přidat přílohu"</string>
</resources>

View file

@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Aufzählungsliste umschalten"</string>
<string name="rich_text_editor_close_formatting_options">"Formatierungsoptionen schließen"</string>
<string name="rich_text_editor_code_block">"Codeblock umschalten"</string>
<string name="rich_text_editor_composer_placeholder">"Nachricht…"</string>
<string name="rich_text_editor_create_link">"Einen Link erstellen"</string>
<string name="rich_text_editor_edit_link">"Link bearbeiten"</string>
<string name="rich_text_editor_format_bold">"Fettes Format anwenden"</string>
<string name="rich_text_editor_format_italic">"Kursives Format anwenden"</string>
<string name="rich_text_editor_format_strikethrough">"Durchgestrichenes Format anwenden"</string>
<string name="rich_text_editor_format_underline">"Unterstreichungsformat anwenden"</string>
<string name="rich_text_editor_full_screen_toggle">"Vollbildmodus umschalten"</string>
<string name="rich_text_editor_indent">"Einrückung"</string>
<string name="rich_text_editor_inline_code">"Inline-Codeformat anwenden"</string>
<string name="rich_text_editor_link">"Link setzen"</string>
<string name="rich_text_editor_numbered_list">"Nummerierte Liste umschalten"</string>
<string name="rich_text_editor_open_compose_options">"Optionen zum Verfassen öffnen"</string>
<string name="rich_text_editor_quote">"Vorschlag umschalten"</string>
<string name="rich_text_editor_remove_link">"Link entfernen"</string>
<string name="rich_text_editor_unindent">"Ohne Einrückung"</string>
<string name="rich_text_editor_url_placeholder">"Link"</string>
<string name="rich_text_editor_a11y_add_attachment">"Anhang hinzufügen"</string>
</resources>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Lista de puntos"</string>
<string name="rich_text_editor_code_block">"Bloque de código"</string>
<string name="rich_text_editor_composer_placeholder">"Mensaje…"</string>
<string name="rich_text_editor_format_bold">"Aplicar formato negrita"</string>
<string name="rich_text_editor_format_italic">"Aplicar formato cursiva"</string>
<string name="rich_text_editor_format_strikethrough">"Aplicar formato tachado"</string>
<string name="rich_text_editor_format_underline">"Aplicar formato de subrayado"</string>
<string name="rich_text_editor_full_screen_toggle">"Pantalla completa"</string>
<string name="rich_text_editor_indent">"Añadir sangría"</string>
<string name="rich_text_editor_inline_code">"Código"</string>
<string name="rich_text_editor_link">"Enlazar"</string>
<string name="rich_text_editor_numbered_list">"Lista numérica"</string>
<string name="rich_text_editor_quote">"Cita"</string>
<string name="rich_text_editor_unindent">"Quitar sangría"</string>
</resources>

View file

@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Afficher une liste à puces"</string>
<string name="rich_text_editor_close_formatting_options">"Fermer les options de formatage"</string>
<string name="rich_text_editor_code_block">"Afficher le bloc de code"</string>
<string name="rich_text_editor_composer_placeholder">"Message…"</string>
<string name="rich_text_editor_create_link">"Créer un lien"</string>
<string name="rich_text_editor_edit_link">"Modifier le lien"</string>
<string name="rich_text_editor_format_bold">"Appliquer le format gras"</string>
<string name="rich_text_editor_format_italic">"Appliquer le format italique"</string>
<string name="rich_text_editor_format_strikethrough">"Appliquer le format barré"</string>
<string name="rich_text_editor_format_underline">"Appliquer le format souligné"</string>
<string name="rich_text_editor_full_screen_toggle">"Activer/désactiver le mode plein écran"</string>
<string name="rich_text_editor_indent">"Décaler vers la droite"</string>
<string name="rich_text_editor_inline_code">"Appliquer le formatage de code en ligne"</string>
<string name="rich_text_editor_link">"Définir un lien"</string>
<string name="rich_text_editor_numbered_list">"Afficher une liste numérotée"</string>
<string name="rich_text_editor_open_compose_options">"Ouvrir les options de rédaction"</string>
<string name="rich_text_editor_quote">"Afficher/masquer la citation"</string>
<string name="rich_text_editor_remove_link">"Supprimer le lien"</string>
<string name="rich_text_editor_unindent">"Décaler vers la gauche"</string>
<string name="rich_text_editor_url_placeholder">"Lien"</string>
<string name="rich_text_editor_a11y_add_attachment">"Ajouter une pièce jointe"</string>
</resources>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Attiva/disattiva l\'elenco puntato"</string>
<string name="rich_text_editor_code_block">"Attiva/disattiva il blocco di codice"</string>
<string name="rich_text_editor_composer_placeholder">"Messaggio…"</string>
<string name="rich_text_editor_format_bold">"Applica il formato in grassetto"</string>
<string name="rich_text_editor_format_italic">"Applicare il formato corsivo"</string>
<string name="rich_text_editor_format_strikethrough">"Applica il formato barrato"</string>
<string name="rich_text_editor_format_underline">"Applicare il formato di sottolineatura"</string>
<string name="rich_text_editor_full_screen_toggle">"Attiva/disattiva la modalità a schermo intero"</string>
<string name="rich_text_editor_indent">"Rientro a destra"</string>
<string name="rich_text_editor_inline_code">"Applicare il formato del codice in linea"</string>
<string name="rich_text_editor_link">"Imposta collegamento"</string>
<string name="rich_text_editor_numbered_list">"Attiva/disattiva elenco numerato"</string>
<string name="rich_text_editor_quote">"Attiva/disattiva citazione"</string>
<string name="rich_text_editor_unindent">"Rientro a sinistra"</string>
</resources>

View file

@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Comutați lista cu puncte"</string>
<string name="rich_text_editor_close_formatting_options">"Închideți opțiunile de formatare"</string>
<string name="rich_text_editor_code_block">"Comutați blocul de cod"</string>
<string name="rich_text_editor_composer_placeholder">"Mesaj…"</string>
<string name="rich_text_editor_create_link">"Creați un link"</string>
<string name="rich_text_editor_edit_link">"Editați link-ul"</string>
<string name="rich_text_editor_format_bold">"Aplicați formatul aldin"</string>
<string name="rich_text_editor_format_italic">"Aplicați formatul italic"</string>
<string name="rich_text_editor_format_strikethrough">"Aplicați formatul barat"</string>
<string name="rich_text_editor_format_underline">"Aplică formatul de subliniere"</string>
<string name="rich_text_editor_full_screen_toggle">"Comutați modul ecran complet"</string>
<string name="rich_text_editor_indent">"Indentare"</string>
<string name="rich_text_editor_inline_code">"Aplicați formatul de cod inline"</string>
<string name="rich_text_editor_link">"Setați linkul"</string>
<string name="rich_text_editor_numbered_list">"Comutați lista numerotată"</string>
<string name="rich_text_editor_open_compose_options">"Deschideți opțiunile de compunere"</string>
<string name="rich_text_editor_quote">"Aplicați citatul"</string>
<string name="rich_text_editor_unindent">"Dez-identare"</string>
<string name="rich_text_editor_url_placeholder">"Link"</string>
<string name="rich_text_editor_a11y_add_attachment">"Adăugați un atașament"</string>
</resources>

View file

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Переключить список маркеров"</string>
<string name="rich_text_editor_code_block">"Переключить блок кода"</string>
<string name="rich_text_editor_composer_placeholder">"Сообщение"</string>
<string name="rich_text_editor_format_bold">"Применить жирный шрифт"</string>
<string name="rich_text_editor_format_italic">"Применить курсивный формат"</string>
<string name="rich_text_editor_format_strikethrough">"Применить формат зачеркивания"</string>
<string name="rich_text_editor_format_underline">"Применить формат подчеркивания"</string>
<string name="rich_text_editor_full_screen_toggle">"Переключение полноэкранного режима"</string>
<string name="rich_text_editor_indent">"Отступ"</string>
<string name="rich_text_editor_inline_code">"Применить встроенный формат кода"</string>
<string name="rich_text_editor_link">"Установить ссылку"</string>
<string name="rich_text_editor_numbered_list">"Переключить нумерованный список"</string>
<string name="rich_text_editor_quote">"Переключить цитату"</string>
<string name="rich_text_editor_unindent">"Без отступа"</string>
<string name="rich_text_editor_a11y_add_attachment">"Прикрепить файл"</string>
</resources>

View file

@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Prepnúť zoznam odrážok"</string>
<string name="rich_text_editor_close_formatting_options">"Zatvoriť možnosti formátovania"</string>
<string name="rich_text_editor_code_block">"Prepnúť blok kódu"</string>
<string name="rich_text_editor_composer_placeholder">"Správa…"</string>
<string name="rich_text_editor_create_link">"Vytvoriť odkaz"</string>
<string name="rich_text_editor_edit_link">"Upraviť odkaz"</string>
<string name="rich_text_editor_format_bold">"Použiť tučný formát"</string>
<string name="rich_text_editor_format_italic">"Použiť formát kurzívy"</string>
<string name="rich_text_editor_format_strikethrough">"Použiť formát prečiarknutia"</string>
<string name="rich_text_editor_format_underline">"Použiť formát podčiarknutia"</string>
<string name="rich_text_editor_full_screen_toggle">"Prepnúť režim celej obrazovky"</string>
<string name="rich_text_editor_indent">"Odsadenie"</string>
<string name="rich_text_editor_inline_code">"Použiť formát riadkového kódu"</string>
<string name="rich_text_editor_link">"Nastaviť odkaz"</string>
<string name="rich_text_editor_numbered_list">"Prepnúť číslovaný zoznam"</string>
<string name="rich_text_editor_open_compose_options">"Otvoriť možnosti písania"</string>
<string name="rich_text_editor_quote">"Prepnúť citáciu"</string>
<string name="rich_text_editor_remove_link">"Odstrániť odkaz"</string>
<string name="rich_text_editor_unindent">"Zrušiť odsadenie"</string>
<string name="rich_text_editor_url_placeholder">"Odkaz"</string>
<string name="rich_text_editor_a11y_add_attachment">"Pridať prílohu"</string>
</resources>

View file

@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"切換項目編號"</string>
<string name="rich_text_editor_code_block">"切換程式碼區塊"</string>
<string name="rich_text_editor_composer_placeholder">"訊息"</string>
<string name="rich_text_editor_create_link">"建立連結"</string>
<string name="rich_text_editor_edit_link">"編輯連結"</string>
<string name="rich_text_editor_format_bold">"套用粗體"</string>
<string name="rich_text_editor_format_italic">"套用斜體"</string>
<string name="rich_text_editor_format_strikethrough">"套用刪除線"</string>
<string name="rich_text_editor_format_underline">"套用底線"</string>
<string name="rich_text_editor_full_screen_toggle">"切換全螢幕模式"</string>
<string name="rich_text_editor_indent">"增加縮排"</string>
<string name="rich_text_editor_link">"設定連結"</string>
<string name="rich_text_editor_numbered_list">"切換數字編號"</string>
<string name="rich_text_editor_quote">"切換引用"</string>
<string name="rich_text_editor_unindent">"減少縮排"</string>
<string name="rich_text_editor_url_placeholder">"連結"</string>
<string name="rich_text_editor_a11y_add_attachment">"新增附件"</string>
</resources>

View file

@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="rich_text_editor_bullet_list">"Toggle bullet list"</string>
<string name="rich_text_editor_close_formatting_options">"Close formatting options"</string>
<string name="rich_text_editor_code_block">"Toggle code block"</string>
<string name="rich_text_editor_composer_placeholder">"Message…"</string>
<string name="rich_text_editor_create_link">"Create a link"</string>
<string name="rich_text_editor_edit_link">"Edit link"</string>
<string name="rich_text_editor_format_bold">"Apply bold format"</string>
<string name="rich_text_editor_format_italic">"Apply italic format"</string>
<string name="rich_text_editor_format_strikethrough">"Apply strikethrough format"</string>
<string name="rich_text_editor_format_underline">"Apply underline format"</string>
<string name="rich_text_editor_full_screen_toggle">"Toggle full screen mode"</string>
<string name="rich_text_editor_indent">"Indent"</string>
<string name="rich_text_editor_inline_code">"Apply inline code format"</string>
<string name="rich_text_editor_link">"Set link"</string>
<string name="rich_text_editor_numbered_list">"Toggle numbered list"</string>
<string name="rich_text_editor_open_compose_options">"Open compose options"</string>
<string name="rich_text_editor_quote">"Toggle quote"</string>
<string name="rich_text_editor_remove_link">"Remove link"</string>
<string name="rich_text_editor_unindent">"Unindent"</string>
<string name="rich_text_editor_url_placeholder">"Link"</string>
<string name="rich_text_editor_a11y_add_attachment">"Add attachment"</string>
</resources>