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

Size of editor #8

Closed
yoavram opened this issue Dec 20, 2012 · 6 comments
Closed

Size of editor #8

yoavram opened this issue Dec 20, 2012 · 6 comments
Labels

Comments

@yoavram
Copy link
Owner

yoavram commented Dec 20, 2012

As the text in the editor accumulates, the preview pane grows, but the editor stays at the same size.

Although the editor text area can be re-sized manually, it would be nice if it automatically grew together with the preview panel.

@Carreau
Copy link

Carreau commented Jan 13, 2013

May I suggest CodeMirror which support Markdown highlighting.
We use it in IPython, and it has an autogrow capability.

@yoavram
Copy link
Owner Author

yoavram commented Jan 13, 2013

I'll have a look, thanks!

@yoavram
Copy link
Owner Author

yoavram commented Feb 23, 2013

I changed the editor from PageDown to CodeMirror, see ab20bc5.
Waiting for feeback if this should be merged to the master branch.
You can also add arbitrary pre and post conversion hooks by writing something like in the js console:

addPreCoversionHook(converter, function(text) { return text.replace("GitHub", "[GitHub](http://github.com)") })

which will convert appearances of GitHub in the markdown to markdown links to GitHub site.

/cc @Carreau @karthikram @lsaravia

@lsaravia
Copy link

I like the space between lines that has PageDown, but there are other features of CodeMirror that are interesting, line numbers and highlighting. CodeMirror has some problem with math that makes the text italicized between $. And the math is not rendered in the preview pane.

@yoavram
Copy link
Owner Author

yoavram commented Feb 24, 2013

  1. The space between lines can be modified in static/css/codemirror.css by adding a line-height: 200%; or something similar (you can specify percent or em units, I think) in the .CodeMirror-lines class. Let me know what you think is a good default and I'll set it (or you could create a pull-request).
  2. The CodeMirror highlighting is not perfect, I'm not sure why it highlights some of the text, but I guess that could be fixed by either digging into it or by using a less intrusive theme (you can see other themes here available here and if there is one you think will be better let me know, I chose the elegant theme because I thought it was neat).
  3. The math rendering was a bug - i fixed it in cca50e0.

@yoavram
Copy link
Owner Author

yoavram commented Feb 26, 2013

Changed line spacing to 150% and merged codemirror branch to master.
Closing this issue.

@yoavram yoavram closed this as completed Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants