Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

List not indenting on tab #175

Open
johnstew opened this issue Feb 14, 2019 · 0 comments
Open

List not indenting on tab #175

johnstew opened this issue Feb 14, 2019 · 0 comments

Comments

@johnstew
Copy link

Hi there, it looks like this was brought up in #59 but then closed. But I tried recreating a small example on codesandbox and it seems the issue is still there versus in the examples it works just fine. Wondering if it's a setup issue.

I'm explicitly passing in the features options even though I think they are all enabled by default.

https://codesandbox.io/s/rmn008n5ko

import React, { Component } from "react";
import ReactDOM from "react-dom";
import Editor from "draft-js-plugins-editor";
import createMarkdownPlugin from "draft-js-markdown-plugin";
import { EditorState } from "draft-js";

export default class DemoEditor extends Component {
  state = {
    editorState: EditorState.createEmpty(),
    plugins: [
      createMarkdownPlugin({
        features: {
          inline: ["BOLD", "ITALIC", "CODE", "STRIKETHROUGH", "LINK", "IMAGE"],
          block: [
            "header-one",
            "header-two",
            "header-three",
            "header-four",
            "header-five",
            "header-six",
            "ordered-list-item",
            "unordered-list-item"
          ]
        }
      })
    ]
  };

  onChange = editorState => {
    this.setState({
      editorState
    });
  };

  render() {
    return (
      <Editor
        editorState={this.state.editorState}
        onChange={this.onChange}
        plugins={this.state.plugins}
      />
    );
  }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant