EditEase
DocumentationPricing
EditEasev1.0.0
Introduction to EditEaseCreating a pageUsing EditEaseNPM packageAPI requestsStatic sites

NPM package

First you will need to install our NPM package.
Simply run the command:

npm install edit-ease --save

Enviroment setup

To make successfull requests you will have to add a EE_API_KEY variable to your .env file.
Example

EE_API_KEY=<YOUR_PAGE_API_KEY>

Note

You can only use one API key in a single website. This means that you can only fetch texts from one EditEase page.

Fetching texts

To fetch the texts simply import the getEditEaseText() function from the package. The function takes one string argument that corresponds to your text name.

getEditEaseText(label: string) : Promise<string>

Async function

Since the function has to fetch the text value through the API, it is an async function. This should be taken into account when calling the function.

The function will return one of the following strings:

  • <TEXT_VALUE> - Successfully retrieved text value
  • EditEase text for '<TEXT_NAME>' not found - The text with name <LABEL> could not be found on the page
  • Wrong EditEase API key - If the key was found but it is not correct (no page has such key)
  • Unauthorized API call - If there is no API key
  • Unsuccessfull API cal - If the request has bad parameters

Example

Lets say we have a page with API key my-api-key and a text with name my-text and value Lorem ipsum dolor sit amet.EditEase example

We have a .env file with

EE_API_KEY=my-api-key

and a test.js

import { getEditEaseText } from 'edit-ease';

async function testEditEase(){
    let textValue = await getEditEaseText("my-text");
    console.log(textValue);
}

When calling the testEditEase() function the value of the text with name my-text will be printed to the console. Meaning Lorem ipsum dolor sit amet will be printed out to the console.

Privacy Policy

Copyright © 2025 EditEase

Support
Terms of Service