Browse Source

dev: [BarftEditorPage]add props draftProps

Roxas 4 years ago
parent
commit
aa86976aef

+ 2
- 1
eslib/BraftEditor/index.d.ts View File

9
     FloatControls?: any;
9
     FloatControls?: any;
10
     blockRenderMap?: any;
10
     blockRenderMap?: any;
11
     blockRendererFn?: any;
11
     blockRendererFn?: any;
12
+    draftProps?: any;
12
     placeholder?: string;
13
     placeholder?: string;
13
     converts?: any;
14
     converts?: any;
14
 }
15
 }
15
-declare const BarftEditorPage: ({ value, onChange, controls, contentStyle, FloatControls, placeholder, blockRenderMap, blockRendererFn, converts, }: BaseEditorProps) => JSX.Element;
16
+declare const BarftEditorPage: ({ value, onChange, controls, contentStyle, FloatControls, draftProps, placeholder, blockRenderMap, blockRendererFn, converts, }: BaseEditorProps) => JSX.Element;
16
 export { BarftEditorPage as default, BarftEditorPage, BaseEditorProps };
17
 export { BarftEditorPage as default, BarftEditorPage, BaseEditorProps };

+ 3
- 1
eslib/BraftEditor/index.js View File

41
       _ref$contentStyle = _ref.contentStyle,
41
       _ref$contentStyle = _ref.contentStyle,
42
       contentStyle = _ref$contentStyle === void 0 ? {} : _ref$contentStyle,
42
       contentStyle = _ref$contentStyle === void 0 ? {} : _ref$contentStyle,
43
       FloatControls = _ref.FloatControls,
43
       FloatControls = _ref.FloatControls,
44
+      draftProps = _ref.draftProps,
44
       placeholder = _ref.placeholder,
45
       placeholder = _ref.placeholder,
45
       blockRenderMap = _ref.blockRenderMap,
46
       blockRenderMap = _ref.blockRenderMap,
46
       blockRendererFn = _ref.blockRendererFn,
47
       blockRendererFn = _ref.blockRendererFn,
90
     blockRenderMap: blockRenderMap,
91
     blockRenderMap: blockRenderMap,
91
     blockRendererFn: blockRendererFn,
92
     blockRendererFn: blockRendererFn,
92
     converts: converts,
93
     converts: converts,
93
-    placeholder: placeholder
94
+    placeholder: placeholder,
95
+    draftProps: draftProps
94
   })), options.showFloatControls ? React.createElement("div", {
96
   })), options.showFloatControls ? React.createElement("div", {
95
     className: classnames(styles.floatControls)
97
     className: classnames(styles.floatControls)
96
   }, React.createElement(FloatControls, {
98
   }, React.createElement(FloatControls, {

+ 1
- 1
eslib/BraftEditor/index.js.map
File diff suppressed because it is too large
View File


+ 2
- 1
lib/BraftEditor/index.d.ts View File

9
     FloatControls?: any;
9
     FloatControls?: any;
10
     blockRenderMap?: any;
10
     blockRenderMap?: any;
11
     blockRendererFn?: any;
11
     blockRendererFn?: any;
12
+    draftProps?: any;
12
     placeholder?: string;
13
     placeholder?: string;
13
     converts?: any;
14
     converts?: any;
14
 }
15
 }
15
-declare const BarftEditorPage: ({ value, onChange, controls, contentStyle, FloatControls, placeholder, blockRenderMap, blockRendererFn, converts, }: BaseEditorProps) => JSX.Element;
16
+declare const BarftEditorPage: ({ value, onChange, controls, contentStyle, FloatControls, draftProps, placeholder, blockRenderMap, blockRendererFn, converts, }: BaseEditorProps) => JSX.Element;
16
 export { BarftEditorPage as default, BarftEditorPage, BaseEditorProps };
17
 export { BarftEditorPage as default, BarftEditorPage, BaseEditorProps };

+ 3
- 1
lib/BraftEditor/index.js View File

49
       _ref$contentStyle = _ref.contentStyle,
49
       _ref$contentStyle = _ref.contentStyle,
50
       contentStyle = _ref$contentStyle === void 0 ? {} : _ref$contentStyle,
50
       contentStyle = _ref$contentStyle === void 0 ? {} : _ref$contentStyle,
51
       FloatControls = _ref.FloatControls,
51
       FloatControls = _ref.FloatControls,
52
+      draftProps = _ref.draftProps,
52
       placeholder = _ref.placeholder,
53
       placeholder = _ref.placeholder,
53
       blockRenderMap = _ref.blockRenderMap,
54
       blockRenderMap = _ref.blockRenderMap,
54
       blockRendererFn = _ref.blockRendererFn,
55
       blockRendererFn = _ref.blockRendererFn,
98
     blockRenderMap: blockRenderMap,
99
     blockRenderMap: blockRenderMap,
99
     blockRendererFn: blockRendererFn,
100
     blockRendererFn: blockRendererFn,
100
     converts: converts,
101
     converts: converts,
101
-    placeholder: placeholder
102
+    placeholder: placeholder,
103
+    draftProps: draftProps
102
   })), options.showFloatControls ? React__default.createElement("div", {
104
   })), options.showFloatControls ? React__default.createElement("div", {
103
     className: index.classnames(styles.floatControls)
105
     className: index.classnames(styles.floatControls)
104
   }, React__default.createElement(FloatControls, {
106
   }, React__default.createElement(FloatControls, {

+ 1
- 1
lib/BraftEditor/index.js.map
File diff suppressed because it is too large
View File


+ 3
- 0
src/components/Editor/BraftEditor/index.tsx View File

45
   
45
   
46
   blockRenderMap?: any;
46
   blockRenderMap?: any;
47
   blockRendererFn?: any;
47
   blockRendererFn?: any;
48
+  draftProps?: any;
48
   placeholder?: string;
49
   placeholder?: string;
49
   converts?: any;
50
   converts?: any;
50
 }
51
 }
55
   controls,
56
   controls,
56
   contentStyle = {},
57
   contentStyle = {},
57
   FloatControls,
58
   FloatControls,
59
+  draftProps,
58
   placeholder,
60
   placeholder,
59
   blockRenderMap,
61
   blockRenderMap,
60
   blockRendererFn,
62
   blockRendererFn,
109
           blockRendererFn,
111
           blockRendererFn,
110
           converts,
112
           converts,
111
           placeholder,
113
           placeholder,
114
+          draftProps,
112
         }}
115
         }}
113
       />
116
       />
114
       {options.showFloatControls ? (
117
       {options.showFloatControls ? (

+ 1
- 2
stats.html
File diff suppressed because it is too large
View File