@innovastudio/contentbox 1.0.12 → 1.0.16

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/README.md CHANGED
@@ -49,7 +49,7 @@ On the head section:
49
49
  <link href="box/box.css" rel="stylesheet" type="text/css" />
50
50
  ```
51
51
 
52
- And before the end of body tag:
52
+ And before the end of the body tag:
53
53
 
54
54
  ```html
55
55
  <script src="box/box.js" type="text/javascript"></script>
@@ -122,7 +122,7 @@ React and Vue project examples are provided in separate downloads in the user ar
122
122
 
123
123
  ## Predesigned Sections (Templates)
124
124
 
125
- To start building a page, you can click the (+) button on the top left sidebar. This will opens a selection of predesigned sections that you can add into your page.
125
+ To start building a page, you can click the (+) button on the top left sidebar. This will open a selection of predesigned sections that you can add into your page.
126
126
 
127
127
  ![Predesigned Sections](docs/predesigned-sections.png)
128
128
 
@@ -177,7 +177,7 @@ assets/minimalist-blocks/
177
177
 
178
178
  It contains:
179
179
  - content.js (snippets JSON file)
180
- - content.css (snippet css file)
180
+ - content.css (snippets css file)
181
181
  - images (contains assets for the snippets)
182
182
  - preview (contains snippet thumbnails)
183
183
 
@@ -214,13 +214,13 @@ A selection of typography styles is provided for you to choose to format your pa
214
214
 
215
215
  ![Typography Styles](docs/typography.png)
216
216
 
217
- The style can be used to format the entire page or just a specific section or box area of your page.
217
+ The style can be used to format the entire page or just a specific section or a box area of your page.
218
218
 
219
- If the page has one or more sections (or boxes) that have their own typography style, a modal dialog is opened for you to choose to replace all the sections' styles or keep the sections' style and format only the unstyled sections.
219
+ If the page has one or more sections (or boxes) that have their own typography style, a modal dialog is opened for you to choose and replace all the sections' styles or keep the sections' style and format only the unstyled sections.
220
220
 
221
221
  ![Apply options](docs/typography2.png)
222
222
 
223
- To apply the typography style for a specific section or box area, open the Box Settings dialog, select 'Text' tab and click 'Change Style'.
223
+ To apply the typography style for a specific section or box area, open the Box Settings dialog, select the 'Text' tab and click 'Change Style'.
224
224
 
225
225
  ![Apply to a specific section](docs/typography3.png)
226
226
 
@@ -262,11 +262,11 @@ _txt['Italic'] = 'Italic';
262
262
 
263
263
  You can create your own language file by copying/modifying this file.
264
264
 
265
- ## Adding Custon Buttons to the Sidebar
265
+ ## Adding Custom Buttons to the Sidebar
266
266
 
267
- To add custom buttons to the sidebar, use **addButton** method.
267
+ To add custom buttons to the sidebar, use the **addButton** method.
268
268
 
269
- Here is an example of adding Undo & Redo button. For undo and redo operation, we call the **undo()** and **redo()** methods.
269
+ Here is an example of adding the Undo & Redo button. For the undo and redo operation, we call the **undo()** and **redo()** methods.
270
270
 
271
271
  ```javascript
272
272
  builder.addButton({
@@ -316,15 +316,15 @@ builder.addButton({
316
316
  });
317
317
  ```
318
318
 
319
- Here we get the content and its styles using **html()**, **mainCss()**, and **sectionCss()** methods and save them into the browser's local storage. The content then will be used in the **preview.html** for viewing.
319
+ Here we get the content and its styles using the **html()**, **mainCss()**, and **sectionCss()** methods and save them into the browser's local storage. The content will then be used in the **preview.html** for viewing.
320
320
 
321
321
  ## Embedding Box Cover (Background) Image
322
322
 
323
- In Box Settings, you can specify box's cover or background image.
323
+ In the Box Settings, you can specify a box's cover or background image.
324
324
 
325
325
  ![Box Cover](docs/box-cover.png)
326
326
 
