Skip to content

Commit 6a0f950

Browse files
author
Navneet Kumar
committed
update to 3.0.0-beta.1
1 parent aeb848b commit 6a0f950

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wysiwyg-editor-node-sdk",
3-
"version": "2.3.4-rc.1",
3+
"version": "3.0.0-beta.1",
44
"author": "Florin Marius Popescu <[email protected]> (https://www.froala.com/)",
55
"description": "Node.js SDK for Froala Editor",
66
"keywords": [
@@ -27,6 +27,6 @@
2727
"bower_components"
2828
],
2929
"dependencies": {
30-
"froala-wysiwyg-editor": "^2.3.4"
30+
"froala-wysiwyg-editor": "^3.0.0-beta.1"
3131
}
3232
}

examples/index.html

+18-17
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<script src="/bower_components/froala-wysiwyg-editor/js/plugins/save.min.js"></script>
5555
<script src="/bower_components/froala-wysiwyg-editor/js/plugins/table.min.js"></script>
5656
<script src="/bower_components/froala-wysiwyg-editor/js/plugins/video.min.js"></script>
57+
<script src="/bower_components/froala-wysiwyg-editor/js/plugins/edit_in_popup.min.js"></script>
5758
<!-- End Froala -->
5859

5960
<link rel="stylesheet" href="./app.css">
@@ -70,7 +71,7 @@ <h2>Sample 1: Save to disk</h2>
7071
</div>
7172
<script>
7273
$(function() {
73-
$('#edit').froalaEditor({
74+
var editor = new FroalaEditor('#edit', {
7475

7576
imageUploadURL: '/upload_image',
7677
imageUploadParams: {
@@ -87,9 +88,9 @@ <h2>Sample 1: Save to disk</h2>
8788
imageManagerDeleteMethod: "POST",
8889

8990
videoUploadURL: '/upload_video',
90-
})
91+
});
9192
// Catch image removal from the editor.
92-
.on('froalaEditor.image.removed', function (e, editor, $img) {
93+
editor.events.on('froalaEditor.image.removed', function (e, editor, $img) {
9394
$.ajax({
9495
// Request method.
9596
method: "POST",
@@ -108,8 +109,8 @@ <h2>Sample 1: Save to disk</h2>
108109
.fail (function (err) {
109110
console.log ('image delete problem: ' + JSON.stringify(err));
110111
})
111-
})
112-
.on('froalaEditor.video.removed', function (e, editor, $video) {
112+
});
113+
editor.events.on('froalaEditor.video.removed', function (e, editor, $video) {
113114
$.ajax({
114115
// Request method.
115116
method: "POST",
@@ -128,10 +129,10 @@ <h2>Sample 1: Save to disk</h2>
128129
.fail (function (err) {
129130
console.log ('video delete problem: ' + JSON.stringify(err));
130131
})
131-
})
132+
});
132133

133134
// Catch image removal from the editor.
134-
.on('froalaEditor.file.unlink', function (e, editor, link) {
135+
editor.events.on('froalaEditor.file.unlink', function (e, editor, link) {
135136

136137
$.ajax({
137138
// Request method.
@@ -163,7 +164,7 @@ <h2>Sample 2: Save to disk (resize on server)</h2>
163164
</div>
164165
<script>
165166
$(function() {
166-
$('#edit-resize').froalaEditor({
167+
var editor2 = new FroalaEditor('#edit-resize', {
167168

168169
imageUploadURL: '/upload_image_resize',
169170
imageUploadParams: {
@@ -178,9 +179,9 @@ <h2>Sample 2: Save to disk (resize on server)</h2>
178179
imageManagerLoadURL: '/load_images',
179180
imageManagerDeleteURL: "/delete_image",
180181
imageManagerDeleteMethod: "POST"
181-
})
182+
});
182183
// Catch image removal from the editor.
183-
.on('froalaEditor.image.removed', function (e, editor, $img) {
184+
editor2.events.on('froalaEditor.image.removed', function (e, editor, $img) {
184185
$.ajax({
185186
// Request method.
186187
method: "POST",
@@ -202,7 +203,7 @@ <h2>Sample 2: Save to disk (resize on server)</h2>
202203
})
203204

204205
// Catch image removal from the editor.
205-
.on('froalaEditor.file.unlink', function (e, editor, link) {
206+
editor2.events.on('froalaEditor.file.unlink', function (e, editor, link) {
206207

207208
$.ajax({
208209
// Request method.
@@ -234,7 +235,7 @@ <h2>Sample 3: Save to disk with custom validation: Images must be squares (width
234235
</div>
235236
<script>
236237
$(function() {
237-
$('#edit-validation').froalaEditor({
238+
var editor3 = new FroalaEditor('#edit-validation', {
238239

239240
imageUploadURL: '/upload_image_validation',
240241
imageUploadParams: {
@@ -252,9 +253,9 @@ <h2>Sample 3: Save to disk with custom validation: Images must be squares (width
252253
imageManagerLoadURL: '/load_images',
253254
imageManagerDeleteURL: "/delete_image",
254255
imageManagerDeleteMethod: "POST"
255-
})
256+
});
256257
// Catch image removal from the editor.
257-
.on('froalaEditor.image.removed', function (e, editor, $img) {
258+
editor3.events.on('froalaEditor.image.removed', function (e, editor, $img) {
258259
$.ajax({
259260
// Request method.
260261
method: "POST",
@@ -273,10 +274,10 @@ <h2>Sample 3: Save to disk with custom validation: Images must be squares (width
273274
.fail (function (err) {
274275
console.log ('image delete problem: ' + JSON.stringify(err));
275276
})
276-
})
277+
});
277278

278279
// Catch image removal from the editor.
279-
.on('froalaEditor.file.unlink', function (e, editor, link) {
280+
editor3.events.on('froalaEditor.file.unlink', function (e, editor, link) {
280281

281282
$.ajax({
282283
// Request method.
@@ -313,7 +314,7 @@ <h2>Sample 4: Save to Amazon using signature version 4</h2>
313314
$.get( "get_amazon", {})
314315
.done(function( data ) {
315316

316-
$('#edit-amazon').froalaEditor({
317+
new FroalaEditor('#edit-amazon', {
317318
imageUploadToS3: data,
318319
fileUploadToS3: data,
319320
videoUploadToS3: data

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wysiwyg-editor-node-sdk",
3-
"version": "2.3.4",
3+
"version": "3.0.0-beta.1",
44
"author": "Froala Labs",
55
"description": "Node.js SDK for Froala Editor",
66
"main": "lib/froalaEditor.js",

0 commit comments

Comments
 (0)