#dev 2026-03-12

2026-03-12 UTC
Scumble, ax562, grufwub, rossabaker, WinnerWi-, WinnerWind, thegreekgeek_, Maker, lars_the_bear, gRegor, barnabywalters, luca, jeremycherfas, jeremy, barnaby, deathcomestotime, [aciccarello], doesnm_, blacklight, Jonmakerguy and NegateThis joined the channel
#
[social]
I noticed my footer on my links page (https://vanderwal.net/links.php) has two paragraphs aligned next to each other. I changed the element for the 81x35 to a div and it still is aligning to the right and not below in my footer.
#
[social]
I’m so baffled.
#
[artlung]
It's a `flex` context, with no wrapping. I suspect you want footer and .footer to `display: grid`
#
[social]
I had just modified that in inspection. It now tucks under. But, the div is now left aligned not center aligned with the footer class.
#
[social]
Sorted. Safari caching the old CSS is a big pain
btrem joined the channel
#
btrem
[Murray] missed your reply to my CKEditor gripe yesterday. (Had to go to work.) I use CKEditor in Drupal. But getting the markup I need can be tedious. So I often switch to code mode and insert my markup (composed in VS Code). It autocorrects missing closing tags. Fine, helpful even.
[Sophia_wood] joined the channel
#
btrem
But it changes markup when it isn't necessary. For exmample, I wanted to insert an address in my text using `<div><div>street address</div><span>city/zip/postal code</span></div>`. It insists -- and "helpfully" corrects to -- `<div><div>street address</div><p><span>city/zip/postal code</span></p></div>`. #@?$#! maddening because there is /nothing/ wrong with the markup as entered.
#
btrem
And the corrected version put vertical space in my address. Grr. Had to change the <p> to a <div>.
#
btrem
Even more maddening, Drupal's CKEditor blocks the paste function. Yep, that's not a misprint. You cannot paste text in a CKEditor. At least, not in Drupal's CKEditor. The only way around it is to again switch to code mode, insert, then switch back. I mean what the ever living #@$@ were they thinking!? Disabling paste?! CKEditor--
#
btrem
And trying to get around it's limitations, I tried to use a `<dl>` element like so: `<dd>some text <div>address</div> some more text</dd>`. Didn't like that, either. This time, it "helpfully" autocorrected to `<dd>some text</dd> <div>address</div> <dd>some more text</dd>`. Which at minimum changes the semantics, and is I'm pretty sure incorrect markup.
#
btrem
There's GH repo, but I don't think I can be bothered to file an issue. Life's too short.
#
[KevinMarks]
I am always annoyed by vs code inserting </p> and so on with self closing elements. The <p> closes the previous one.
#
[Sophia_wood]
I use Panic Nova - no autocomplete and love it for just that reason.
#
btrem
I don't mind VS Code inserting a closing </p>. And I wouldn't mind CKEditor doing that. I pretty much never rely on implicit closing tags when I use any editor. I *do* mind when the editor inserts entire elements that are (a) not needed, and (b) mess up the formatting or semantics.
#
btrem
Oh ffs. CKEditor is just broken when it comes to the <dl> element.
#
btrem
CKEditor--
#
Loqi
CKEditor has -2 karma over the last year
#
[social]
I use Panic Nova (and have for years) but for PHP version update I started using JetBrains’ PHPStorm (and then for Python, PyCharm) so helpful as IDEs.
#
btrem
Problem is Drupal comes with CKEditor. It's just built-in. Even pasting in the code I want doesn't work, because it insists on changing it.
#
[Sophia_wood]
JetBrains is my backup if I don't use nova
#
gRegor
ckeditor is finnicky to update, but yeah I think you do have to allowlist certain HTML elements for them to work. No experience with dl specifically though
#
gRegor
You can loosen up those sanitize options it has too. Like no, really, let me put in my own source HTML :)
WinnerWi- joined the channel
#
[social]
FrESH discussion about dates had me notice my dates on my post were a format I rarely ever use (Month Day, Year), but as I was building it (well its precursor for travel entries) I was rolling a CMS from scratch for a government project and they required the American format. Since this was initiall created 25 to 26 years ago I would take the time stamp and log it, but also have a column in MySQL with the date written out in the desired
#
[social]
format and time. Servers weren’t always robust so it was just query and display and it was fast and efficient.
#
[social]
Today I converted all the stored dates as they are called in many of my templates and it was quicker (and also keeping the load on a hosted shared server quick and efficient) to just update the stored date into the format I prefer (or one of them). The only code I needed to change was the processing of the blog entry script that stores the formatted date.
#
btrem
gRegor: The elements that I'm trying to insert are allowed. (Otherwise, it would simply remove every `<dl>`, `<dt>`, etc. I'll try to find the sanitize options to see if I can get it to stop breaking my markup. But I have little hope.
#
gRegor
[social], not storing dates in ISO8601?
#
[Murray]
@btrem: no worries, life happens 🙂 That does sound frustrating though! I can say that CKEditor not allowing paste is definitely a decision someone else has made; the native editor definitely allows it, and I've never had that restriction myself. Would be infuriating though!
#
[Murray]
I'm personally most annoyed that it doesn't auto-format Markdown on paste, though apparently that can be configured, I just haven't worked it out yet
#
btrem
!!! So you mean that some Drupal dev decided to disallow paste? That's....interesting.
#
[Murray]
That, or every implementation I've ever used has had someone _enable_ it, but my money would be on this being some decision in Drupal itself 🤷
#
[Murray]
I literally could not use it without paste, so much sympathies there!
#
btrem
Apparently, Drupal's unofficial slogan is "making difficult things easy and easy things difficult." And I'd have to say, that sounds pretty accurate to me.
#
[Murray]
In terms of the code changes it seems to be making "on your behalf", the one pattern I can see is that both examples mix block and inline elements in a way that, whilst perfectly legitimate, is (I would say) atypical. Having a block-level `<div>` within a typically text-based `<dd>` might be the problem; if you were to use a `<span>` there, does it still make the same change?
#
[Murray]
I even wonder if you were to explicitly set `display: inline` on the `<div>` (assuming your editor allows inline CSS) whether it would still try breaking it out like that.
#
btrem
Don't know. But the content model of `<dd>` is flow, not inline. :-/
#
[Murray]
But I can see the same logic resulting in those added `<p>` tags: there is an inline element (`<span>`) nested between block-level `<div>` elements. Even though they're all wrapped in a block-level `<div>` the layout for that `<span>` is unclear, so I can kinda see the logic in wrapping it in an appropriate block-level element. As the content is text, a `<p>` would be accurate
#
btrem
And I don't know how else I could properly markup text, then a postal address, then more text, except to use `<dd>text <div>address</div> more text</dd>`
#
[Murray]
The content model of `<dd>` is flow, but the content within it is inline. As in, like a `<p>` element, you don't really expect there to be nested block-level elements internally.
#
btrem
Erm, no the content model of <p> is not flow, is it?
#
[Murray]
I would personally use inline elements: either swap the `<div>` for a `<span>` to preserve the order, or drop both and use `<br>` elements to format the address
grufwub joined the channel
#
btrem
That's what I wound up doing, sticking in a bunch of <br> elements.
#
btrem
The insanity of that...
#
btrem
sighs
#
[Murray]
No, sorry, I wasn't saying it was a flow content model, it's phrasing content, but the _usage_ is the thing that I think is being automated here
#
btrem
Well, that's pretty much the problem, isn't it?
#
[Murray]
Most text left outside of a block-level context _should be_ within a block-level context. I can't really think of a reason why it wouldn't be. So wrapping it in a `<p>` makes sense to me.
#
btrem
CKEditor is deciding, screw the content model. I know what the user wants. I'll just "helpfully" correct it for him.
#
[Murray]
Yeah, and I can see how that would be annoying, particularly because you do know the models and you do know what you want 😅 But I'd imagine the vast majority of people using a rich-text editor have no idea how HTML works, and I do understand why that kind of safeguard would kick in. Perhaps there is a way to disable it
#
btrem
*If* it wanted to put the <span> inside a block level element -- it shouldn't want that, but ok, whatever -- how about a <div> instead? That'd fix the address part at least.
#
btrem
As for the <dl> fix, CKEditor actually takes my valid html and turns it into invalid html.
#
btrem
That is really a bug IMHO.
#
[Murray]
Personally, I'd flag a `<div>` as inappropriate in both contexts. It might be technically allowed as per the letter of the spec, but it makes no sense to me. The address is part of the `<dd>` and therefore should be related to the surrounding text, so it shouldn't be broken out into its own context.
#
btrem
Except is is *not* allowed per the letter of the spec.
#
btrem
The content model of <dl> is one of two: (1) <div>, within which are groups of <dt> and <dd> elements; or (2), collections of <dt> and <dd> elements. There is no mixing of the two AFAICT.
#
[Murray]
I don't think I follow? Neither `<dd>` nor `<div>` are not allowed by the spec?
#
[Murray]
A `<dl>` accepts flow content. I certainly wouldn't encourage the format that CKeditor has come up with, but I don't _think_ it's disallowed. Not sure, and agreed its an odd fix. But as I say, I'd also say that a `<dd><div/></dd>` would be a pattern I wouldn't expect, allowed or not 🤷
#
[Murray]
At any rate, I hope you can find a way to enable paste at some point! Does Drupal not give you a way to modify the field's config?
#
btrem
Changing my <dl><dt></dt><dd><div></div></dd></dl> into <dl><dt></dt><dd></dd><div></div><dd></dd></dl> is wrong per the spec, again AFAICT.
#
btrem
Note that the "corrected" markup has <dt>, <dd>, and <div> as children of <dl>. But as I said above, it's one or the other.
#
btrem
You can, as I just discovered, configure the editor in Drupal. Thanks gRegor++
#
Loqi
gRegor has 37 karma in this channel over the last year (137 in all channels)
#
btrem
But I don't see an option to enable paste. Which is bonkers.
#
btrem
Here's a module to undo the crap that Drupal/CKEditor saddled you with. It all smells like classic Microsoft to me. The "We know better than you what you want" attitude.
#
[Murray]
It looks like the Clipboard plugin is maybe missing from the core CKEditor install: https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-plain-text.html
#
btrem
I don't really understand the part "CKEditor 5 intercepts all native events like copy, cut, or drop and handles them on its side. The goal is to not allow the browser to touch the content in the rich text editor. This could lead to the browser messing it up." Mess it up how?
#
gRegor
Pasting like that often carries over formatting too, unless you choose the paste plain text only option, so I can see why it might be locked down. I've definitely had work clients copy some web text and paste it in and then wondering why it has some other color, or bolded, etc. (from the source they copied)
#
gRegor
And potentially even messier if it's an HTML table they're copying
ali joined the channel
#
gRegor
Presuming this means pasting into the visual editor, not source view
#
btrem
Hmm. My browser (Firefox) doesn't seem to have a "paste plain" command.
#
gRegor
Ctrl + Shift + V
#
gRegor
usually, at least
#
btrem
That's just "paste", not "paste plain".
#
gRegor
That's paste plain on Windows
#
btrem
IOW, there's only one paste command that I can see.
#
gRegor
Ctrl + V is regular paste, which may carry over formatting
#
btrem
Ah, sorry, missed the "shift" part. ;-)
#
gRegor
I believe it's OS level, not browser
#
btrem
I've definitely seen that. Pretty sure it's in either Firefox or Thunderbird or both.
#
gRegor
I use it in Excel regularly
#
btrem
The thing is, you can't move stuff around a page or even a paragraph with that limitation. So if you want to just move a word within a sentence, no can do in Drupal. It's very unintuitive if you ask me.
#
btrem
I just checked for hahas. Ctrl Shift V does nothing in CKEditor/Drupal.
#
gRegor
Right, if you don't have the clipboard plugin or it's disabled, that's not a way around it. Was just saying I can see some reasoning why one might limit pasting.
#
gRegor
Demoed the different pasting in https://etherpad.indieweb.org/test
[Al_Abut] joined the channel
#
btrem
But I must note that I *can* paste when in "source" mode. (Earlier, I referred to that as "code mode" but it's actually labelled "source".)
#
btrem
I suppose in "source" mode it's no longer CKEditor?
[Michael_Kupiet] and gRegor joined the channel