File tree 2 files changed +11
-9
lines changed
2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,14 @@ When integrate the plugin with `draft-js-side-toolbar-plugin` and click the Embe
40
40
Pressing Enter will close and embed the URL; but, losing the focus, pressing ESC or DEL with empty text will close the Embedder.
41
41
42
42
## Configuration
43
- | Param | Default | Description |
44
- | --------------| -------------------------------------| -------------------------------------------------------------------|
45
- | embedderType | 'draft-js-iframely-plugin-embedder' | Type of entity created when inserting the embedder block. |
46
- | embedType | 'draft-js-iframely-plugin-embed' | Type of entity created when embedding the URL. |
47
- | decorator | - | Empty decorator that returns the same component. (No decorations) |
48
- | theme | Default styles | draft-js-iframely-plugin/lib/plugin.css |
49
- | options | Default behavior | List of options. |
43
+ | Param | Default | Description |
44
+ | ----------------| -------------------------------------| -------------------------------------------------------------------------|
45
+ | theme | Default styles | draft-js-iframely-plugin/lib/plugin.css |
46
+ | options | Default behavior | List of options. |
47
+ | embedderType | 'draft-js-iframely-plugin-embedder' | Type of entity created when inserting the embedder block. |
48
+ | embedType | 'draft-js-iframely-plugin-embed' | Type of entity created when embedding the URL. |
49
+ | decorator | - | Empty decorator that returns the same component. (No decorations) |
50
+ | embedComponent | Default implementation | Provide your own implementation to embed the URL. |
50
51
51
52
#### Options
52
53
| Option | Default | Description |
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ export default ({
34
34
options = { } ,
35
35
embedderType = 'draft-js-iframely-plugin-embedder' ,
36
36
embedType = 'draft-js-iframely-plugin-embed' ,
37
- decorator = ( component ) => component
37
+ decorator = ( component ) => component ,
38
+ embedComponent = Embed
38
39
} = { } ) => {
39
40
40
41
// Modifiers.
@@ -46,7 +47,7 @@ export default ({
46
47
const pluginTheme = Object . assign ( { } , defaultTheme , theme ) ;
47
48
48
49
const ThemedEmbedder = decorateComponentWithProps ( Embedder , { theme : pluginTheme } ) ;
49
- const DecoratedEmbed = decorator ( Embed ) ;
50
+ const DecoratedEmbed = decorator ( embedComponent ) ;
50
51
const ThemedEmbed = decorateComponentWithProps ( DecoratedEmbed , { theme : pluginTheme } ) ;
51
52
52
53
return {
You can’t perform that action at this time.
0 commit comments