@exmg/exm-wysiwyg-editor 1.1.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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/actions/anchor/action.d.ts +9 -0
  4. package/dist/actions/anchor/action.js +108 -0
  5. package/dist/actions/anchor/dialog/exm-wysiwyg-toolbar-dialog-css.d.ts +1 -0
  6. package/dist/actions/anchor/dialog/exm-wysiwyg-toolbar-dialog-css.js +53 -0
  7. package/dist/actions/anchor/dialog/exm-wysiwyg-toolbar-link-dialog.d.ts +21 -0
  8. package/dist/actions/anchor/dialog/exm-wysiwyg-toolbar-link-dialog.js +124 -0
  9. package/dist/actions/anchor/options.d.ts +9 -0
  10. package/dist/actions/anchor/options.js +30 -0
  11. package/dist/actions/anchor/types.d.ts +13 -0
  12. package/dist/actions/anchor/types.js +2 -0
  13. package/dist/actions/block.d.ts +19 -0
  14. package/dist/actions/block.js +25 -0
  15. package/dist/actions/fullScreen.d.ts +8 -0
  16. package/dist/actions/fullScreen.js +21 -0
  17. package/dist/actions/heading.d.ts +19 -0
  18. package/dist/actions/heading.js +25 -0
  19. package/dist/actions/lists.d.ts +13 -0
  20. package/dist/actions/lists.js +17 -0
  21. package/dist/actions/text.d.ts +25 -0
  22. package/dist/actions/text.js +33 -0
  23. package/dist/exm-wysiwyg-editor-base.d.ts +38 -0
  24. package/dist/exm-wysiwyg-editor-base.js +199 -0
  25. package/dist/exm-wysiwyg-editor-toolbar-base.d.ts +18 -0
  26. package/dist/exm-wysiwyg-editor-toolbar-base.js +75 -0
  27. package/dist/exm-wysiwyg-editor-toolbar.d.ts +9 -0
  28. package/dist/exm-wysiwyg-editor-toolbar.js +12 -0
  29. package/dist/exm-wysiwyg-editor.d.ts +18 -0
  30. package/dist/exm-wysiwyg-editor.js +21 -0
  31. package/dist/index.d.ts +3 -0
  32. package/dist/index.js +4 -0
  33. package/dist/styles/exm-wysiwyg-editor-css.d.ts +1 -0
  34. package/dist/styles/exm-wysiwyg-editor-css.js +142 -0
  35. package/dist/styles/exm-wysiwyg-editor-toolbar-css.d.ts +1 -0
  36. package/dist/styles/exm-wysiwyg-editor-toolbar-css.js +43 -0
  37. package/dist/toolbarActions.d.ts +4 -0
  38. package/dist/toolbarActions.js +39 -0
  39. package/dist/types.d.ts +44 -0
  40. package/dist/types.js +17 -0
  41. package/dist/utils.d.ts +1 -0
  42. package/dist/utils.js +2 -0
  43. package/package.json +67 -0
