@lotte-innovate/ui-component-test 0.0.118 → 0.0.119
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: "../../../../public/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 i}from"class-variance-authority";import{scalingVariants as n}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,i=arguments.length;o<i;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},c.apply(this,arguments)},l=function(t,e){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(o[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(o[i[n]]=t[i[n]])}return o},s=i("",{variants:{scaling:c({},n),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,i){var n=e.className,m=e.size,u=e.scaling,p=l(e,["className","size","scaling"]);return t("div",{className:r(s({size:m,scaling:u}),n),ref:i,children:t(o,c({tinymceScriptSrc:"../../../../public/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)}})}}},p))})}));m.displayName="Editor";export{m as Editor,m as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|