CKEditor5.License (ckeditor5 v0.2.0)

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.

Types

t()

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

Functions

env_license_or_gpl()

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

format_key(license)

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

gpl()

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.