CKEditor5.Preset.CloudCompatibilityChecker (ckeditor5_phoenix v1.21.0)

View Source

Enforces business rules and compatibility constraints for CKEditor5 presets. Specifically handles Cloud Distribution Channel licensing requirements and configuration validation.

Summary

Functions

Checks if the preset's Cloud configuration is valid based on the license type.

Safe version of ensure_cloud_configured!/1 which returns :ok when the preset is valid for cloud distribution or {:error, error_struct} when not.

Bang version kept for backwards compatibility. It delegates to ensure_cloud_configured/1 and raises the returned error struct when validation fails.

Functions

assign_default_cloud_config(preset)

Checks if the preset's Cloud configuration is valid based on the license type.

ensure_cloud_configured(preset)

Safe version of ensure_cloud_configured!/1 which returns :ok when the preset is valid for cloud distribution or {:error, error_struct} when not.

ensure_cloud_configured!(preset)

Bang version kept for backwards compatibility. It delegates to ensure_cloud_configured/1 and raises the returned error struct when validation fails.