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

List not indenting on tab #175

Description

@johnstew

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}
      />
    );
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions