-
Notifications
You must be signed in to change notification settings - Fork 438
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
Use <pre> for comments in admin area #604
Conversation
Also update admin.css so that lines get wrapped
Hmm, since it seems no one has stepped up so far and provided a proper solution, I guess this is a good-enough stopgap one. See #570 |
Hi! Does this save the Wouldn't it be better to do |
We have a saying in German: "He who is able to read has the clear advantage".
So rest assured, I already tested that "case" and am running it locally - it's working just fine.
Well you want the browser to explicitly render and treat internally the text field as a |
And he who has time to read has even more advantage :-P |
@jelmer thoughts? |
Why <pre> rather than proper rendering? |
Because then you'd have to deal with switching back and forth between editing markdown source and rendered HTML inside the admin interface - or worse, implement some variation of IMO the admin interface should be kept simple, and admins can be expected to edit markdown themselves. |
@fluffy-critter since you're taking a look at issues anyway, what are your thoughts? This is way easier than implementing the render functionality of the client embed js in admin once again. |
I don't have any particular thoughts about this aspect. |
Okay, let's land this for the moment in lieu of a proper fix |
In conjuntion with 2391e8e, this PR has opened up another annoying bug when editing comments from inside the admin area, appending literal The admin really shouldn't be using |
Also update
admin.css
so that lines get wrappedNote that
document.getElementById().textContent()
already overlooks the<pre>
tags, so there is no need to strip them when using send_edit().This is a dirty fix, but adding the client-side
contenteditable
mechanism here is something I'm not prepared to do. If anyone wants to pick this up, feel free to do so!