Closed ztec closed 10 years ago
Hey, thanks for forking this project!
Unfortunately, while syntax highlighting is a nice thing to have, it breaks spell-checking. Additionally, and as John Gruber puts it, "Markdown is intended to be as easy-to-read and easy-to-write as is feasible". So I'd argue syntax highlighting isn't necessary (even if comfortable), even more considering the preview panel on the right.
As for the tab
key handling, I can't think of anything that'd require it for writing text.
(Except writing code, of course, but since this editor is intended to be minimalist, I'd expect programmers to write code in their preferred editor/IDE and paste it afterward.)
Did you have something else than code in mind when adding that feature?
For these reasons, I won't be merging that PR, but please feel free to request other pulls if you have additional ideas to enhance the editor. Thanks again!
OK, I understand. May I make a pull request with just the tab management ? with no syntax highlighting. In my opinion, the tab is part of the markDown specification, it should be usable with no Copy/past ;-)
If a tab can spare a couple of spaces, then yes, of course!
Before requesting a pull of the same commit though, please don't forget to cache the variables retrieved from the DOM and that are being used multiple times (I'm thinking of editor.markdownSource.val()
).
Also, this
is already referencing the textarea element in the context of that function, so there's no need for editor.markdownSource.get(0)
.
I went ahead and added tab support: ddd7aa0506cec37130930e63589ee228adfcb614
Hello, I changed the simple textarea by ace editor in order to be able to use tabulation and ehnace text typing.