Skip to content
You don't have a token yet? Contact Sales

API Reference

The <nu-evolution-editor> is a web component that allows you to embed the nuEvolution Editor into your application. It provides a simple API to configure the editor, load profiles, and save them.

Attributes

AttributeTypeDefaultDescription
tokenstringundefinedThe access token for the nuEvolution API.
profile-idstringundefinedThe ID of the profile to load.
id-type'default' | 'external''default'The type of the ID provided in profile-id.
capabilitiesstringundefinedA space-separated list of enabled capabilities.
debugbooleanfalseIf present, enables debug logging in the console.
env'prod' | 'staging' | 'dev''prod'The EVO backend environment to embed. Read once on init; not reactive.

Properties

PropertyTypeDescription
tokenstring | nullThe access token.
profileIdstring | nullThe ID of the profile to load.
idTypeEditorIdTypeThe type of the profile ID.
capabilitiesCapability[]The list of enabled capabilities.
debugbooleanWhether debug logging is enabled.
envEditorEnvironmentThe EVO backend environment (readonly, init-time).
statusEditorStatusThe current status of the editor (readonly).

Methods

saveProfile(triggerSavedEvent?: boolean): Promise<ProfileData>

Saves the current profile.

  • If a profileId is set (either internal or external), the editor will perform an upsert (update existing profile).
  • If no profileId is set, a new profile will be created.
  • triggerSavedEvent: If true, the nuit::profile-saved event will be dispatched upon successful save.
  • Returns a Promise<ProfileData> containing the saved profile's information.

Events

nuit::profile-saved

Dispatched when a profile is successfully saved. This can be triggered by:

  • The user clicking the save button in the editor (requires save-profile capability).
  • Calling saveProfile(true) from the host application.
ts
import { ProfileSavedEvent } from '@nuitdev/evo-embedded'

editor.addEventListener('nuit::profile-saved', (event: ProfileSavedEvent) => {
    /* ... */
})

ProfileSavedEvent:

ts
interface ProfileData {
    profileId: string | null
    externalid: string | null
}

declare class ProfileSavedEvent extends CustomEvent<ProfileData>

Types & Enums

Capability

ValueDescription
'profile-catalog-open'Allows the user to open profiles from the catalog.
'profile-catalog-save'Allows the user to save profiles to the catalog.
'save-profile'Displays a save button in the editor toolbar.

EditorIdType

ValueDescription
'default'The profile-id is treated as a nuEvolution internal ID.
'external'The profile-id is treated as an external ID from your system.

EditorEnvironment

Selects which EVO backend the embedded iframe loads from. The attribute is read once when the iframe is created and is not observed — changing it at runtime has no effect on an already-rendered editor.

ValueDescription
'prod'Production environment (default).
'staging'Staging environment.
'dev'Development environment.