@qualityunit/liveagent-components-editor 0.0.54 → 0.0.55
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
|
@@ -1,47 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Editor component for LiveAgent
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Basic usage example:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```html
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<ckeditor5-classic placeHolder="Type text" lang="sk"/>
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
|
|
12
|
-
|
|
13
|
-
## Technical considerations
|
|
14
|
-
|
|
15
|
-
**Why use this over SvelteKit?**
|
|
16
|
-
|
|
17
|
-
- It brings its own routing solution which might not be preferable for some users.
|
|
18
|
-
- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
|
|
19
|
-
|
|
20
|
-
This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
|
|
21
|
-
|
|
22
|
-
Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
|
|
23
|
-
|
|
24
|
-
**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
|
|
25
|
-
|
|
26
|
-
Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
|
|
9
|
+
```
|
|
27
10
|
|
|
28
|
-
|
|
11
|
+
or
|
|
29
12
|
|
|
30
|
-
|
|
13
|
+
```ts
|
|
31
14
|
|
|
32
|
-
|
|
15
|
+
const editor = document.createElement('ckeditor5-classic');
|
|
16
|
+
editor.placeHolder = 'Type text';
|
|
17
|
+
editor.lang = 'sk';
|
|
18
|
+
document.body.appendChild(editor);
|
|
33
19
|
|
|
34
|
-
|
|
20
|
+
```
|
|
35
21
|
|
|
36
|
-
|
|
22
|
+
Advanced usage example:
|
|
37
23
|
|
|
38
|
-
|
|
24
|
+
```ts
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
const editor = document.createElement('ckeditor5-classic');
|
|
27
|
+
// needed for "imageUpload" when this feature is enabled
|
|
28
|
+
editor.insertImageServiceUrl = 'https://hosted.la.localhost/LiveAgent/server/agent/index.php?C=La_Agent_ImageUpload&M=upload&S=rghw2zc7hs9yfi0jh7qvoqxbl61t4nah&T=1720005193335e4&FormRequest=Y&FormResponse=Y';
|
|
29
|
+
// needed for "imageUpload" when this feature is enabled
|
|
30
|
+
editor.getImageServiceUrl = 'https://hosted.la.localhost/LiveAgent/server/scripts/file.php';
|
|
31
|
+
editor.items = ['undo', 'redo', '|', 'heading', 'bold', 'italic', 'strikethrough', 'underline', 'fontColor', 'fontBackgroundColor', 'fontFamily', 'fontSize', '|', 'numberedList', 'bulletedList', '|', 'outdent', 'indent', 'blockQuote', '|', 'alignment', '|', 'link', 'imageUpload', 'mediaEmbed', 'horizontalLine', 'specialCharacters', 'code', 'codeBlock', 'insertTable', '|', 'style', '|', 'removeFormat', 'selectAll', '|', 'sourceEditing'];
|
|
32
|
+
editor.allowHtmlSupport = false;
|
|
33
|
+
editor.value = 'Your text';
|
|
34
|
+
editor.placeHolder = 'Type text';
|
|
35
|
+
editor.lang = 'sk';
|
|
36
|
+
editor.valueChange = (evt, data) => {
|
|
37
|
+
console.log("Value change: " + editor.value, data);
|
|
38
|
+
};
|
|
39
|
+
editor.stateChange = (evt, data) => {
|
|
40
|
+
console.log("Status change: " + data);
|
|
41
|
+
};
|
|
42
|
+
editor.sourceEditingModeChange = (evt, data) => {
|
|
43
|
+
console.log("Source editing mode change: " + data);
|
|
44
|
+
};
|
|
45
|
+
editor.selectionRangeChange = (evt, data) => {
|
|
46
|
+
console.log("Selection range change: ", data);
|
|
47
|
+
};
|
|
48
|
+
document.body.appendChild(editor);
|
|
41
49
|
|
|
42
|
-
```ts
|
|
43
|
-
// store.ts
|
|
44
|
-
// An extremely simple external store
|
|
45
|
-
import { writable } from 'svelte/store'
|
|
46
|
-
export default writable(0)
|
|
47
50
|
```
|
package/dist/ckeditor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./ckeditor5-
|
|
1
|
+
import "./ckeditor5-CGOhm2Tg.js";
|
|
@@ -2296,7 +2296,7 @@ function y2(n, i) {
|
|
|
2296
2296
|
e
|
|
2297
2297
|
];
|
|
2298
2298
|
}
|
|
2299
|
-
const k2 = "42.0.
|
|
2299
|
+
const k2 = "42.0.2", C2 = new Date(2024, 6, 25);
|
|
2300
2300
|
/* istanbul ignore next -- @preserve */
|
|
2301
2301
|
if (globalThis.CKEDITOR_VERSION)
|
|
2302
2302
|
throw new w("ckeditor-duplicated-modules", null);
|
package/dist/editor-lib.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as M, S as T, i as j, f as v, s as y, e as d, a as B, b as h, d as w, g as m, l as C, n as $, h as H, j as O, r as Q, k as R, t as U, m as V, o as W, p as z, q as K, u as F, v as G, w as k, x as X, y as E, z as I, A as J, B as Y, C as q, D as Z } from "./ckeditor5-
|
|
1
|
+
import { c as M, S as T, i as j, f as v, s as y, e as d, a as B, b as h, d as w, g as m, l as C, n as $, h as H, j as O, r as Q, k as R, t as U, m as V, o as W, p as z, q as K, u as F, v as G, w as k, x as X, y as E, z as I, A as J, B as Y, C as q, D as Z } from "./ckeditor5-CGOhm2Tg.js";
|
|
2
2
|
function A(e) {
|
|
3
3
|
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
|
|
4
4
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Editor component for LiveAgent",
|
|
4
4
|
"author": "QualityUnit",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.55",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/*"
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"svelte": "^4.2.18",
|
|
31
31
|
"svelte-check": "^3.8.4",
|
|
32
32
|
"tslib": "^2.6.3",
|
|
33
|
-
"typescript": "^5.5.
|
|
34
|
-
"vite": "^5.3.
|
|
33
|
+
"typescript": "^5.5.4",
|
|
34
|
+
"vite": "^5.3.5"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"ckeditor5": "^42.0.
|
|
37
|
+
"ckeditor5": "^42.0.2"
|
|
38
38
|
}
|
|
39
39
|
}
|