<BlokkliProvider> is the root component that establishes the editing context for an entity. Wrap your editable content inside it and pass the entity identifiers and permission flag. Every <BlokkliField> and block component rendered inside it inherits the editing context automatically.
Import
<BlokkliProvider> is auto-imported by the blökkli Nuxt module. No manual import is needed.
Usage
Props
The entity descriptor object. Identifies which backend entity this editing
context belongs to. All three nested properties are required.
Controls whether this entity is editable by the current user. When
true,
appending ?blokkliEditing={entity_uuid} to the page URL activates the
editor overlay. When false, the URL parameter is ignored and the editor
never activates for this entity — even if the URL parameter is present.Set this to the result of your permission check for the current user and
entity.The BCP 47 language code for the content displayed in this provider (e.g.,
'en', 'de', 'fr', 'nl'). Required when you implement the
changeLanguage() adapter method or use the translations feature. blökkli
uses this value to display the current language in the editor toolbar and to
populate the language switcher.Slots
The page content rendered inside the editing context. Typically contains one
or more
<BlokkliField> components and any surrounding layout markup.
All descendants can access editor state via useBlokkli().Editor Activation
Withcan-edit set to true, the editor activates when ?blokkliEditing={entity_uuid} appears in the URL. The overlay opens without a full page reload — blökkli intercepts the URL change client-side.
Full Example with Multiple Fields
Each page should contain exactly one
<BlokkliProvider> per entity. Nesting
multiple providers for the same entity, or rendering two providers for
different entities on the same page simultaneously, is not supported.