327
- However, for quick upload an image without opening the Box Settings, you can click the box's image button. This allows you to browse local images and select an image to upload as a box's image cover (background).
327
+ However, to quickly upload an image without opening the Box Settings, you can click the box image button. This allows you to browse local images and select an image to upload as a box image cover (background).
328
328
 
329
329
  ![Box Cover](docs/box-cover2.png)
330
330
 
@@ -337,7 +337,7 @@ There are 2 methods for uploading cover image:
337
337
 
338
338
  #### Form Method
339
339
 
340
- Here we use **coverImageHandler** parameter to specify upload handler for saving image on the server.
340
+ Here we use the **coverImageHandler** parameter to specify the upload handler for saving images on the server.
341
341
 
342
342
  ```javascript
343
343
  const builder = new ContentBox({
@@ -354,7 +354,7 @@ As examples, you can use the provided handler:
354
354
 
355
355
  #### AJAX Post Method
356
356
 
357
- Here we use **onUploadCoverImage** parameter to specify a custom upload function.
357
+ Here we use the **onUploadCoverImage** parameter to specify a custom upload function.
358
358
 
359
359
  ```javascript
360
360
  const builder = new ContentBox({
@@ -383,7 +383,7 @@ const builder = new ContentBox({
383
383
  });
384
384
  ```
385
385
 
386
- Within the function we can use Axios to post an image to the server. Then the server should return the saved image url. Here we use **boxImage(url)** method to apply the image url as a background cover.
386
+ Within the function we can use Axios to post an image to the server. Then the server should return the saved image url. Here we use the **boxImage(url)** method to apply the image url as a background cover.
387
387
 
388
388
  In this example, the image is posted to an endpoint: **/upload**
389
389
  If you’re using Node.js, you can implement the endpoint to save the image using:
@@ -420,7 +420,7 @@ let html = builder.html();
420
420
  let mainCss = builder.mainCss(); // Returns the default typography style for the page.
421
421
  let sectioncss = builder.sectioncss(); // Returns the typography styles for specific sections on the page
422
422
  ```
423
- You can save the HTML and its styles above into a database. And when you need to load the content back for editing, use **loadHtml()** and **loadStyles** methods.
423
+ You can save the HTML and its styles above into a database. And when you need to load the content back for editing, use the **loadHtml()** and **loadStyles** methods.
424
424
 
425
425
  ```javascript
426
426
  builder.loadHtml(html);
@@ -453,9 +453,9 @@ builder.destroy();
453
453
 
454
454
  ## ContentBuilder.js Features
455
455
 
456
- ContentBox.js uses ContentBuilder.js as its HTML editor. So most of the ContentBuilder.js options/parameters can be accessed through ContentBox.js object.
456
+ ContentBox.js uses ContentBuilder.js as its HTML editor. So most of the ContentBuilder.js options/parameters can be accessed through the ContentBox.js object.
457
457
 
458
- For example, to specify custom file browser (or Asset Manager):
458
+ For example, to specify a custom file browser (or Asset Manager):
459
459
 
460
460
  ```javascript
461
461
  const builder = new ContentBox({
@@ -508,5 +508,5 @@ function uploadFile(e, callback) {
508
508
  }
509
509
  ```
510
510
 
511
- More configuration options can be found in ContentBuilder.js documentation: https://innovastudio.com/docs/contentbuilder.pdf
511
+ More configuration options can be found in the ContentBuilder.js documentation: https://innovastudio.com/docs/contentbuilder.pdf
512
512
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
- "version": "1.0.12",
3
+ "version": "1.0.16",
4
4
  "description": "",
5
5
  "main": "public/contentbox/contentbox.esm.js",
6
6
  "files": [
@@ -38,11 +38,12 @@
38
38
  "webpack-dev-server": "^4.0.0"
39
39
  },
40
40
  "dependencies": {
41
- "@innovastudio/contentbuilder": "^1.0.43",
41
+ "@innovastudio/contentbuilder": "^1.0.49",
42
42
  "axios": "^0.21.4",
43
43
  "cors": "^2.8.5",
44
44
  "express": "^4.17.1",
45
45
  "express-session": "^1.17.2",
46
+ "js-beautify": "^1.14.0",
46
47
  "pace-js": "^1.2.4"
47
48
  }
48
49
  }