@lotte-innovate/ui-component-test 0.0.118 → 0.0.120
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +1,6 @@
|
|
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/tinymce';
|
5
|
-
import 'tinymce/themes/silver';
|
6
|
-
import 'tinymce/models/dom';
|
7
|
-
import 'tinymce/icons/default';
|
8
|
-
import 'tinymce/skins/ui/oxide/skin';
|
9
|
-
import 'tinymce/plugins/advlist';
|
10
|
-
import 'tinymce/plugins/code';
|
11
|
-
import 'tinymce/plugins/codesample';
|
12
|
-
import 'tinymce/plugins/link';
|
13
|
-
import 'tinymce/plugins/lists';
|
14
|
-
import 'tinymce/plugins/table';
|
15
|
-
import 'tinymce/plugins/image';
|
16
|
-
import 'tinymce/skins/content/default/content';
|
17
|
-
import 'tinymce/skins/ui/oxide/content';
|
18
4
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
19
5
|
}
|
20
6
|
declare const editorVariants: (props?: ({
|
@@ -28,20 +28,6 @@ import { cva } from 'class-variance-authority';
|
|
28
28
|
import { scalingVariants } from '../../../lib/constants';
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
30
30
|
import { marked } from 'marked';
|
31
|
-
import 'tinymce/tinymce';
|
32
|
-
import 'tinymce/themes/silver';
|
33
|
-
import 'tinymce/models/dom';
|
34
|
-
import 'tinymce/icons/default';
|
35
|
-
import 'tinymce/skins/ui/oxide/skin';
|
36
|
-
import 'tinymce/plugins/advlist';
|
37
|
-
import 'tinymce/plugins/code';
|
38
|
-
import 'tinymce/plugins/codesample';
|
39
|
-
import 'tinymce/plugins/link';
|
40
|
-
import 'tinymce/plugins/lists';
|
41
|
-
import 'tinymce/plugins/table';
|
42
|
-
import 'tinymce/plugins/image';
|
43
|
-
import 'tinymce/skins/content/default/content';
|
44
|
-
import 'tinymce/skins/ui/oxide/content';
|
45
31
|
var editorVariants = cva('', {
|
46
32
|
variants: {
|
47
33
|
scaling: __assign({}, scalingVariants),
|
@@ -58,7 +44,7 @@ var editorVariants = cva('', {
|
|
58
44
|
});
|
59
45
|
export var Editor = forwardRef(function (_a, ref) {
|
60
46
|
var className = _a.className, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["className", "size", "scaling"]);
|
61
|
-
return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ init: {
|
47
|
+
return (_jsx("div", { className: cn(editorVariants({ size: size, scaling: scaling }), className), ref: ref, children: _jsx(EditorUI, __assign({ tinymceScriptSrc: "/tinymce/tinymce.min.js", init: {
|
62
48
|
width: '100%',
|
63
49
|
height: '100%',
|
64
50
|
plugins: 'link table code lists codesample',
|
@@ -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 e}from"react";import{Editor as o}from"@tinymce/tinymce-react";import{cva as n}from"class-variance-authority";import{scalingVariants as i}from"../../constants.mjs";import{cn as r}from"../../utils/utils.mjs";import{marked as a}from"marked";var c=function(){return c=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},c.apply(this,arguments)},l=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]])}return o},s=n("",{variants:{scaling:c({},i),size:{small:"w-[500px] h-[350px]",medium:"w-[550px] h-[400px]",large:"w-[600px] h-[450px]"}},defaultVariants:{scaling:"100%",size:"medium"}}),m=e((function(e,n){var i=e.className,m=e.size,u=e.scaling,f=l(e,["className","size","scaling"]);return t("div",{className:r(s({size:m,scaling:u}),i),ref:n,children:t(o,c({tinymceScriptSrc:"/tinymce/tinymce.min.js",init:{width:"100%",height:"100%",plugins:"link table code lists codesample",menubar:!1,toolbar:"blocks | bold italic forecolor strikethrough | hr blockquote | bullist numlist outdent indent | table image link | inlinecode codeformat markdown",content_style:"body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }",setup:function(t){t.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){t.formatter.toggle("code")}}),t.on("init",(function(){t.formatter.register("code",{inline:"code",remove:"all"})})),t.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var e=t.getContent({format:"text"}),o=a(e);t.setContent(o)}})}}},f))})}));m.displayName="Editor";export{m as Editor,m as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|