@lotte-innovate/ui-component-test 0.1.99 → 0.1.100
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,7 @@ import React from 'react';
|
|
2
2
|
import { IAllProps } from '@tinymce/tinymce-react';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
4
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
5
|
+
tinymceScriptSrc?: string;
|
5
6
|
}
|
6
7
|
declare const editorVariants: (props?: ({
|
7
8
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
@@ -43,8 +43,8 @@ var editorVariants = cva('', {
|
|
43
43
|
},
|
44
44
|
});
|
45
45
|
export var Editor = forwardRef(function (_a, ref) {
|
46
|
-
var className = _a.className, size = _a.size, scaling = _a.scaling, props = __rest(_a, ["className", "size", "scaling"]);
|
47
|
-
return (_jsx("div", { ref: ref, className: cn(editorVariants({ size: size, scaling: scaling }), className), children: _jsx(EditorUI, __assign({ tinymceScriptSrc: "
|
46
|
+
var className = _a.className, size = _a.size, scaling = _a.scaling, tinymceScriptSrc = _a.tinymceScriptSrc, props = __rest(_a, ["className", "size", "scaling", "tinymceScriptSrc"]);
|
47
|
+
return (_jsx("div", { ref: ref, className: cn(editorVariants({ size: size, scaling: scaling }), className), children: _jsx(EditorUI, __assign({ tinymceScriptSrc: tinymceScriptSrc !== null && tinymceScriptSrc !== void 0 ? tinymceScriptSrc : "/tinymce/tinymce.min.js", initialValue: "", init: {
|
48
48
|
height: '100%',
|
49
49
|
menubar: false,
|
50
50
|
plugins: ['advlist', 'autolink', 'lists', 'link', 'image', 'code', 'table', 'codesample'],
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Editor as o}from"../../../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs";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"../../../../node_modules/marked/lib/marked.esm.mjs";var s=function(){return s=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},s.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},c=i("",{variants:{scaling:s({},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,d=l(e,["className","size","scaling"]);return t("div",{ref:i,className:r(c({size:m,scaling:u}),n),children:t(o,s({tinymceScriptSrc:"
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as e}from"react";import{Editor as o}from"../../../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs";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"../../../../node_modules/marked/lib/marked.esm.mjs";var s=function(){return s=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},s.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},c=i("",{variants:{scaling:s({},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,d=e.tinymceScriptSrc,p=l(e,["className","size","scaling","tinymceScriptSrc"]);return t("div",{ref:i,className:r(c({size:m,scaling:u}),n),children:t(o,s({tinymceScriptSrc:null!=d?d:"/tinymce/tinymce.min.js",initialValue:"",init:{height:"100%",menubar:!1,plugins:["advlist","autolink","lists","link","image","code","table","codesample"],toolbar:"undo redo | blocks | bold italic forecolor strikethrough | hr blockquote | bullist numlist outdent indent | table image link | codeformat codesample | markdown",content_style:"body { font-family:Noto Sans KR,sans-serif,Nunito Sans,Helvetica Neue,Helvetica; font-size:14px }",setup:function(t){t.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var e=t.getContent({format:"text"}),o=a(e);t.setContent(o)}}),t.ui.registry.addButton("codeformat",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){t.formatter.toggle("code")}})}}},p))})}));m.displayName="Editor";export{m as Editor,m as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|