grep-components 1.17.2 → 1.18.0-GREPF-1798.1
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/index.js
CHANGED
|
@@ -21671,7 +21671,7 @@ var getCharCount = function (editorState) {
|
|
|
21671
21671
|
return editorState.getCurrentContent().getPlainText('').length;
|
|
21672
21672
|
};
|
|
21673
21673
|
var EditorComponent = function (_a) {
|
|
21674
|
-
var label = _a.label, classes = _a.classes, autoFocus = _a.autoFocus, helperText = _a.helperText, showCharCount = _a.showCharCount, allowedStyles = _a.allowedStyles, disableNewlines = _a.disableNewlines, onContentChange = _a.onContentChange, _b = _a.Toolbar, Toolbar = _b === void 0 ? FloatingToolbar : _b, blockPasting = _a.blockPasting, props = __rest$1(_a, ["label", "classes", "autoFocus", "helperText", "showCharCount", "allowedStyles", "disableNewlines", "onContentChange", "Toolbar", "blockPasting"]);
|
|
21674
|
+
var label = _a.label, classes = _a.classes, autoFocus = _a.autoFocus, helperText = _a.helperText, showCharCount = _a.showCharCount, allowedStyles = _a.allowedStyles, disableNewlines = _a.disableNewlines, onContentChange = _a.onContentChange, _b = _a.Toolbar, Toolbar = _b === void 0 ? FloatingToolbar : _b, blockPasting = _a.blockPasting, lang = _a.lang, props = __rest$1(_a, ["label", "classes", "autoFocus", "helperText", "showCharCount", "allowedStyles", "disableNewlines", "onContentChange", "Toolbar", "blockPasting", "lang"]);
|
|
21675
21675
|
var _c = useContext(EditorContext), state = _c.state, setState = _c.setState, setSelection = _c.setSelection;
|
|
21676
21676
|
var ref = useRef();
|
|
21677
21677
|
var canStyle = allowedStyles === undefined || allowedStyles.length > 0;
|
|
@@ -21740,7 +21740,7 @@ var EditorComponent = function (_a) {
|
|
|
21740
21740
|
React__default.createElement("span", { dangerouslySetInnerHTML: { __html: '​' } })),
|
|
21741
21741
|
label && (React__default.createElement("label", { className: clsx(styles.label, classes === null || classes === void 0 ? void 0 : classes.label) }, label)),
|
|
21742
21742
|
canStyle && (React__default.createElement(Toolbar, { editor: ref, buttons: buttons })),
|
|
21743
|
-
React__default.createElement(Box, { className: clsx(styles.editor, classes === null || classes === void 0 ? void 0 : classes.editor) },
|
|
21743
|
+
React__default.createElement(Box, { className: clsx(styles.editor, classes === null || classes === void 0 ? void 0 : classes.editor), lang: lang },
|
|
21744
21744
|
React__default.createElement(Editor, __assign({ ref: ref }, __assign({ editorState: state, onChange: onChange, onFocus: onFocus, onBlur: onBlur, blockStyleFn: blockStyleFn, handleKeyCommand: handleKeyCommand, keyBindingFn: keyBindingFn, handlePastedText: handlePastedText }, props)))),
|
|
21745
21745
|
(showCharCount || helperText) && (React__default.createElement(Box, { margin: ".5rem" },
|
|
21746
21746
|
showCharCount && (React__default.createElement(FormHelperText, { className: styles.charcount }, "Antall tegn: ".concat(charCount))),
|