@innovastudio/contentbuilder 1.5.212 → 1.5.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +232 -3
- package/package.json +9 -10
- package/public/contentbuilder/contentbuilder.css +11169 -6865
- package/public/contentbuilder/contentbuilder.esm.js +42152 -50746
- package/public/contentbuilder/contentbuilder.min.js +10 -107
- package/public/contentbuilder/lang/en.js +235 -5
- package/public/contentbuilder/lang/fr.js +243 -13
- package/public/contentbuilder/themes/colored-blue.css +57 -1324
- package/public/contentbuilder/themes/colored-blue2.css +57 -1324
- package/public/contentbuilder/themes/colored-blue3.css +57 -1324
- package/public/contentbuilder/themes/colored-blue4.css +57 -1324
- package/public/contentbuilder/themes/colored-blue5.css +57 -1324
- package/public/contentbuilder/themes/colored-blue6.css +57 -1324
- package/public/contentbuilder/themes/colored-blue7.css +57 -1324
- package/public/contentbuilder/themes/colored-blue8.css +57 -1324
- package/public/contentbuilder/themes/colored-cyan.css +58 -0
- package/public/contentbuilder/themes/colored-dark.css +57 -1295
- package/public/contentbuilder/themes/colored-darkblue.css +57 -1324
- package/public/contentbuilder/themes/colored-gray.css +57 -1324
- package/public/contentbuilder/themes/colored-green.css +57 -1324
- package/public/contentbuilder/themes/colored-green2.css +57 -1324
- package/public/contentbuilder/themes/colored-green3.css +57 -1324
- package/public/contentbuilder/themes/colored-green4.css +57 -1324
- package/public/contentbuilder/themes/colored-green5.css +57 -1324
- package/public/contentbuilder/themes/colored-magenta.css +57 -1324
- package/public/contentbuilder/themes/colored-orange.css +57 -1324
- package/public/contentbuilder/themes/colored-orange2.css +57 -1324
- package/public/contentbuilder/themes/colored-orange3.css +57 -1324
- package/public/contentbuilder/themes/colored-pink.css +57 -1324
- package/public/contentbuilder/themes/colored-pink2.css +57 -1324
- package/public/contentbuilder/themes/colored-pink3.css +57 -1324
- package/public/contentbuilder/themes/colored-pink4.css +57 -1324
- package/public/contentbuilder/themes/colored-purple.css +57 -1324
- package/public/contentbuilder/themes/colored-purple2.css +57 -1324
- package/public/contentbuilder/themes/colored-red.css +57 -1324
- package/public/contentbuilder/themes/colored-red2.css +57 -1324
- package/public/contentbuilder/themes/colored-red3.css +57 -1324
- package/public/contentbuilder/themes/colored-red4.css +57 -1324
- package/public/contentbuilder/themes/colored-red5.css +57 -1324
- package/public/contentbuilder/themes/colored-yellow.css +57 -1324
- package/public/contentbuilder/themes/colored-yellow2.css +57 -1324
- package/public/contentbuilder/themes/colored-yellow3.css +58 -0
- package/public/contentbuilder/themes/dark-blue.css +26 -1371
- package/public/contentbuilder/themes/dark-blue2.css +26 -1371
- package/public/contentbuilder/themes/dark-blue3.css +26 -1371
- package/public/contentbuilder/themes/dark-gray.css +26 -1371
- package/public/contentbuilder/themes/dark-pink.css +26 -1371
- package/public/contentbuilder/themes/dark-purple.css +26 -1371
- package/public/contentbuilder/themes/dark-red.css +26 -1371
- package/public/contentbuilder/themes/light-blue.css +29 -1323
- package/public/contentbuilder/themes/light-blue2.css +29 -1323
- package/public/contentbuilder/themes/light-blue3.css +29 -1323
- package/public/contentbuilder/themes/light-cyan.css +29 -1323
- package/public/contentbuilder/themes/light-gray.css +29 -1323
- package/public/contentbuilder/themes/light-gray2.css +29 -1323
- package/public/contentbuilder/themes/light-gray3.css +29 -1323
- package/public/contentbuilder/themes/light-green.css +29 -1323
- package/public/contentbuilder/themes/light-pink.css +29 -1323
- package/public/contentbuilder/themes/light-pink2.css +29 -1323
- package/public/contentbuilder/themes/light-purple.css +29 -1323
- package/public/contentbuilder/themes/light-purple2.css +29 -1323
- package/public/contentbuilder/themes/light-red.css +29 -1323
- package/public/contentbuilder/themes/light-yellow.css +29 -1323
- package/public/contentbuilder/themes/light-yellow2.css +29 -1323
- package/readme.txt +225 -154
- package/public/contentbuilder/config.js +0 -7
- package/public/contentbuilder/content.css +0 -7777
- package/public/contentbuilder/plugins/animation/plugin.js +0 -25
- package/public/contentbuilder/plugins/buttoneditor/images/a.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/b.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/c.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/d.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/e.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/f.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/g.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/images/h.jpg +0 -0
- package/public/contentbuilder/plugins/buttoneditor/plugin.js +0 -1600
- package/public/contentbuilder/plugins/buttoneditor/readme.txt +0 -7
- package/public/contentbuilder/plugins/helloworld/plugin.js +0 -21
- package/public/contentbuilder/plugins/helloworld/readme.txt +0 -23
- package/public/contentbuilder/plugins/preview/plugin.js +0 -371
- package/public/contentbuilder/plugins/preview/readme.txt +0 -23
- package/public/contentbuilder/plugins/searchreplace/plugin.js +0 -524
- package/public/contentbuilder/plugins/searchreplace/readme.txt +0 -23
- package/public/contentbuilder/plugins/searchreplace/searchreplace.html +0 -264
- package/public/contentbuilder/plugins/showgrid/plugin.js +0 -74
- package/public/contentbuilder/plugins/showgrid/readme.txt +0 -23
- package/public/contentbuilder/plugins/symbols/plugin.js +0 -3126
- package/public/contentbuilder/plugins/symbols/readme.txt +0 -23
- package/public/contentbuilder/plugins/wordcount/plugin.js +0 -76
- package/public/contentbuilder/plugins/wordcount/readme.txt +0 -23
- package/public/contentbuilder/themes/dark.css +0 -1377
package/readme.txt
CHANGED
|
@@ -1,259 +1,330 @@
|
|
|
1
|
-
|
|
1
|
+
========================================================================
|
|
2
|
+
CONTENTBUILDER.JS 6.0.0
|
|
3
|
+
========================================================================
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Thanks for using ContentBuilder.js - a browser-based drag & drop HTML
|
|
6
|
+
editor. This package contains the ready-to-use library plus HTML, PHP,
|
|
7
|
+
and JavaScript examples showing how to run and configure it.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
This file is your starting point. It covers:
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
1. Getting started (run the examples)
|
|
12
|
+
2. Where things live (a map of the package)
|
|
13
|
+
3. How to customize
|
|
14
|
+
4. Working with an AI assistant (Claude, etc.)
|
|
15
|
+
5. Setting up the AI features (API keys)
|
|
16
|
+
6. Canvas mode
|
|
17
|
+
7. Upgrading to a new version
|
|
18
|
+
8. Documentation & support
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
If you have the Source Code package (Super License), also see
|
|
21
|
+
readme-sourcecode.txt - it covers running and editing the library source.
|
|
10
22
|
|
|
11
|
-
https://github.com/innovastudio-dev/contentbuilder
|
|
12
23
|
|
|
13
|
-
|
|
24
|
+
------------------------------------------------------------------------
|
|
25
|
+
1. GETTING STARTED
|
|
26
|
+
------------------------------------------------------------------------
|
|
14
27
|
|
|
28
|
+
You can run the HTML, PHP, or JavaScript example. All you need for the
|
|
29
|
+
HTML and JavaScript ones is Node.js / npm installed:
|
|
30
|
+
https://nodejs.org/en/download/
|
|
15
31
|
|
|
16
|
-
Getting started
|
|
17
32
|
|
|
18
|
-
|
|
33
|
+
A. HTML EXAMPLE
|
|
19
34
|
|
|
20
|
-
|
|
35
|
+
1. Unzip the package (folder: ContentBuilder/)
|
|
21
36
|
|
|
22
|
-
|
|
37
|
+
2. From a terminal, in the project folder, install the server
|
|
38
|
+
dependencies (the example uses a Node.js server):
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
> cd ContentBuilder
|
|
41
|
+
> npm install
|
|
25
42
|
|
|
26
|
-
|
|
27
|
-
The example is using Node.js server.
|
|
43
|
+
3. Run the server:
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
> node server.js
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
4. Open in your browser:
|
|
32
48
|
|
|
33
|
-
|
|
34
|
-
|
|
49
|
+
http://localhost:8081/example1.html (default example)
|
|
50
|
+
http://localhost:8081/example-canvas.html (Canvas mode)
|
|
35
51
|
|
|
36
|
-
3. Run the server:
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
B. PHP EXAMPLE
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
Open in your browser:
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
http://localhost/.../public/example2.php
|
|
43
58
|
|
|
44
|
-
|
|
59
|
+
(In VS Code, the PHP Server extension is an easy way to serve it.)
|
|
45
60
|
|
|
46
|
-
http://localhost:8081/example-canvas.html (New Canvas Mode example)
|
|
47
61
|
|
|
62
|
+
C. JAVASCRIPT PROJECT
|
|
48
63
|
|
|
49
|
-
|
|
64
|
+
A small project that imports the library and configures it in code:
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
If you're using Visual Studio Code, you can use the PHP Server extension.
|
|
66
|
+
> npm install
|
|
67
|
+
> npm start
|
|
54
68
|
|
|
69
|
+
A browser window opens with the example running. The file to look
|
|
70
|
+
at is src/index.js (see the next section).
|
|
55
71
|
|
|
56
|
-
C. To try the JavaScript project, install the dependencies and start the project:
|
|
57
72
|
|
|
58
|
-
|
|
73
|
+
------------------------------------------------------------------------
|
|
74
|
+
2. WHERE THINGS LIVE
|
|
75
|
+
------------------------------------------------------------------------
|
|
59
76
|
|
|
60
|
-
|
|
77
|
+
src/index.js The JavaScript project's code: it
|
|
78
|
+
imports ContentBuilder (from the npm
|
|
79
|
+
package) and configures it. This is the
|
|
80
|
+
best place to learn how to wire up the
|
|
81
|
+
editor - uploads, AI providers, themes,
|
|
82
|
+
plugins - as real, working code you can
|
|
83
|
+
copy from.
|
|
61
84
|
|
|
62
|
-
|
|
85
|
+
public/ Everything served in the browser:
|
|
86
|
+
example1.html The main HTML example.
|
|
87
|
+
example-canvas.html Canvas / freeform mode.
|
|
88
|
+
example2.php The PHP example.
|
|
89
|
+
contentbuilder/ The built library + themes CSS.
|
|
90
|
+
assets/ Snippets, plugins, font files.
|
|
91
|
+
assets/plugins/ The plugins (one folder each).
|
|
92
|
+
api/ PHP backend endpoints (uploads, AI).
|
|
93
|
+
block/ CSS/JS used by Canvas mode.
|
|
63
94
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
src/index.js
|
|
95
|
+
server.js / server-aws.js The Node.js backend for the examples
|
|
96
|
+
(uploads + AI endpoints). server-aws.js
|
|
97
|
+
is the same thing using S3 storage.
|
|
68
98
|
|
|
69
|
-
|
|
99
|
+
.env Your API keys for the AI features
|
|
100
|
+
(see section 5). Needed only if you use
|
|
101
|
+
the AI-assisted features.
|
|
70
102
|
|
|
71
|
-
|
|
103
|
+
docs/ Documentation, including the upgrade
|
|
104
|
+
guide.
|
|
72
105
|
|
|
106
|
+
Note: this package contains the ready-to-use library, not its source.
|
|
107
|
+
If you need to change how the library itself works, that's what the
|
|
108
|
+
Source Code (Super License) package is for.
|
|
73
109
|
|
|
74
|
-
NOTE:
|
|
75
110
|
|
|
76
|
-
|
|
111
|
+
------------------------------------------------------------------------
|
|
112
|
+
3. HOW TO CUSTOMIZE
|
|
113
|
+
------------------------------------------------------------------------
|
|
77
114
|
|
|
78
|
-
1.
|
|
79
|
-
|
|
80
|
-
|
|
115
|
+
1. CONFIGURE WITH OPTIONS.
|
|
116
|
+
Most behavior - toolbars, upload handlers, AI endpoints, themes -
|
|
117
|
+
is controlled by the options object passed to
|
|
118
|
+
"new ContentBuilder({...})". See src/index.js for a live example,
|
|
119
|
+
and docs/ for the full list of options and methods.
|
|
81
120
|
|
|
82
|
-
|
|
121
|
+
2. ADD FEATURES WITH PLUGINS.
|
|
122
|
+
A plugin is its own folder under public/assets/plugins/<name>/
|
|
123
|
+
(an index.js and a style.css), loaded via the "plugins" option.
|
|
124
|
+
The plugin docs sit right beside them:
|
|
83
125
|
|
|
84
|
-
|
|
126
|
+
public/assets/plugins/README.md catalog
|
|
127
|
+
public/assets/plugins/plugin-dev-guide.md how to build one
|
|
128
|
+
public/assets/plugins/plugin-example.md worked example
|
|
129
|
+
public/assets/plugins/plugin-patterns.md common patterns
|
|
130
|
+
public/assets/plugins/plugin-best-practices.md conventions
|
|
85
131
|
|
|
86
|
-
|
|
132
|
+
They're plain Markdown, so you can hand the folder to an AI
|
|
133
|
+
assistant as reference and just describe the plugin you want.
|
|
87
134
|
|
|
88
|
-
|
|
135
|
+
3. RESTYLE WITH CSS / THEMES.
|
|
136
|
+
The editor ships with prebuilt theme CSS in
|
|
137
|
+
public/contentbuilder/. Pick a theme via options, or add your own
|
|
138
|
+
CSS to override styles. (The SCSS theme sources, for building new
|
|
139
|
+
themes from scratch, come with the Source Code package.)
|
|
89
140
|
|
|
90
|
-
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
|
91
141
|
|
|
92
|
-
|
|
142
|
+
------------------------------------------------------------------------
|
|
143
|
+
4. WORKING WITH AN AI ASSISTANT (CLAUDE, ETC.)
|
|
144
|
+
------------------------------------------------------------------------
|
|
93
145
|
|
|
94
|
-
|
|
146
|
+
An AI coding assistant such as Claude Code can do a lot with this package
|
|
147
|
+
alone. Point it at the project and it can read:
|
|
95
148
|
|
|
96
|
-
|
|
149
|
+
- docs/ - the documentation (options, methods, guides),
|
|
150
|
+
- src/index.js - a real, working configuration to follow,
|
|
151
|
+
- assets/plugins/ - the plugin API and docs.
|
|
97
152
|
|
|
98
|
-
|
|
153
|
+
With those in the project, it can tell you which option to set for a
|
|
154
|
+
given goal, adjust your src/index.js, or build a plugin against the real
|
|
155
|
+
plugin structure - grounded in the actual API rather than guesswork.
|
|
99
156
|
|
|
100
|
-
|
|
157
|
+
The Source Code package takes this further: with the full library source
|
|
158
|
+
in your project, an assistant has the complete context to work from - so
|
|
159
|
+
it builds with more confidence, and opens up a wider range of what you
|
|
160
|
+
can create, grounded in how ContentBuilder really works.
|
|
101
161
|
|
|
102
|
-
$OPENROUTER_API_KEY = 'YOUR_API_KEY';
|
|
103
|
-
|
|
104
|
-
3. Ensure that the sendCommandUrl parameter is set with the API endpoint:
|
|
105
162
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
// sendCommandUrl: '/openrouter', // Using OpenRouter (https://openrouter.ai/)
|
|
110
|
-
});
|
|
163
|
+
------------------------------------------------------------------------
|
|
164
|
+
5. SETTING UP THE AI FEATURES (API KEYS)
|
|
165
|
+
------------------------------------------------------------------------
|
|
111
166
|
|
|
112
|
-
|
|
167
|
+
The AI Assistant and AI image generation are optional. They work once
|
|
168
|
+
you add API keys and point the matching options at the endpoints. Most
|
|
169
|
+
examples in the package already have these options set, so they run as
|
|
170
|
+
soon as the keys are in place.
|
|
113
171
|
|
|
114
|
-
|
|
115
|
-
// ...
|
|
116
|
-
sendCommandUrl: 'api/sendcommand.php',
|
|
117
|
-
// sendCommandUrl: '/api/openrouter.php', // Using OpenRouter (https://openrouter.ai/)
|
|
118
|
-
});
|
|
172
|
+
Add your own security to the API endpoints before going to production!
|
|
119
173
|
|
|
120
|
-
Most examples in the package have this parameter configured, so you can run and test them.
|
|
121
174
|
|
|
122
|
-
|
|
123
|
-
Please refer to the Node.js file:
|
|
175
|
+
5.1 AI ASSISTANT
|
|
124
176
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- For speech recognition (if dictation is enabled), the browser's built-in
|
|
128
|
-
speech recognition is used. However, certain browsers may not support this feature.
|
|
129
|
-
We recommend using Deepgram for browser compatibility and accuracy.
|
|
130
|
-
Obtain the Deepgram API key from https://deepgram.com and update the .env file with your API key.
|
|
131
|
-
Then enable the 'speechTranscribeUrl' parameter in the ContentBuilder initialization (src/index.js).
|
|
177
|
+
1. Get an API key from OpenAI or OpenRouter:
|
|
132
178
|
|
|
133
|
-
|
|
179
|
+
https://openai.com
|
|
180
|
+
https://openrouter.ai (use this for access to many models)
|
|
134
181
|
|
|
135
|
-
|
|
182
|
+
2. Add it to the .env file:
|
|
136
183
|
|
|
137
|
-
|
|
184
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
|
185
|
+
OPENROUTER_API_KEY=YOUR_API_KEY
|
|
138
186
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
2. Update the .env file with your API key.
|
|
187
|
+
Or, for PHP, add it to api/config.php:
|
|
142
188
|
|
|
143
|
-
|
|
189
|
+
$OPENAI_API_KEY = 'YOUR_API_KEY';
|
|
190
|
+
$OPENROUTER_API_KEY = 'YOUR_API_KEY';
|
|
144
191
|
|
|
145
|
-
|
|
192
|
+
3. Set the sendCommandUrl option to the endpoint:
|
|
146
193
|
|
|
147
|
-
|
|
194
|
+
const builder = new ContentBuilder({
|
|
195
|
+
// ...
|
|
196
|
+
sendCommandUrl: '/sendcommand',
|
|
197
|
+
// sendCommandUrl: '/openrouter', // OpenRouter
|
|
198
|
+
});
|
|
148
199
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
https://openai.com
|
|
200
|
+
For PHP:
|
|
152
201
|
|
|
153
|
-
|
|
202
|
+
const builder = new ContentBuilder({
|
|
203
|
+
// ...
|
|
204
|
+
sendCommandUrl: 'api/sendcommand.php',
|
|
205
|
+
// sendCommandUrl: '/api/openrouter.php', // OpenRouter
|
|
206
|
+
});
|
|
154
207
|
|
|
155
|
-
|
|
208
|
+
The JavaScript project serves these endpoints from server.js.
|
|
156
209
|
|
|
157
|
-
Or if you're using PHP, update the api/config.php file with your API key:
|
|
158
210
|
|
|
159
|
-
|
|
211
|
+
5.2 AI IMAGE GENERATION
|
|
160
212
|
|
|
161
|
-
|
|
213
|
+
Current provider - Fal.ai:
|
|
162
214
|
|
|
163
|
-
|
|
164
|
-
// ...
|
|
215
|
+
1. Get an API key from https://fal.ai and add it to .env:
|
|
165
216
|
|
|
166
|
-
|
|
167
|
-
generateMediaUrl_Fal: '/request-fal',
|
|
168
|
-
checkRequestStatusUrl_Fal: '/status-fal',
|
|
169
|
-
getResultUrl_Fal: '/result-fal',
|
|
170
|
-
});
|
|
217
|
+
FAL_API_KEY=YOUR_API_KEY
|
|
171
218
|
|
|
172
|
-
|
|
219
|
+
(PHP: add $FAL_API_KEY = 'YOUR_API_KEY'; to api/config.php)
|
|
173
220
|
|
|
174
|
-
|
|
175
|
-
// ...
|
|
221
|
+
2. Also add an OpenAI key (https://openai.com) to .env:
|
|
176
222
|
|
|
177
|
-
|
|
178
|
-
generateMediaUrl_Fal: 'api/request-fal.php',
|
|
179
|
-
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
|
180
|
-
getResultUrl_Fal: 'api/result-fal.php',
|
|
181
|
-
});
|
|
223
|
+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
|
|
182
224
|
|
|
225
|
+
(PHP: $OPENAI_API_KEY = 'YOUR_API_KEY'; in api/config.php)
|
|
183
226
|
|
|
184
|
-
|
|
227
|
+
3. Set these options:
|
|
185
228
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
229
|
+
const builder = new ContentBuilder({
|
|
230
|
+
// ...
|
|
231
|
+
defaultImageGenerationProvider: 'fal',
|
|
232
|
+
generateMediaUrl_Fal: '/request-fal',
|
|
233
|
+
checkRequestStatusUrl_Fal: '/status-fal',
|
|
234
|
+
getResultUrl_Fal: '/result-fal',
|
|
235
|
+
});
|
|
189
236
|
|
|
190
|
-
|
|
237
|
+
For PHP:
|
|
191
238
|
|
|
192
|
-
|
|
239
|
+
const builder = new ContentBuilder({
|
|
240
|
+
// ...
|
|
241
|
+
defaultImageGenerationProvider: 'fal',
|
|
242
|
+
generateMediaUrl_Fal: 'api/request-fal.php',
|
|
243
|
+
checkRequestStatusUrl_Fal: 'api/status-fal.php',
|
|
244
|
+
getResultUrl_Fal: 'api/result-fal.php',
|
|
245
|
+
});
|
|
193
246
|
|
|
194
|
-
Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
|
|
195
247
|
|
|
196
|
-
|
|
248
|
+
Legacy provider - Getimg.ai:
|
|
197
249
|
|
|
198
|
-
|
|
250
|
+
1. Get an API key from https://getimg.ai/tools/api and add it to .env:
|
|
199
251
|
|
|
200
|
-
|
|
201
|
-
// ...
|
|
202
|
-
|
|
203
|
-
textToImageUrl: '/texttoimage',
|
|
204
|
-
upscaleImageUrl: '/upscaleimage',
|
|
205
|
-
imageModel: 'flux-schnell',
|
|
206
|
-
imageAutoUpscale: false,
|
|
207
|
-
// viewFileUrl: '/viewfile', // If using S3
|
|
208
|
-
});
|
|
252
|
+
GETIMG_API_KEY=YOUR_API_KEY
|
|
209
253
|
|
|
210
|
-
|
|
254
|
+
(PHP: add $GETIMG_API_KEY = 'YOUR_API_KEY'; to api/config.php)
|
|
211
255
|
|
|
212
|
-
|
|
213
|
-
// ...
|
|
214
|
-
|
|
215
|
-
textToImageUrl: 'api/texttoimage.php',
|
|
216
|
-
upscaleImageUrl: 'api/upscaleimage.php',
|
|
217
|
-
imageModel: 'flux-schnell',
|
|
218
|
-
imageAutoUpscale: false,
|
|
219
|
-
});
|
|
256
|
+
2. Set these options:
|
|
220
257
|
|
|
258
|
+
const builder = new ContentBuilder({
|
|
259
|
+
// ...
|
|
260
|
+
textToImageUrl: '/texttoimage',
|
|
261
|
+
upscaleImageUrl: '/upscaleimage',
|
|
262
|
+
imageModel: 'flux-schnell',
|
|
263
|
+
imageAutoUpscale: false,
|
|
264
|
+
// viewFileUrl: '/viewfile', // if using S3
|
|
265
|
+
});
|
|
221
266
|
|
|
222
|
-
|
|
267
|
+
For PHP:
|
|
223
268
|
|
|
224
|
-
|
|
225
|
-
|
|
269
|
+
const builder = new ContentBuilder({
|
|
270
|
+
// ...
|
|
271
|
+
textToImageUrl: 'api/texttoimage.php',
|
|
272
|
+
upscaleImageUrl: 'api/upscaleimage.php',
|
|
273
|
+
imageModel: 'flux-schnell',
|
|
274
|
+
imageAutoUpscale: false,
|
|
275
|
+
});
|
|
226
276
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
- IMPORTANT:
|
|
277
|
+
The JavaScript project serves these endpoints from server.js.
|
|
231
278
|
|
|
232
|
-
Please add your own security to the API endpoints!
|
|
233
279
|
|
|
234
|
-
|
|
235
|
-
|
|
280
|
+
------------------------------------------------------------------------
|
|
281
|
+
6. CANVAS MODE
|
|
282
|
+
------------------------------------------------------------------------
|
|
236
283
|
|
|
237
|
-
Canvas mode is
|
|
284
|
+
Canvas mode is an option for seamless (gridless) block positioning:
|
|
238
285
|
|
|
239
286
|
const builder = new ContentBuilder({
|
|
240
287
|
container: '.container',
|
|
241
288
|
canvas: true,
|
|
242
|
-
previewURL:'preview-canvas.html'
|
|
289
|
+
previewURL: 'preview-canvas.html',
|
|
243
290
|
});
|
|
244
291
|
|
|
245
|
-
|
|
292
|
+
It also needs these includes:
|
|
246
293
|
|
|
247
294
|
<link href="block/block.css" rel="stylesheet">
|
|
248
|
-
<script src="block/block.js">
|
|
295
|
+
<script src="block/block.js"></script>
|
|
296
|
+
|
|
297
|
+
See example-canvas.html in the package.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
------------------------------------------------------------------------
|
|
301
|
+
7. UPGRADING TO A NEW VERSION
|
|
302
|
+
------------------------------------------------------------------------
|
|
303
|
+
|
|
304
|
+
Updates are backward compatible - your existing content and code keep
|
|
305
|
+
working. You replace the package folders with the new ones:
|
|
306
|
+
|
|
307
|
+
public/contentbuilder/
|
|
308
|
+
public/assets/
|
|
309
|
+
public/runtime/
|
|
310
|
+
preview.html
|
|
311
|
+
|
|
312
|
+
And if you install from npm, also update the editor script:
|
|
249
313
|
|
|
250
|
-
|
|
314
|
+
> npm i @innovastudio/contentbuilder@latest
|
|
251
315
|
|
|
316
|
+
Full step-by-step instructions, including the optional Runtime library
|
|
317
|
+
that renders the new plugins, are in:
|
|
252
318
|
|
|
319
|
+
upgrading-contentbuilder.md
|
|
253
320
|
|
|
254
321
|
|
|
322
|
+
------------------------------------------------------------------------
|
|
323
|
+
8. DOCUMENTATION & SUPPORT
|
|
324
|
+
------------------------------------------------------------------------
|
|
255
325
|
|
|
256
|
-
|
|
257
|
-
|
|
326
|
+
Documentation: docs/README.md
|
|
327
|
+
https://github.com/innovastudio-dev/contentbuilder
|
|
328
|
+
Upgrade guide: upgrading-contentbuilder.md
|
|
258
329
|
|
|
259
|
-
Email us at: support@innovastudio.com
|
|
330
|
+
Questions? Email us at: support@innovastudio.com
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
//PLUGINS
|
|
2
|
-
// _cb.settings.plugins = ['preview','wordcount', 'symbols']; // old way
|
|
3
|
-
_cb.settings.plugins = [
|
|
4
|
-
{ name: 'preview', showInMainToolbar: true, showInElementToolbar: true },
|
|
5
|
-
{ name: 'wordcount', showInMainToolbar: true, showInElementToolbar: true },
|
|
6
|
-
{ name: 'symbols', showInMainToolbar: true, showInElementToolbar: false },
|
|
7
|
-
];
|