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
Writer field: Option to disable markdown input #3138
Comments
|
Thanks for looking into this. Not sure if we are talking about the same issue? Disabling marks completely with In Writer/Editor.js there are two default options that seem to do what I’m after, though. Setting both |
I hope it’s okay for me to add to this – not sure whether this qualifies as an additional issue. |
Since we have text formatting via the tooltip, is the markdown-thing still a feature that is needed in the writer field? Maybe the md parsing can be removed all together? At least in German the gender-star problem makes it really hard to use the writer field. Thanks for looking into it! |
For power users the Markdown syntax can be really useful as it's much faster than using the tooltip. I agree it's not optimal, but I feel like we cannot make everyone happy at the same time. |
True, but for speed one can easily use It’s fairly easy for power users to adjust to that – while it’s not easy for non-power users to understand why things look weird when they use the gender star and that they have to remember some work around. |
I second @moritzebeling |
Maybe you could change the markdown shortcut behavior so the formatting characters need a line break or space. Look at this, tiptap has markdown shortcuts too and they don't have this issue: |
As mentioned above, these are working workarounds:
Which unfortunately burns the possibility of having italic text. So it would be great to be able to disable the "smart" markdown behaviour, since I think the confusion it generates is by far bigger than the benefits. |
Over the course of this year, I upgraded several Kirby projects to version 3.5 and 3.6, also taking advantage of the writer field and blocks editor. Maybe it’s just me, maybe I just haven’t found a way to implement a fix or educate clients, but: this seemingly small thing has a huge impact. As mentioned above, I don’t think the advantages of printing italic text between 2 asterisks outweighs the requirement to be able to use the asterisk otherwise. |
What you can try to do until this is fixed (at least until you perform the next upgrade) is to change |
Sorry for being annoying on this topic, but I have regularly people calling me up requesting to "solve that italic-bug" |
Would it make sense to introduce a new field option that completely disables the Markdown syntax for all marks? The keyboard shortcuts would still work, but all text syntax would be ignored and treated as actual text. |
Thank you four sour suggestion, I think that could be nice! The downside would be, that german users would always also have to override the text block then, but maybe that's what it is... the most important thing right now would be to quickly have a working and downwards compatible status quo solution – just as the one you suggested. |
I'd second @lukasbestle's suggestion. We can be annoyed by the general issue, but that's where Markdown syntax just collided with a variant of gender neutral script. Nothing really to do about it. Although, I'd think that it'll shift away from using the asterisk and rather using a colon, that's already the trend in academia - probably in 2-3 years the more common variant. |
Sorry if I'm being stubborn but wouldn't it be better to improve the shortcut behavior like I suggested in my comment above? Gender stars are in the middle of words — italic formatting is something you do after a space or line break. |
@medienbaecker is right. That problem is actually not too hard to fix. The input rule was just outdated. I updated it with the same rule that Tiptap uses and now it works. |
✅ |
Hi, thanks for this! :) Direct input works great! Would it be possible to update pasteRules as well? |
@bastianallgeier I tried with the paste rules from tiptap pasteRules({ type, utils }) {
return [
utils.markPasteRule(/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g, type),
utils.markPasteRule(/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g, type)
];
} However, if I try to paste |
@distantnative our paste rules are indeed not working as the ones in tiptap. They seem to have spent more time on enhancing them. I think we need to take a closer look at their implementation. Right now it does not make sense to update the rules. The result is even worse than before. |
Bumping this issue with a different use case which requires the same fix : Pasting an URL containing at least two (using the URL My suggestion would be to add a field option to disable markdown parsing. |
hey everyone, is there an update or a solution to the asterisk problem? The problem is now appearing in several of our projects, especially when the text block is used... |
@jangoedde Which version are you using? I am in 3.8 and to me it seems that the problem is no longer occurring... both typing and pasting |
@moritzebeling: |
I'm on Kirby 4.1.2 and text between gender stars gets converted to italics when pasting text. |
Describe the bug
When writing in or pasting to a Writer field, text is parsed for the mark characters of the field’s active marks and automatically converted. Thus it is not possible to use these characters for other purposes, e.g. writing the “gender star”. Escaping the mark characters with a backslash seems to be ignored.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Kirby Version
3.5+
The text was updated successfully, but these errors were encountered: