@lotte-innovate/ui-component-test 0.0.110 → 0.0.112
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/globals.css +1 -1
- package/dist/lib/components/Editor/index.d.ts +15 -1
- package/dist/lib/components/Editor/index.js +35 -8
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/public/tinymce/CHANGELOG.md +3453 -0
- package/public/tinymce/README.md +73 -0
- package/public/tinymce/bower.json +27 -0
- package/public/tinymce/composer.json +52 -0
- package/public/tinymce/icons/default/icons.js +194 -0
- package/public/tinymce/icons/default/icons.min.js +1 -0
- package/public/tinymce/icons/default/index.js +7 -0
- package/public/tinymce/license.txt +21 -0
- package/public/tinymce/models/dom/index.js +7 -0
- package/public/tinymce/models/dom/model.js +8040 -0
- package/public/tinymce/models/dom/model.min.js +4 -0
- package/public/tinymce/package.json +32 -0
- package/public/tinymce/plugins/advlist/index.js +7 -0
- package/public/tinymce/plugins/advlist/plugin.js +259 -0
- package/public/tinymce/plugins/advlist/plugin.min.js +4 -0
- package/public/tinymce/plugins/autolink/index.js +7 -0
- package/public/tinymce/plugins/autolink/plugin.js +228 -0
- package/public/tinymce/plugins/autolink/plugin.min.js +4 -0
- package/public/tinymce/plugins/code/index.js +7 -0
- package/public/tinymce/plugins/code/plugin.js +85 -0
- package/public/tinymce/plugins/code/plugin.min.js +4 -0
- package/public/tinymce/plugins/codesample/index.js +7 -0
- package/public/tinymce/plugins/codesample/plugin.js +2463 -0
- package/public/tinymce/plugins/codesample/plugin.min.js +4 -0
- package/public/tinymce/plugins/image/index.js +7 -0
- package/public/tinymce/plugins/image/plugin.js +1505 -0
- package/public/tinymce/plugins/image/plugin.min.js +4 -0
- package/public/tinymce/plugins/link/index.js +7 -0
- package/public/tinymce/plugins/link/plugin.js +1242 -0
- package/public/tinymce/plugins/link/plugin.min.js +4 -0
- package/public/tinymce/plugins/lists/index.js +7 -0
- package/public/tinymce/plugins/lists/plugin.js +2172 -0
- package/public/tinymce/plugins/lists/plugin.min.js +4 -0
- package/public/tinymce/plugins/table/index.js +7 -0
- package/public/tinymce/plugins/table/plugin.js +3462 -0
- package/public/tinymce/plugins/table/plugin.min.js +4 -0
- package/public/tinymce/skins/content/default/content.css +61 -0
- package/public/tinymce/skins/content/default/content.js +2 -0
- package/public/tinymce/skins/content/default/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.css +785 -0
- package/public/tinymce/skins/ui/oxide/content.inline.css +779 -0
- package/public/tinymce/skins/ui/oxide/content.inline.js +2 -0
- package/public/tinymce/skins/ui/oxide/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/content.js +2 -0
- package/public/tinymce/skins/ui/oxide/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.css +3763 -0
- package/public/tinymce/skins/ui/oxide/skin.js +2 -0
- package/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/content.css +766 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.css +779 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/content.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.css +3766 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/public/tinymce/themes/silver/index.js +7 -0
- package/public/tinymce/themes/silver/theme.js +30775 -0
- package/public/tinymce/themes/silver/theme.min.js +384 -0
- package/public/tinymce/tinymce.d.ts +3238 -0
- package/public/tinymce/tinymce.js +31779 -0
- package/public/tinymce/tinymce.min.js +384 -0
@@ -1,6 +1,19 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IAllProps } from '@tinymce/tinymce-react';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import 'tinymce/icons/default';
|
5
|
+
import 'tinymce/themes/silver';
|
6
|
+
import 'tinymce/models/dom';
|
7
|
+
import 'tinymce/skins/ui/oxide/skin.css';
|
8
|
+
import 'tinymce/plugins/advlist';
|
9
|
+
import 'tinymce/plugins/code';
|
10
|
+
import 'tinymce/plugins/emoticons';
|
11
|
+
import 'tinymce/plugins/emoticons/js/emojis';
|
12
|
+
import 'tinymce/plugins/link';
|
13
|
+
import 'tinymce/plugins/lists';
|
14
|
+
import 'tinymce/plugins/table';
|
15
|
+
import 'tinymce/skins/ui/oxide/content.css';
|
16
|
+
import 'tinymce/skins/content/default/content.css';
|
4
17
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
5
18
|
tinymceScriptSrc?: string;
|
6
19
|
}
|
@@ -8,5 +21,6 @@ declare const editorVariants: (props?: ({
|
|
8
21
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
9
22
|
size?: "small" | "medium" | "large" | null | undefined;
|
10
23
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
11
|
-
export declare const
|
24
|
+
export declare const initTinyMCE: () => void;
|
25
|
+
export declare const Editor: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & EditorProps & IAllProps & React.RefAttributes<HTMLTextAreaElement>>;
|
12
26
|
export default Editor;
|
@@ -22,11 +22,27 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
22
22
|
return t;
|
23
23
|
};
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
25
|
-
import { forwardRef } from 'react';
|
26
|
-
import { Editor as EditorUI } from '@tinymce/tinymce-react';
|
25
|
+
import { forwardRef, useEffect } from 'react';
|
27
26
|
import { cva } from 'class-variance-authority';
|
28
27
|
import { scalingVariants } from '../../../lib/constants';
|
29
|
-
import
|
28
|
+
import tinymce from 'tinymce';
|
29
|
+
/* Default icons are required. After that, import custom icons if applicable */
|
30
|
+
import 'tinymce/icons/default';
|
31
|
+
/* Required TinyMCE components */
|
32
|
+
import 'tinymce/themes/silver';
|
33
|
+
import 'tinymce/models/dom';
|
34
|
+
/* Import a skin (can be a custom skin instead of the default) */
|
35
|
+
import 'tinymce/skins/ui/oxide/skin.css';
|
36
|
+
/* Import plugins */
|
37
|
+
import 'tinymce/plugins/advlist';
|
38
|
+
import 'tinymce/plugins/code';
|
39
|
+
import 'tinymce/plugins/emoticons';
|
40
|
+
import 'tinymce/plugins/emoticons/js/emojis';
|
41
|
+
import 'tinymce/plugins/link';
|
42
|
+
import 'tinymce/plugins/lists';
|
43
|
+
import 'tinymce/plugins/table';
|
44
|
+
import 'tinymce/skins/ui/oxide/content.css';
|
45
|
+
import 'tinymce/skins/content/default/content.css';
|
30
46
|
var editorVariants = cva('', {
|
31
47
|
variants: {
|
32
48
|
scaling: __assign({}, scalingVariants),
|
@@ -41,13 +57,24 @@ var editorVariants = cva('', {
|
|
41
57
|
size: 'medium',
|
42
58
|
},
|
43
59
|
});
|
60
|
+
export var initTinyMCE = function () {
|
61
|
+
if (typeof window !== 'undefined') {
|
62
|
+
tinymce.init({
|
63
|
+
selector: '#tinymce',
|
64
|
+
plugins: 'link table code',
|
65
|
+
toolbar: 'undo redo | formatselect | bold italic | alignleft aligncenter alignright | code',
|
66
|
+
skin: false,
|
67
|
+
tinymceScriptSrc: '',
|
68
|
+
src: '',
|
69
|
+
});
|
70
|
+
}
|
71
|
+
};
|
44
72
|
export var Editor = forwardRef(function (_a, ref) {
|
45
73
|
var className = _a.className, size = _a.size, scaling = _a.scaling, tinymceScriptSrc = _a.tinymceScriptSrc, props = __rest(_a, ["className", "size", "scaling", "tinymceScriptSrc"]);
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
} }, props)) }));
|
74
|
+
useEffect(function () {
|
75
|
+
initTinyMCE();
|
76
|
+
}, []);
|
77
|
+
return _jsx("textarea", { id: "tinymce", ref: ref });
|
51
78
|
});
|
52
79
|
Editor.displayName = 'Editor';
|
53
80
|
export default Editor;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as i,useEffect as e}from"react";import{cva as n}from"class-variance-authority";import{scalingVariants as r}from"../../constants.mjs";import o from"tinymce";import"tinymce/icons/default";import"tinymce/themes/silver";import"tinymce/models/dom";import"tinymce/skins/ui/oxide/skin.css";import"tinymce/plugins/advlist";import"tinymce/plugins/code";import"tinymce/plugins/emoticons";import"tinymce/plugins/emoticons/js/emojis";import"tinymce/plugins/link";import"tinymce/plugins/lists";import"tinymce/plugins/table";import"tinymce/skins/ui/oxide/content.css";import"tinymce/skins/content/default/content.css";var c=function(){return c=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t},c.apply(this,arguments)},s=function(t,i){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i.indexOf(n)<0&&(e[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)i.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(e[n[r]]=t[n[r]])}return e};n("",{variants:{scaling:c({},r),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}});var m=function(){"undefined"!=typeof window&&o.init({selector:"#tinymce",plugins:"link table code",toolbar:"undo redo | formatselect | bold italic | alignleft aligncenter alignright | code",skin:!1,tinymceScriptSrc:"",src:""})},a=i((function(i,n){return i.className,i.size,i.scaling,i.tinymceScriptSrc,s(i,["className","size","scaling","tinymceScriptSrc"]),e((function(){m()}),[]),t("textarea",{id:"tinymce",ref:n})}));a.displayName="Editor";export{a as Editor,a as default,m as initTinyMCE};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|