jrm2k6 / react-markdown-editor

A markdown editor using React/Reflux
MIT License
215 stars 27 forks source link

Read only property? #60

Open tailongnguyen opened 5 years ago

tailongnguyen commented 5 years ago

Hi, I experienced this error when trying to increase the height of the textarea using:

import React from 'react';
import {MarkdownEditor} from 'react-markdown-editor';

class ReactMdeDemo extends React.Component{
    render() {
        return (
            <MarkdownEditor initialContent="Test" iconsSet="font-awesome" styles ={{styleMarkdownTextArea: {height: '300px'}}}/>
            // <MarkdownEditor initialContent="Test" iconsSet="materialize-ui"/>
        );
    }
}

export default ReactMdeDemo;

Uncaught TypeError: Cannot assign to read only property 'height' of object '#<Object>'

Can anyone know to fix it?

jrm2k6 commented 5 years ago

What version of the library and react are you using?

sociablesasha commented 5 years ago

"dependencies": { "react": "^16.8.3", "react-dom": "^16.8.3", "react-markdown-editor": "^0.6.2", "react-scripts": "2.1.5" },

sociablesasha commented 5 years ago

TypeError: Cannot read property 'string' of undefined

jrm2k6 commented 5 years ago

@sociablesasha Can you try npm install --save react-markdown-editor@beta?

jrm2k6 commented 5 years ago

If it works, I will try to publish it later today.