@fvc/richtext 1.0.20 → 1.3.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/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{RichTextEditorComponent as e,Inject as t,Toolbar as r,HtmlEditor as i,Table as o,QuickToolbar as n}from"@cyber-wysiwyg/richtexteditor";import*as s from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var a=function(){return a=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".RichText_e-rte-content__8lueH {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.RichText_e-content__pQXaD {\n max-width: 685px;\n padding: 0;\n}");var l={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|","ClearFormat","|"]},c={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},y=function(y){y.testId;var d=y.toolbarSettings,p=void 0===d?l:d,m=y.quickToolbarSettings,b=void 0===m?c:m,u=y.height,g=void 0===u?450:u,h=y.enableTabKey,f=void 0===h||h,w=y.enableHtmlSanitizer,x=void 0===w||w,v=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r}(y,["testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer"]),T=s.useRef(null),S=s.useMemo((function(){return"function"==typeof p?p(l):p}),[p]);return s.createElement(e,a({ref:T,tabIndex:0,height:g,enableTabKey:f,toolbarSettings:S,quickToolbarSettings:b,enableHtmlSanitizer:x},v),s.createElement(t,{services:[r,i,o,n]}))};export{y as Richtext};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RichtextProps } from './types';
|
|
3
|
+
import './styles/RichText.scss';
|
|
3
4
|
import '@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css';
|
|
4
5
|
import '@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css';
|
|
5
6
|
import '@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RichTextEditor } from '@cyber-wysiwyg/richtexteditor/ej2-react-richtexteditor';
|
|
2
|
-
export type RichtextProps = Partial<RichTextEditor
|
|
2
|
+
export type RichtextProps = Partial<Omit<RichTextEditor, 'toolbarSettings'>> & {
|
|
3
3
|
testId?: string;
|
|
4
|
+
toolbarSettings?: RichTextEditor['toolbarSettings'] | ((defaultToolbarSettings: RichTextEditor['toolbarSettings']) => RichTextEditor['toolbarSettings']);
|
|
4
5
|
};
|