Hi, I noticed that when a user selects ,
only the content of the emphasized text is selected so that the user can immediately start typing.
This is true for strong text as well.
However, when a user decides to create a ordered list, unordered list, or blockquote, the Markdown keyboard symbol is selected as well, which means that a user can’t immediately stop typing.
This is an annoyance to users who know Markdown, because I need to re-select only the content, and absolutely infuriating for a user who doesn’t because they might not even know what’s wrong.
Can this be updated so that only the content of whatever is being listed or quoted is selected, and not the keyboard symbol itself?
Finally, in the spirit again of helping people who don’t know Markdown. Could “strong text” be replaced with “bold text” and “emphasized text” be replaced with “italicized text”?
I like this suggestion, @codinghorror’s call on the wording here. I agree calling italics emphasised in the tooltip is somewhat confusing. Looking at Stack Exchange sites it uses “Emphasis” and “Strong” so there is precedent even in non tech sites. GitHub uses “Bold” and “Italic”.
Regarding making Italics/Bold smarter. There are quite a few edge cases… for example, when you highlight this block and hit “B” what do you expect?
- test
- text
-test
(3) test
4. test
[spoiler]
test
[/spoiler]
test [i]test
test[/i]
The ideal outcome has a LOT of magic rules, and we don’t want to have to write a full parser here.
I see (1) highlighting text, then hitting “B” as different from (2) not having text and hitting “B”. The first case does have a lot of magic rules. Perhaps until there’s rich text editing (if that’s at all a priority), include a button that links to Markdown syntax? An you know, I think the second case already works very well for “B” and should be replicated for lists and blockquotes.
Eu imagino que haja uma chamada para setSelectionRange que precisa ter seu valor inicial compensado pelo comprimento da sintaxe Markdown (“*” ou “1.”) + 1 para o caractere de espaço.
Eu acho que nunca usei esses botões de ferramenta antes de hoje. Só notei o problema porque precisava de um exemplo de editor Markdown para copiar. Eu me pergunto quanto uso real esses botões recebem?
Os botões são úteis para indivíduos que não estão familiarizados com markdown. Em uma comunidade que fez a transição do Discourse para o Discord, um dos feedbacks iniciais dos membros foi a ausência da barra de ferramentas de formatação. No entanto, depois que aprendi as técnicas de formatação, descobri que preferia digitar os comandos de formatação, mas não ao usar um smartphone ou tablet. Isso ocorre porque os botões são colocados perto dos seus dedos, tornando-os mais acessíveis do que caracteres especiais no teclado do meu telefone. Este é o motivo pelo qual eu os uso.
Também relatei recentemente o problema que foi mencionado no op.