# `CKEditor5.License`
[🔗](https://github.com/Mati365/ckeditor5-phoenix/blob/v1.28.2/lib/license/license.ex#L1)

Provides functionality to manage CKEditor 5 license keys.

# `t`

```elixir
@type t() :: %CKEditor5.License{
  distribution_channel: String.t() | nil,
  key: String.t()
}
```

# `env_license_or_gpl`

Returns the default license key from environment variable or "GPL".

# `format_key`

Formats the license key for safe display by truncating long keys.

# `gpl`

```elixir
@spec gpl() :: t()
```

Creates a new GPL license struct.
This license is compatible with all distribution channels.

# `new`

Creates a new License struct with the given license key.
Automatically extracts the distribution channel from the license key.
Returns {:ok, %License{}} for valid keys or {:error, error} for invalid keys.

# `new!`

Creates a new License struct with the given license key.
Raises an error if the key is invalid.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
