I was thinking that when someone did create a layout by typing in entity/numeric
, we could use a submit handler to switch it to the expected use: a layout at node/%
with a visibility condition limiting it to the single entity, either by ID or path.
That way nobody needs to learn a new behavior, but we deliver the feature we intended, and it will work closer to how they expect.
This is a follow-up to both https://github.com/backdrop/backdrop-issues/issues/2636 and https://github.com/backdrop/backdrop-issues/issues/5433#issuecomment-100...
From @docwilmot:
What if we automatically fixed this for the user? Meaning if a user types in entity/numeric we automatically converted this to entity/% and added a condition for entity id = numeric ?
from @jenlampton:
Can we add a condition for path instead of entity ID? I feel like that's going to be more in line with what people expect to happen.
We should also add a message saying "A condition has been added for this layout to match the path you entered" so that people don't think it's a bug.
Recent comments
Unfortunately the word" theme" is used in different ways. By "theme" do you mean the equivalent of Basis, Bartik, etc? (appearance themes). BTW, hook_theme has nothing to do with those...
Refactor code
But ultimately I would like to do a cleaner solution and convert the old <br> tags over to <p> tags using code. I love regexps so it's no problem to massage the HTML to what I want;...
Is there a way to programmatically enable CKEditor5?
I found a (sort of) solution: explicitly add <br> to the list of allowed tags in the "Limit allowed HTML tags" filter settings.
Is there a way to programmatically enable CKEditor5?