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

Common helper functions for CKEditor5 components.

# `assign_id_if_missing`

```elixir
@spec assign_id_if_missing(map(), String.t()) :: map()
```

Assigns a unique ID if one is not already present in assigns.
Generates a random UUID-based ID only when :id key is missing.
This is an alias for `generate_id_if_missing/2` to maintain backward compatibility.

# `generate_id_if_missing`

```elixir
@spec generate_id_if_missing(map(), String.t()) :: map()
```

Assigns a unique ID if one is not already present in assigns.
Generates a random UUID-based ID only when :id key is missing.

# `is_semver_version?`

Checks if a given version string is in semantic versioning format (e.g., "1.0.0").

# `map_keys_to_strings`

Maps all keys in a map to strings.

# `parse_style`

Parses a style string into a map.

# `serialize_styles_map`

Serializes a map of styles into a CSS string.
Converts a map of styles into a string suitable for inline CSS.
Example: %{color: "red", "font-size": "16px"} becomes "color: red; font-size: 16px".

---

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