CKEditor5.License (ckeditor5_phoenix v1.16.1)

View Source

Provides functionality to manage CKEditor 5 license keys.

Summary

Functions

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

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

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

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.

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

Types

t()

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

Functions

env_license_or_gpl()

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

format_key(key)

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

gpl()

@spec gpl() :: t()

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

new(license)

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!(key)

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