kadikraman / draftjs-md-converter

Converts content from Draft.js blocks to Markdown and vice versa.
https://kadikraman.github.io/draftjs-md-converter/
MIT License
145 stars 37 forks source link

How to convert inline code? #34

Closed andrewfan closed 6 years ago

andrewfan commented 6 years ago

Hey, I'm having a problem converting inline code

initialValue is `value`

          mdToDraftjs(props.value, {
            inlineStyles: {
              Code: {
                type: 'CODE',
                symbol: '`',
              },
            },
          }),

Code breaks here code block does not have children https://github.com/kadikraman/draftjs-md-converter/blob/master/src/mdToDraftjs.js#L175

kadikraman commented 6 years ago

Could you check if this fixes it?

kadikraman commented 6 years ago

Fixed in v1.1.0 🙏