@richhtmleditor/vue 1.0.0
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/LICENSE +21 -0
- package/README.md +138 -0
- package/dist/RichHtmlEditor.d.ts +87 -0
- package/dist/RichHtmlEditor.d.ts.map +1 -0
- package/dist/RichHtmlEditor.js +101 -0
- package/dist/RichHtmlEditor.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rajkishor Sahu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# @richhtmleditor/vue
|
|
2
|
+
|
|
3
|
+
Vue 3 component for Rich HTML Editor, built on [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core). WYSIWYG authoring with toolbar presets, slot-based custom tools, and enterprise plugin support.
|
|
4
|
+
|
|
5
|
+
**Current release: 1.0.0** — Depends on `@richhtmleditor/core` **^1.0.0**.
|
|
6
|
+
|
|
7
|
+
**Repository:** [github.com/rajkishorsahu89/richhtmleditor](https://github.com/rajkishorsahu89/richhtmleditor)
|
|
8
|
+
|
|
9
|
+
**Demo:** [richhtmleditor.vercel.app](https://richhtmleditor.vercel.app/) — [demo](https://richhtmleditor.vercel.app/demo) · [guide](https://richhtmleditor.vercel.app/guide) · [API](https://richhtmleditor.vercel.app/api). Doc Preview joint demo: [doc-preview-app.vercel.app/demo/enterprise](https://doc-preview-app.vercel.app/demo/enterprise)
|
|
10
|
+
|
|
11
|
+
### What's in 1.0.0
|
|
12
|
+
|
|
13
|
+
- **`RichHtmlEditor`** — Vue 3 `defineComponent` wrapper around `createEditor`
|
|
14
|
+
- **Props** — `content`, `editable`, `dark`, `theme`, `toolbar`, `features`, `plugins`
|
|
15
|
+
- **Custom tools** — `customToolIds` with `#tool-{id}` or default `#tool` slots
|
|
16
|
+
- **Events** — `@change` and `@save` emit `EditorContent`
|
|
17
|
+
- Re-exports all public symbols from `@richhtmleditor/core`
|
|
18
|
+
|
|
19
|
+
> Ships as ESM with TypeScript declarations. Peer dep: `vue` ^3.5. Import [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) CSS in your app entry.
|
|
20
|
+
|
|
21
|
+
**Keywords:** `richhtmleditor` `vue` `vue3` `wysiwyg` `rich-text-editor`
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install @richhtmleditor/vue @richhtmleditor/themes
|
|
27
|
+
# Adds @richhtmleditor/core automatically.
|
|
28
|
+
# Peer dep: vue ^3.5.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Usage — component
|
|
32
|
+
|
|
33
|
+
```vue
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { ref } from "vue";
|
|
36
|
+
import { RichHtmlEditor } from "@richhtmleditor/vue";
|
|
37
|
+
import "@richhtmleditor/themes/richhtmleditor.css";
|
|
38
|
+
|
|
39
|
+
const html = ref("<p>Hello <strong>world</strong></p>");
|
|
40
|
+
|
|
41
|
+
function onChange(content: { html: string }) {
|
|
42
|
+
html.value = content.html;
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<RichHtmlEditor
|
|
48
|
+
:content="html"
|
|
49
|
+
toolbar="standard"
|
|
50
|
+
:features="{ tables: true, media: true }"
|
|
51
|
+
@change="onChange"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Usage — custom tool slot
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
<RichHtmlEditor
|
|
60
|
+
:toolbar="{ preset: 'standard', layout: ['bold', 'italic', '|', 'approve'] }"
|
|
61
|
+
:custom-tool-ids="['approve']"
|
|
62
|
+
>
|
|
63
|
+
<template #tool-approve="{ tool }">
|
|
64
|
+
<button type="button" @click="approve">Approve</button>
|
|
65
|
+
</template>
|
|
66
|
+
</RichHtmlEditor>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Usage — enterprise plugins
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<script setup lang="ts">
|
|
73
|
+
import { createAiPlugin } from "@richhtmleditor/ai";
|
|
74
|
+
import { createCommentsPlugin } from "@richhtmleditor/comments";
|
|
75
|
+
import { createWorkflowsPlugin } from "@richhtmleditor/workflows";
|
|
76
|
+
import { resolveEnterpriseFeatures } from "@richhtmleditor/enterprise/browser";
|
|
77
|
+
|
|
78
|
+
const gate = resolveEnterpriseFeatures({ token: "RHE-ENT-DEMO-2026-FULL" });
|
|
79
|
+
|
|
80
|
+
const plugins = [
|
|
81
|
+
createAiPlugin(),
|
|
82
|
+
createCommentsPlugin({ author: "Reviewer" }),
|
|
83
|
+
createWorkflowsPlugin({ actor: "Legal", role: "editor" })
|
|
84
|
+
];
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<RichHtmlEditor
|
|
89
|
+
toolbar="full"
|
|
90
|
+
:features="gate.features"
|
|
91
|
+
:plugins="plugins"
|
|
92
|
+
/>
|
|
93
|
+
</template>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## API
|
|
97
|
+
|
|
98
|
+
### `RichHtmlEditor` props
|
|
99
|
+
|
|
100
|
+
| Prop | Type | Description |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| `content` | `string` | HTML content. |
|
|
103
|
+
| `editable` | `boolean` | Enable editing (default `true`). |
|
|
104
|
+
| `dark` | `boolean` | Dark theme tokens. |
|
|
105
|
+
| `theme` | `EditorThemeTokens` | Custom CSS variable overrides. |
|
|
106
|
+
| `toolbar` | `ToolbarConfig \| ToolbarPresetId` | Toolbar preset or custom layout. |
|
|
107
|
+
| `features` | `EditorFeatureFlags` | Feature gates. |
|
|
108
|
+
| `plugins` | `EditorPlugin[]` | Enterprise and custom plugins. |
|
|
109
|
+
| `customToolIds` | `string[]` | Tool IDs with matching `#tool-{id}` slots. |
|
|
110
|
+
|
|
111
|
+
### `RichHtmlEditor` events
|
|
112
|
+
|
|
113
|
+
| Event | Payload | Description |
|
|
114
|
+
| --- | --- | --- |
|
|
115
|
+
| `change` | `EditorContent` | Fired on document edits. |
|
|
116
|
+
| `save` | `EditorContent` | Fired on save command. |
|
|
117
|
+
|
|
118
|
+
### Slots
|
|
119
|
+
|
|
120
|
+
| Slot | Props | Description |
|
|
121
|
+
| --- | --- | --- |
|
|
122
|
+
| `tool-{id}` | `{ tool: ResolvedToolbarTool }` | Custom toolbar UI for a tool ID in `customToolIds`. |
|
|
123
|
+
| `tool` | `{ tool: ResolvedToolbarTool }` | Fallback slot when no `tool-{id}` slot exists. |
|
|
124
|
+
|
|
125
|
+
## Related packages
|
|
126
|
+
|
|
127
|
+
- [`@richhtmleditor/core`](https://www.npmjs.com/package/@richhtmleditor/core) — framework-agnostic engine (auto-installed).
|
|
128
|
+
- [`@richhtmleditor/themes`](https://www.npmjs.com/package/@richhtmleditor/themes) — shared CSS.
|
|
129
|
+
- [`@richhtmleditor/react`](https://www.npmjs.com/package/@richhtmleditor/react) — React component.
|
|
130
|
+
- [`@richhtmleditor/angular`](https://www.npmjs.com/package/@richhtmleditor/angular) — Angular component.
|
|
131
|
+
- [`@richhtmleditor/enterprise`](https://www.npmjs.com/package/@richhtmleditor/enterprise) — licence and feature gates.
|
|
132
|
+
- [`@richhtmleditor/ai`](https://www.npmjs.com/package/@richhtmleditor/ai) — AI authoring plugin.
|
|
133
|
+
- [`@richhtmleditor/comments`](https://www.npmjs.com/package/@richhtmleditor/comments) — review comments plugin.
|
|
134
|
+
- [`@richhtmleditor/workflows`](https://www.npmjs.com/package/@richhtmleditor/workflows) — approval workflows plugin.
|
|
135
|
+
|
|
136
|
+
## License
|
|
137
|
+
|
|
138
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type PropType, type VNode } from "vue";
|
|
2
|
+
import { type EditorContent, type EditorFeatureFlags, type EditorPlugin, type EditorThemeTokens, type ToolbarConfig, type ToolbarPresetId } from "@richhtmleditor/core";
|
|
3
|
+
export declare const RichHtmlEditor: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
content: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: undefined;
|
|
7
|
+
};
|
|
8
|
+
editable: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
dark: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
theme: {
|
|
17
|
+
type: PropType<EditorThemeTokens>;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
toolbar: {
|
|
21
|
+
type: PropType<ToolbarConfig | ToolbarPresetId>;
|
|
22
|
+
default: undefined;
|
|
23
|
+
};
|
|
24
|
+
features: {
|
|
25
|
+
type: PropType<EditorFeatureFlags>;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
28
|
+
plugins: {
|
|
29
|
+
type: PropType<EditorPlugin[]>;
|
|
30
|
+
default: undefined;
|
|
31
|
+
};
|
|
32
|
+
customToolIds: {
|
|
33
|
+
type: PropType<string[]>;
|
|
34
|
+
default: () => never[];
|
|
35
|
+
};
|
|
36
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
change: (_value: EditorContent) => true;
|
|
40
|
+
save: (_value: EditorContent) => true;
|
|
41
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
42
|
+
content: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
editable: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
dark: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
theme: {
|
|
55
|
+
type: PropType<EditorThemeTokens>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
toolbar: {
|
|
59
|
+
type: PropType<ToolbarConfig | ToolbarPresetId>;
|
|
60
|
+
default: undefined;
|
|
61
|
+
};
|
|
62
|
+
features: {
|
|
63
|
+
type: PropType<EditorFeatureFlags>;
|
|
64
|
+
default: undefined;
|
|
65
|
+
};
|
|
66
|
+
plugins: {
|
|
67
|
+
type: PropType<EditorPlugin[]>;
|
|
68
|
+
default: undefined;
|
|
69
|
+
};
|
|
70
|
+
customToolIds: {
|
|
71
|
+
type: PropType<string[]>;
|
|
72
|
+
default: () => never[];
|
|
73
|
+
};
|
|
74
|
+
}>> & Readonly<{
|
|
75
|
+
onChange?: ((_value: EditorContent) => any) | undefined;
|
|
76
|
+
onSave?: ((_value: EditorContent) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
content: string;
|
|
79
|
+
editable: boolean;
|
|
80
|
+
dark: boolean;
|
|
81
|
+
theme: EditorThemeTokens;
|
|
82
|
+
toolbar: ToolbarConfig | ToolbarPresetId;
|
|
83
|
+
features: EditorFeatureFlags;
|
|
84
|
+
plugins: EditorPlugin[];
|
|
85
|
+
customToolIds: string[];
|
|
86
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
+
//# sourceMappingURL=RichHtmlEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichHtmlEditor.d.ts","sourceRoot":"","sources":["../src/RichHtmlEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,QAAQ,EACb,KAAK,KAAK,EACX,MAAM,KAAK,CAAC;AACb,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAClB,KAAK,eAAe,EAErB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;cAME,QAAQ,CAAC,iBAAiB,CAAC;;;;cACf,QAAQ,CAAC,aAAa,GAAG,eAAe,CAAC;;;;cAClD,QAAQ,CAAC,kBAAkB,CAAC;;;;cAC9B,QAAQ,CAAC,YAAY,EAAE,CAAC;;;;cAClB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;qBAGjC,aAAa;mBACf,aAAa;;;;;;;;;;;;;;;cARH,QAAQ,CAAC,iBAAiB,CAAC;;;;cACf,QAAQ,CAAC,aAAa,GAAG,eAAe,CAAC;;;;cAClD,QAAQ,CAAC,kBAAkB,CAAC;;;;cAC9B,QAAQ,CAAC,YAAY,EAAE,CAAC;;;;cAClB,QAAQ,CAAC,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;4EAqGpD,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineComponent, h, onBeforeUnmount, onMounted, render as vueRender, ref, watch } from "vue";
|
|
2
|
+
import { createEditor } from "@richhtmleditor/core";
|
|
3
|
+
export const RichHtmlEditor = defineComponent({
|
|
4
|
+
name: "RichHtmlEditor",
|
|
5
|
+
props: {
|
|
6
|
+
content: { type: String, default: undefined },
|
|
7
|
+
editable: { type: Boolean, default: true },
|
|
8
|
+
dark: { type: Boolean, default: false },
|
|
9
|
+
theme: { type: Object, default: undefined },
|
|
10
|
+
toolbar: { type: [Object, String], default: undefined },
|
|
11
|
+
features: { type: Object, default: undefined },
|
|
12
|
+
plugins: { type: Array, default: undefined },
|
|
13
|
+
customToolIds: { type: Array, default: () => [] }
|
|
14
|
+
},
|
|
15
|
+
emits: {
|
|
16
|
+
change: (_value) => true,
|
|
17
|
+
save: (_value) => true
|
|
18
|
+
},
|
|
19
|
+
setup(props, { emit, slots }) {
|
|
20
|
+
const mountRef = ref(null);
|
|
21
|
+
let editor = null;
|
|
22
|
+
const toolHolders = new Map();
|
|
23
|
+
const buildToolMounts = () => {
|
|
24
|
+
const ids = props.customToolIds ?? [];
|
|
25
|
+
if (!ids.length) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const mounts = {};
|
|
29
|
+
for (const id of ids) {
|
|
30
|
+
mounts[id] = (container, _editor, _api) => {
|
|
31
|
+
const slotFn = slots[`tool-${id}`] ?? slots.tool;
|
|
32
|
+
if (!slotFn) {
|
|
33
|
+
return () => { };
|
|
34
|
+
}
|
|
35
|
+
const tool = {
|
|
36
|
+
id,
|
|
37
|
+
type: "custom",
|
|
38
|
+
display: "both",
|
|
39
|
+
enabled: true,
|
|
40
|
+
active: false,
|
|
41
|
+
visible: true
|
|
42
|
+
};
|
|
43
|
+
const holder = document.createElement("div");
|
|
44
|
+
holder.className = "de-vue-tool";
|
|
45
|
+
container.appendChild(holder);
|
|
46
|
+
toolHolders.set(id, holder);
|
|
47
|
+
const slotResult = slotFn({ tool });
|
|
48
|
+
const vnode = (Array.isArray(slotResult) ? h("span", slotResult) : slotResult);
|
|
49
|
+
vueRender(vnode, holder);
|
|
50
|
+
return () => {
|
|
51
|
+
vueRender(null, holder);
|
|
52
|
+
holder.remove();
|
|
53
|
+
toolHolders.delete(id);
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return mounts;
|
|
58
|
+
};
|
|
59
|
+
const mountEditor = () => {
|
|
60
|
+
const el = mountRef.value;
|
|
61
|
+
if (!el) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
editor = createEditor({
|
|
65
|
+
element: el,
|
|
66
|
+
content: props.content,
|
|
67
|
+
editable: props.editable,
|
|
68
|
+
dark: props.dark,
|
|
69
|
+
theme: props.theme,
|
|
70
|
+
toolbar: props.toolbar,
|
|
71
|
+
features: props.features,
|
|
72
|
+
plugins: props.plugins,
|
|
73
|
+
toolMounts: buildToolMounts(),
|
|
74
|
+
onChange: (value) => emit("change", value),
|
|
75
|
+
onSave: (value) => emit("save", value)
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
mountEditor();
|
|
80
|
+
});
|
|
81
|
+
watch(() => props.content, (value) => {
|
|
82
|
+
if (editor && value !== undefined && editor.getHTML() !== value) {
|
|
83
|
+
editor.setContent(value);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
watch(() => [props.editable, props.toolbar, props.dark, props.theme, props.customToolIds], () => {
|
|
87
|
+
editor?.destroy();
|
|
88
|
+
toolHolders.clear();
|
|
89
|
+
if (mountRef.value) {
|
|
90
|
+
mountRef.value.replaceChildren();
|
|
91
|
+
}
|
|
92
|
+
mountEditor();
|
|
93
|
+
});
|
|
94
|
+
onBeforeUnmount(() => {
|
|
95
|
+
editor?.destroy();
|
|
96
|
+
editor = null;
|
|
97
|
+
});
|
|
98
|
+
return () => h("div", { ref: mountRef, class: "de-vue-host" });
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
//# sourceMappingURL=RichHtmlEditor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichHtmlEditor.js","sourceRoot":"","sources":["../src/RichHtmlEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,CAAC,EACD,eAAe,EACf,SAAS,EACT,MAAM,IAAI,SAAS,EACnB,GAAG,EACH,KAAK,EAGN,MAAM,KAAK,CAAC;AACb,OAAO,EACL,YAAY,EAWb,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;IAC5C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE;QAC7C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1C,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QACvC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAqC,EAAE,OAAO,EAAE,SAAS,EAAE;QAC1E,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAA8C,EAAE,OAAO,EAAE,SAAS,EAAE;QACpG,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAsC,EAAE,OAAO,EAAE,SAAS,EAAE;QAC9E,OAAO,EAA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ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,cAAc,sBAAsB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@richhtmleditor/vue",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vue 3 wrapper for Rich HTML Editor.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.json",
|
|
21
|
+
"prepack": "node ../../scripts/assert-pack-ready.mjs"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@richhtmleditor/core": "^1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"vue": "^3.5.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"vue": "^3.5.0"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"richhtmleditor",
|
|
34
|
+
"vue",
|
|
35
|
+
"rich-text-editor",
|
|
36
|
+
"wysiwyg"
|
|
37
|
+
],
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
}
|
|
45
|
+
}
|