Title: CodeMirror adding extra lines
Last modified: August 21, 2016

---

# CodeMirror adding extra lines

 *  [hommealone](https://wordpress.org/support/users/hommealone/)
 * (@hommealone)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/codemirror-adding-extra-lines/)
 * I have tried CodeMirror for Post Editor, and I’m having a problem with it.
 * When I open and close the CodeMirror editor, it adds blank lines (empty `<p>`
   tags) to my code. This happens even if I don’t make or save any changes while
   CodeMirror is opened. I would love to use this plugin if this could be resolved.
 * Also, I see that the plugin does contain all of the optional theme files, but
   I can find no way to select a different theme. Is there a settings page, or any
   other way to change the theme?
 * [https://wordpress.org/plugins/codemirror-for-post-editor/](https://wordpress.org/plugins/codemirror-for-post-editor/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Felipe Lavín](https://wordpress.org/support/users/felipelavinz/)
 * (@felipelavinz)
 * [11 years ago](https://wordpress.org/support/topic/codemirror-adding-extra-lines/#post-5070474)
 * Hi!
 * I’m very sorry that it took so long for me to reply; I though I was suscribed
   to the support postings but apparently I wasn’t… I am now, though.
 * I’m currently working on a new version of the plugin, which I’d like to tag as
   1.0.0 so it’s a big challenge.
 * I’m aware there are some line breaks issues with the current version and that’s
   my main focus for the new release. Unfortunately, it’s a fairly complex issue
   since this plugin must update the WordPress text editor and then refresh the 
   visual editor, and that involves a lot of processing. I’ve managed to keep line
   breaks consistently with what you would get from changing between the text and
   visual editor, but then I lose indentation and whitespace. I’m still iterating
   on a few ideas, though, so I hope to at least get to a comfortable compromise.
 * Config settings are also planned for the next release, including themes and some
   font options.
 *  Thread Starter [hommealone](https://wordpress.org/support/users/hommealone/)
 * (@hommealone)
 * [11 years ago](https://wordpress.org/support/topic/codemirror-adding-extra-lines/#post-5070475)
 * Thanks Felipe,
 * Your plugin is a noble effort and I look forward to seeing what you come up with.
   Thanks for your work on this and for making it public.
 * I’m so glad to hear that you are working on it and planning improvements. I hope
   you will have success. Code Mirror is so nicely designed, and having it available
   in WordPress would be heavenly.
 * I don’t currently have your plugin installed since it doesn’t work well for my
   needs in the current form. If you can, please reply to this thread once your 
   update is available; that way I’ll be notified and will try it out again!
 * For what it’s worth, I personally prefer to write my HTML without indentation
   anyway; especially when there is limited width to work in. But that may not be
   the most common preference!
 * By the way, are you testing your efforts with the [TinyMCE Advanced](https://wordpress.org/plugins/tinymce-advanced/)
   plugin installed, to make sure they play together nicely? I’ll bet that many 
   of the people who would use your plugin already have TinyMCE Advanced installed.
 * Best wishes and good luck with your coding!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CodeMirror adding extra lines’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/codemirror-for-post-editor_2c2d29.
   svg)
 * [CodeMirror for Post Editor](https://wordpress.org/plugins/codemirror-for-post-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/codemirror-for-post-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/codemirror-for-post-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/codemirror-for-post-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/codemirror-for-post-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/codemirror-for-post-editor/reviews/)

## Tags

 * [codemirror](https://wordpress.org/support/topic-tag/codemirror/)

 * 2 replies
 * 2 participants
 * Last reply from: [hommealone](https://wordpress.org/support/users/hommealone/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/codemirror-adding-extra-lines/#post-5070475)
 * Status: not resolved