Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking enter with text of type h1 or h2 doesn't make cursor enter next line #35

Open
FerusAndBeyond opened this issue Aug 27, 2016 · 3 comments · May be fixed by #36
Open

Clicking enter with text of type h1 or h2 doesn't make cursor enter next line #35

FerusAndBeyond opened this issue Aug 27, 2016 · 3 comments · May be fixed by #36

Comments

@FerusAndBeyond
Copy link

FerusAndBeyond commented Aug 27, 2016

It only adds br-tag after the cursor position. This doesn't happen on paragraphs, only on h1 and h2. Try it here:

https://wangzuo.github.io/react-medium-editor/

@ammichael
Copy link

I'm having this issue even with paragraphs =(

<Editor
  tag="pre"
  text={this.state.texto}
  onChange={this.handleChange}
  options={{toolbar: {buttons: ['bold', 'italic', 'underline','anchor', 'h1', 'h2', 'quote']}, 
  autoLink: true, 
  placeholder: {text: 'Conte sua hist\ória..'}}}
  />

Any idea why?

@tianjianchn
Copy link

This is mainly caused by the the editor text which was passed to the parent component and then passed in as the changed property that result state change and ui update. I'll try to make a pr to fix this.

@shumilka
Copy link

The same situation with orderedlist and unorderedlist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants