CKEditor5.CustomTranslations (ckeditor5_phoenix v1.20.0)

View Source

Represents custom translations configuration for CKEditor5.

Summary

Functions

Merges two CustomTranslations structs or maps.

Parses a map into a CustomTranslations struct. Returns {:ok, %CustomTranslations{}} if valid, {:error, reason} if invalid.

Parses a map into a CustomTranslations struct. Returns %CustomTranslations{} if valid, raises an error if invalid.

s()

Defines the schema for custom translations configuration.

Types

t()

@type t() :: %CKEditor5.CustomTranslations{
  dictionary: %{
    required(String.t()) => %{required(String.t()) => String.t() | [String.t()]}
  }
}

Functions

merge(base, overrides)

Merges two CustomTranslations structs or maps.

parse(map)

Parses a map into a CustomTranslations struct. Returns {:ok, %CustomTranslations{}} if valid, {:error, reason} if invalid.

parse!(translations_data)

Parses a map into a CustomTranslations struct. Returns %CustomTranslations{} if valid, raises an error if invalid.

s()

Defines the schema for custom translations configuration.