@pdg/react-form 1.0.67 → 1.0.68

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.
@@ -1,7 +1,8 @@
1
1
  import { CommonSxProps, FormValueItemCommands, FormValueItemProps } from '../../@types';
2
+ import { IAllProps } from '@tinymce/tinymce-react';
2
3
  export type FormTextEditorValue = string;
3
4
  export type FormTextEditorCommands = FormValueItemCommands<FormTextEditorValue, false>;
4
- export interface FormTextEditorProps extends CommonSxProps, Omit<FormValueItemProps<FormTextEditorValue, false>, 'fullWidth'> {
5
+ export interface FormTextEditorProps extends CommonSxProps, Omit<FormValueItemProps<FormTextEditorValue, false>, 'fullWidth'>, Partial<Pick<IAllProps, 'apiKey' | 'toolbar'>> {
5
6
  required?: boolean;
6
7
  menubar?: boolean;
7
8
  height?: number;
package/dist/index.esm.js CHANGED
@@ -7491,6 +7491,8 @@ var Editor = /** @class */ (function (_super) {
7491
7491
  styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function (_a, ref) {
7492
7492
  // ID --------------------------------------------------------------------------------------------------------------
7493
7493
  var initVariant = _a.variant, initSize = _a.size, initColor = _a.color, initFocused = _a.focused,
7494
+ // ---------------------------------------------------------------------------------------------------------------
7495
+ apiKey = _a.apiKey, toolbar = _a.toolbar,
7494
7496
  //----------------------------------------------------------------------------------------------------------------
7495
7497
  menubar = _a.menubar, height = _a.height, hidden = _a.hidden, onImageUpload = _a.onImageUpload,
7496
7498
  //----------------------------------------------------------------------------------------------------------------
@@ -7664,7 +7666,7 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7664
7666
  // Render ----------------------------------------------------------------------------------------------------------
7665
7667
  return (React__default.createElement(FormItemBase, { variant: variant, size: size, color: color, focused: focused, className: classNames$1(className, 'FormValueItem', 'FormTextEditor', !initialized && 'initializing'), labelIcon: labelIcon, label: label, error: error, required: required, fullWidth: true, helperText: error ? errorHelperText : helperText, helperTextProps: { style: { marginLeft: 5 } }, style: { width: '100%' }, hidden: hidden, controlHeight: height, control: React__default.createElement(React__default.Fragment, null,
7666
7668
  !initialized ? React__default.createElement(Skeleton, { variant: 'rectangular', width: '100%', height: height }) : null,
7667
- React__default.createElement(Editor, { ref: editorRef, value: value, disabled: readOnly || disabled, init: {
7669
+ React__default.createElement(Editor, { ref: editorRef, apiKey: apiKey, value: value, disabled: readOnly || disabled, init: {
7668
7670
  height: height,
7669
7671
  menubar: menubar,
7670
7672
  readonly: true,
@@ -7672,13 +7674,24 @@ styleInject(css_248z$c);var FormTextEditor = React__default.forwardRef(function
7672
7674
  contextmenu: false,
7673
7675
  content_style: 'body {font-size: 0.875rem; font-weight: 400; line-height: 1.5; color: hsl(0,0%,20%);} p {padding:0; margin:0}',
7674
7676
  plugins: [
7677
+ 'lists',
7675
7678
  'advlist',
7676
- 'advlist autolink lists link image',
7677
- 'charmap print preview anchor',
7678
- 'searchreplace visualblocks code',
7679
- 'insertdatetime media table paste wordcount',
7679
+ 'image',
7680
+ 'autolink',
7681
+ 'link',
7682
+ 'charmap',
7683
+ 'preview',
7684
+ 'anchor',
7685
+ 'searchreplace',
7686
+ 'visualblocks',
7687
+ 'code',
7688
+ 'insertdatetime',
7689
+ 'media',
7690
+ 'table',
7691
+ 'wordcount',
7680
7692
  ],
7681
- toolbar: 'undo redo | \
7693
+ toolbar: toolbar ||
7694
+ 'undo redo | \
7682
7695
  formatselect bullist numlist outdent indent | \
7683
7696
  bold italic | align | forecolor backcolor | \
7684
7697
  link image media | advtable | code',