0.1.52 • Published 4 months ago

dynamic-image-designer v0.1.52

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

Running the code

Start as a stand alone

npm run start

Start as a local component

Build the project

npm run build

Go the the dist folder

cd dist

Run a local server

http-server -c-1

In case you don't have http server:

npm install -g http-server

API

Include the component js and css from: ADD URLS HERE

Once the libs are included in the code you can call the editor function via the global TE

Mount editor into an element

window.TE.mount(selector, apiKey, template);

ParamTypeDescription
selectorStringThe id or parent div to load the editor into
apiKeyStringThe API key of the user that uses the editor. The API key can be obtained from TE settings
templateStringThe Template param is optional. If not provided the te,plates side panel will be shown and the users will be able to pick any template in the account

The Template parameter can be provided in two forms: 1. Template ID - can be copied from the editor, or via the API. 2. A url to TE Image API - in this case the template will be loaded with the values passed in the URL. This is useful if you want to load the template with predefined values and then edit some or all of them.

Editor as a popup

window.TE.popup(apiKey, template, callback)

ParamTypeDescription
apiKeyStringThe API key of the user that uses the editor. The API key can be obtained from TE settings
templateStringThe Template param is optional. If not provided the te,plates side panel will be shown and the users will be able to pick any template in the account
callbackfunctionThe callback function will be called when the user presses the "Save" button. The callback function return the image from the editor as a Base64 string.
// Populate the image from the editor into and <img> tag
window.TE.popup('API_KEY','TEMPLATE' , (img_base64)=>{
        const img = document.getElementById('image');
        img.src = img_base64;
    }
);
0.1.52

4 months ago

0.1.50

4 months ago

0.1.51

4 months ago

0.1.49

4 months ago

0.1.48

4 months ago

0.1.46

5 months ago

0.1.47

5 months ago

0.1.45

5 months ago

0.1.44

5 months ago

0.1.42

5 months ago

0.1.43

5 months ago

0.1.41

6 months ago

0.1.31

6 months ago

0.1.32

6 months ago

0.1.33

6 months ago

0.1.34

6 months ago

0.1.35

6 months ago

0.1.36

6 months ago

0.1.37

6 months ago

0.1.40

6 months ago

0.1.38

6 months ago

0.1.39

6 months ago

0.1.30

7 months ago

0.1.29

7 months ago

0.1.27

7 months ago

0.1.28

7 months ago

0.1.26

7 months ago

0.1.13

9 months ago

0.1.14

9 months ago

0.1.15

9 months ago

0.1.20

9 months ago

0.1.21

9 months ago

0.1.22

9 months ago

0.1.23

9 months ago

0.1.24

9 months ago

0.1.25

9 months ago

0.1.16

9 months ago

0.1.17

9 months ago

0.1.18

9 months ago

0.1.19

9 months ago

0.1.10

10 months ago

0.1.11

10 months ago

0.1.12

10 months ago

0.1.9

10 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

11 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.5

12 months ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago