@fvc/richtext 1.3.2 → 1.3.3
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 +1 -1
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RichTextEditorComponent as e,Inject as t,Toolbar as r,HtmlEditor as i,Table as o,QuickToolbar as a}from"@cyber-wysiwyg/richtexteditor";import*as n from"react";import{useCallback 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 l=function(){return l=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},l.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))}}(".e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}");var c={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|","ClearFormat","|"]},y={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},p=function(p){var d=p.autoCloseHTMLTags,m=void 0===d||d;p.testId;var b=p.toolbarSettings,u=void 0===b?c:b,g=p.quickToolbarSettings,h=void 0===g?y:g,f=p.height,v=void 0===f?450:f,w=p.enableTabKey,x=void 0===w||w,T=p.enableHtmlSanitizer,S=void 0===T||T,C=p.change,j=p.value,O=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}(p,["autoCloseHTMLTags","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),k=n.useRef(null),E=n.useMemo((function(){return"function"==typeof u?u(c):u}),[u]),H=s((function(e){var t=m?e.value.replace(/<br(
|
|
1
|
+
import{RichTextEditorComponent as e,Inject as t,Toolbar as r,HtmlEditor as i,Table as o,QuickToolbar as a}from"@cyber-wysiwyg/richtexteditor";import*as n from"react";import{useCallback 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 l=function(){return l=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},l.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))}}(".e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}");var c={items:["Bold","Italic","Underline","StrikeThrough","FontName","FontSize","FontColor","BackgroundColor","LowerCase","UpperCase","|","Formats","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|","ClearFormat","|"]},y={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},p=function(p){var d=p.autoCloseHTMLTags,m=void 0===d||d;p.testId;var b=p.toolbarSettings,u=void 0===b?c:b,g=p.quickToolbarSettings,h=void 0===g?y:g,f=p.height,v=void 0===f?450:f,w=p.enableTabKey,x=void 0===w||w,T=p.enableHtmlSanitizer,S=void 0===T||T,C=p.change,j=p.value,O=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}(p,["autoCloseHTMLTags","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),k=n.useRef(null),E=n.useMemo((function(){return"function"==typeof u?u(c):u}),[u]),H=s((function(e){var t=m?e.value.replace(/<br\b([^>]*)?(?<!\/)>/gi,"<br$1 />").replace(/<img\b([^>]*)?(?<!\/)>/gi,"<img$1 />"):e.value;null==C||C(l(l({},e),{value:t}))}),[m,C]),I=m&&j?j.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>"):j;return n.createElement(e,l({ref:k,tabIndex:0,height:v,enableTabKey:x,toolbarSettings:E,quickToolbarSettings:h,enableHtmlSanitizer:S,change:H,value:I},O),n.createElement(t,{services:[r,i,o,a]}))};export{p as Richtext};
|