Discourse text editor magic (placeholder for later filing)
-
Continuing the discussion from 1 hour to test intern's mettle:
Hey, guys, I figured out a new discourse command....
Type some text, and hit ctrl+h in the textbox.
Done that? Good.
Now highlight some text and hit ctrl+h
Yeah.
-----
-
Heading
some text
-
Don't try it multiple times.
-
Heading
Heading
Heading
Heading
You fucking tell me.
-
That's a really weird
echo
-
Ok. I seriously have no B*****ming clue what
Dicsores is doing with Ctrl+Hthe DiscoDev was smoking when he wrote the code for this, but it must have been potent.
-
Uh. If there is a selection, it cycles between level 2 header, level 1 header and normal text. If there isn't, it adds a header. The bug here's when you hit Ctrl-H midline and it just dumps a ## Heading ## in place without new-lining first.
This is a bug in the underlying m******n editor, not Discourse itself; try Ctrl-H in Stack Overflow and it behaves exactly the same.
Am I missing something?
-
Days without Markdown getting in our way: 0
-
h1
h2
h3
h4
h5
h6
####### h7
-
Ok. I seriously have no B*****ming clue what Dicsores is doing with Ctrl+Hthe DiscoDev was smoking when he wrote the code for this, but it must have been potent.
it is annoying as all shit, since CTRL+H maps to find&replace in a lot of the editors I use, so I commonly start to do a CTRL+H to replace, say some variable name in code I am anonymizing to post, and end up with some variation of ## Heading ##
Heading
and then find that what it really did was kill my undo buffer
and fuck my post up.
-
Got to love how it goes to the level 2 header
Then the level 1 header
And how it screws with the writing of a post by putting the H1 markdown on a newline, so you carry on typing, only to find your H1 is not where you put it.
[img]http://janeohara.typepad.com/.a/6a00e553feb60f88340120a6b1fb76970c-800wi[/img]
-
# h1
h2
h3
h4
h5
h6
####### h7
Does quoting screw up the headers?
Of course it does...
-
Got to love how it goes to the level 2 header
Then the level 1 header
I imagine someone decided the level 1 header was a bit overwhelming and they would save us from ourselves.
-