Skip to content

Commit 341bc79

Browse files
committed
Bug fix & upgrade
1 parent a197ccd commit 341bc79

File tree

15 files changed

+2725
-3277
lines changed

15 files changed

+2725
-3277
lines changed

package-lock.json

Lines changed: 2664 additions & 3262 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"lit-html": "1.4.1"
99
},
1010
"devDependencies": {
11-
"webpack-babel-multi-target-plugin": "2.3.3",
11+
"webpack-babel-multi-target-plugin": "2.5.0",
1212
"copy-webpack-plugin": "5.1.2",
1313
"compression-webpack-plugin": "4.0.1",
1414
"raw-loader": "3.1.0",
@@ -23,7 +23,9 @@
2323
"file-loader": "6.1.0",
2424
"extra-watch-webpack-plugin": "1.0.3",
2525
"lit-css-loader": "0.0.4",
26-
"extract-loader": "5.1.0"
26+
"extract-loader": "5.1.0",
27+
"babel-loader": "8.2.2",
28+
"html-webpack-plugin": "4.5.2"
2729
},
2830
"hash": ""
2931
},
@@ -35,7 +37,7 @@
3537
"lit-html": "1.4.1"
3638
},
3739
"devDependencies": {
38-
"webpack-babel-multi-target-plugin": "2.3.3",
40+
"webpack-babel-multi-target-plugin": "2.5.0",
3941
"copy-webpack-plugin": "5.1.2",
4042
"compression-webpack-plugin": "4.0.1",
4143
"raw-loader": "3.1.0",
@@ -50,6 +52,8 @@
5052
"file-loader": "6.1.0",
5153
"extra-watch-webpack-plugin": "1.0.3",
5254
"lit-css-loader": "0.0.4",
53-
"extract-loader": "5.1.0"
55+
"extract-loader": "5.1.0",
56+
"babel-loader": "8.2.2",
57+
"html-webpack-plugin": "4.5.2"
5458
}
5559
}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.wontlost</groupId>
77
<artifactId>ckeditor-vaadin</artifactId>
8-
<version>2.2.0</version>
8+
<version>2.3.0</version>
99
<name>CKEditorVaadin</name>
1010
<description>Integration of CKEditor 5 for Vaadin 14</description>
1111
<scm>
@@ -14,7 +14,7 @@
1414
<developerConnection>scm:git:git@https://github.com/eroself/vaadin-litelement-ckeditor.git</developerConnection>
1515
</scm>
1616
<properties>
17-
<vaadin.version>14.6.8</vaadin.version>
17+
<vaadin.version>14.7.3</vaadin.version>
1818
<vaadin-applayout-addon.version>4.0.0.rc5</vaadin-applayout-addon.version>
1919
<maven.compiler.release>11</maven.compiler.release>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/com/wontlost/ckeditor/Config.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public Config() {
115115
configs.put(ConfigType.table, Json.createObject());
116116
configs.put(ConfigType.title, Json.createObject());
117117
configs.put(ConfigType.typing, Json.createObject());
118+
configs.put(ConfigType.ui, Json.createObject());
118119
configs.put(ConfigType.wordCount, Json.createObject());
119120
configs.put(ConfigType.wproofreader, Json.createObject());
120121
}
@@ -154,6 +155,7 @@ public Config() {
154155
configs.put(ConfigType.title, jsonObject.get(ConfigType.title.name()));
155156
configs.put(ConfigType.typing, jsonObject.get(ConfigType.typing.name()));
156157
configs.put(ConfigType.wordCount, jsonObject.get(ConfigType.wordCount.name()));
158+
configs.put(ConfigType.ui, jsonObject.get(ConfigType.ui.name()));
157159
configs.put(ConfigType.wproofreader, jsonObject.get(ConfigType.wproofreader.name()));
158160
}
159161

@@ -213,6 +215,16 @@ public void setEditorToolBar(Toolbar[] editorToolBar) {
213215
configs.put(ConfigType.toolbar, toJsonArray(editorToolBar));
214216
}
215217

218+
/**
219+
* @param editorToolBar Toolbar of Editor, refer to enum @Constants.Toolbar
220+
*/
221+
public void setEditorToolBarObject(Toolbar[] editorToolBar, Boolean shouldNotGroupWhenFull) {
222+
JsonObject toolbar = Json.createObject();
223+
toolbar.put("items", toJsonArray(editorToolBar));
224+
toolbar.put("shouldNotGroupWhenFull", shouldNotGroupWhenFull);
225+
configs.put(ConfigType.toolbar, toolbar);
226+
}
227+
216228
/**
217229
* @param uiLanguage Language of user interface, refer to enum @Language
218230
*/
@@ -303,6 +315,17 @@ public void setCloudServices(String bundleVersion, String tokenUrl, String uploa
303315
configs.put(ConfigType.cloudServices, cloudServices);
304316
}
305317

318+
public void setUiViewportOffset(Double top, Double left, Double bottom, Double right) {
319+
JsonObject ui = Json.createObject();
320+
JsonObject viewportOffset = Json.createObject();
321+
viewportOffset.put("top", top);
322+
viewportOffset.put("left", left);
323+
viewportOffset.put("bottom", bottom);
324+
viewportOffset.put("right", right);
325+
ui.put("viewportOffset", viewportOffset);
326+
configs.put(ConfigType.ui, ui);
327+
}
328+
306329
/**
307330
*
308331
* @param indentSequence A sequence of characters inserted or removed from the code block lines 、

src/main/java/com/wontlost/ckeditor/Constants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public enum ConfigType {
4747
wordCount,
4848
licenseKey,
4949
pagination,
50+
ui,
5051
wproofreader
5152

5253
}

src/main/resources/META-INF/frontend/ckeditor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/META-INF/frontend/translations/de.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/META-INF/frontend/translations/it.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/META-INF/frontend/translations/nl.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/META-INF/frontend/translations/no.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)