CKEditor5.Cloud.UrlBuilder (ckeditor5 v1.0.7)

View Source

Builds URLs for CKEditor 5 Cloud resources.

Summary

Functions

Builds the URL for a specific Cloud resource.

Types

cdn_type()

@type cdn_type() :: :ckeditor | :ckbox

Functions

build_url(cdn_type, path_segments)

@spec build_url(cdn_type(), [binary()]) :: binary()
@spec build_url(cdn_type(), binary()) :: binary()

Builds the URL for a specific Cloud resource.

Parameters

  • cdn_type: The CDN type, either :ckeditor or :ckbox.
  • path_segments or resource_path: A list of path segments that will be joined with "/" or a single resource path string.

Examples

iex> CKEditor5.Cloud.UrlBuilder.build_url(:ckeditor, ["path", "to", "resource"])
"https://cdn.ckeditor.com/path/to/resource"

iex> CKEditor5.Cloud.UrlBuilder.build_url(:ckbox, "path/to/resource")
"https://cdn.ckbox.io/path/to/resource"