@@ -0,0 +1,44 @@
1
+ import { Editor } from '@tiptap/core';
2
+ export declare enum EditorActions {
3
+ Heading_1 = "heading1",
4
+ Heading_2 = "heading2",
5
+ Heading_3 = "heading3",
6
+ Bold = "bold",
7
+ Italic = "italic",
8
+ Strike = "strike",
9
+ Underline = "underline",
10
+ Anchor = "anchor",
11
+ Blockquote = "blockquote",
12
+ OrderedList = "ordered_list",
13
+ UnOrderedList = "unordered_list",
14
+ Separator = "separator",
15
+ FullScreen = "fullscreen"
16
+ }
17
+ export type EditorButtonActions = EditorActions.Heading_1 | EditorActions.Heading_2 | EditorActions.Heading_3 | EditorActions.Bold | EditorActions.Italic | EditorActions.Strike | EditorActions.Underline | EditorActions.Anchor | EditorActions.Blockquote | EditorActions.OrderedList | EditorActions.UnOrderedList | EditorActions.FullScreen;
18
+ export type EditorSeparator = EditorActions.Separator;
19
+ export type ActionOptions = {
20
+ event?: MouseEvent;
21
+ };
22
+ export type EditorAction = {
23
+ /**
24
+ * The action to perform when clicking the toolbar button
25
+ * @param editor The editor instance
26
+ * @param options
27
+ */
28
+ action: (editor?: Editor, options?: ActionOptions) => void;
29
+ /**
30
+ * isActive gets called on every (re)render of the button.
31
+ * @param editor
32
+ * @returns boolean if the button should be active or not
33
+ */
34
+ isActive: (editor?: Editor) => boolean;
35
+ /**
36
+ * Icon can be either a single icon or an array with 2 icon names.
37
+ * The first icon is used for the default state and the second is set when isActive returns true
38
+ */
39
+ icon: string | string[];
40
+ /**
41
+ * Title for the button. Will appear when hovering the button
42
+ */
43
+ title: string;
44
+ };
package/dist/types.js ADDED
@@ -0,0 +1,17 @@
1
+ export var EditorActions;
2
+ (function (EditorActions) {
3
+ EditorActions["Heading_1"] = "heading1";
4
+ EditorActions["Heading_2"] = "heading2";
5
+ EditorActions["Heading_3"] = "heading3";
6
+ EditorActions["Bold"] = "bold";
7
+ EditorActions["Italic"] = "italic";
8
+ EditorActions["Strike"] = "strike";
9
+ EditorActions["Underline"] = "underline";
10
+ EditorActions["Anchor"] = "anchor";
11
+ EditorActions["Blockquote"] = "blockquote";
12
+ EditorActions["OrderedList"] = "ordered_list";
13
+ EditorActions["UnOrderedList"] = "unordered_list";
14
+ EditorActions["Separator"] = "separator";
15
+ EditorActions["FullScreen"] = "fullscreen";
16
+ })(EditorActions = EditorActions || (EditorActions = {}));
17
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ export declare const sleep: (time: number) => Promise<unknown>;
package/dist/utils.js ADDED
@@ -0,0 +1,2 @@
1
+ export const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
2
+ //# sourceMappingURL=utils.js.map
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@exmg/exm-wysiwyg-editor",
3
+ "version": "1.1.16",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "module": "dist/index.js",
8
+ "exports": {
9
+ ".": "./dist/index.js",
10
+ "./exm-wysiwyg-editor.js": "./dist/exm-wysiwyg-editor.js"
11
+ },
12
+ "description": "A configurable wysiwyg editor ti create plain HTML content",
13
+ "contributors": [
14
+ "Ex Machina Group"
15
+ ],
16
+ "keywords": [
17
+ "web-components",
18
+ "typescript",
19
+ "lit",
20
+ "wysiwyg",
21
+ "editor",
22
+ "wysiwyg"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git@bitbucket.org:exmachina/exm-web-components.git",
27
+ "directory": "packages/exm-wysiwyg-editor"
28
+ },
29
+ "homepage": "https://bitbucket.org/exmachina/exm-web-components",
30
+ "license": "MIT",
31
+ "files": [
32
+ "**/*.scss",
33
+ "**/*.js",
34
+ "**/*.d.ts"
35
+ ],
36
+ "dependencies": {
37
+ "@tiptap/core": "^2.11.7",
38
+ "@tiptap/extension-blockquote": "^2.11.7",
39
+ "@tiptap/extension-bold": "^2.11.7",
40
+ "@tiptap/extension-bullet-list": "^2.11.7",
41
+ "@tiptap/extension-document": "^2.11.7",
42
+ "@tiptap/extension-heading": "^2.11.7",
43
+ "@tiptap/extension-italic": "^2.11.7",
44
+ "@tiptap/extension-link": "^2.11.7",
45
+ "@tiptap/extension-list-item": "^2.11.7",
46
+ "@tiptap/extension-ordered-list": "^2.11.7",
47
+ "@tiptap/extension-paragraph": "^2.11.7",
48
+ "@tiptap/extension-strike": "^2.11.7",
49
+ "@tiptap/extension-text": "^2.11.7",
50
+ "@tiptap/extension-underline": "^2.11.7"
51
+ },
52
+ "peerDependencies": {
53
+ "@exmg/lit-base": "^3.0.3",
54
+ "@material/web": "^2.2.0",
55
+ "lit": "^3.2.1",
56
+ "tslib": "^2.6.2"
57
+ },
58
+ "devDependencies": {
59
+ "@types/codemirror": "^0.0.79",
60
+ "@types/marked": "^1.2.2"
61
+ },
62
+ "scripts": {},
63
+ "publishConfig": {
64
+ "access": "public"
65
+ },
66
+ "gitHead": "e0ce15fa919af66b23633174437044a47b0b683a"
67
+ }