OscarGodson / EpicEditor

EpicEditor is an embeddable JavaScript Markdown editor with split fullscreen editing, live previewing, automatic draft saving, offline support, and more. For developers, it offers a robust API, can be easily themed, and allows you to swap out the bundled Markdown parser with anything you throw at it.
http://epiceditor.com
MIT License
4.25k stars 338 forks source link

Strange indentation on each new line when load text from database #376

Closed mrvovanness closed 8 years ago

mrvovanness commented 8 years ago

Hi!

I use EpicEditor inside Rais app, and this works great, thank you very much! But I have only one problem. When I edit post and load saved markdown text from database some strange space appears before each new line. Then if I save with this formatting, of course, markdown is broken. I don't figure out what problem is. My js setup (I am using coffescript):

jQuery ->
  if $('#markdown-textarea').length > 0
    new EpicEditor({
      textarea: 'markdown-textarea'
      autogrow: true
      theme: { preview: '/assets/application.css' }
      clientSideStorage: false
    }).load()

I saved image of this problem here: http://i.imgur.com/RaVTYwq.png