Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mediaBlockRenderer(block) {
- if (block.getType() !== "atomic") {
- return null;
- }
- const type = block.getData().toObject().type;
- let plugin = this.pluginsByType[type] || this.handleBlockNotFound(block);
- if (!plugin) {
- return null;
- }
- return {
- component: Media,
- editable: false,
- props: {
- plugin: plugin,
- onChange: this.onChange,
- editorState: this.props.editorState,
- setReadOnly: this.setReadOnly
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement