Hook register_rich_text_features allows duplicate tags to be registered
See original GitHub issueI’m not sure if this is intended behaviour but register_rich_text_features
allows duplicate formatting tags to be registered. It is particularly annoying when using 3rd party apps that registers featured that are already registered.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Title and Registration FAQ - ADOT
How can I get a replacement (duplicate) registration/tab? You may apply for a duplicate vehicle registration or replacement tab on AZ MVD Now....
Read more >Duplicate Registration
Replacement fee is $5. The same plate number can be re- issued upon request unless reported as stolen.
Read more >mv-44.pdf - PennDOT
Application for Duplicate Registration Card(s) - Complete Sections A, B and either D or E. (Fee: $6/$2 depending on request. See NOTE in...
Read more >Vehicle Registration and Titling Questions - Maryland MVA
A fee does apply for a duplicate registration. The completed form can be brought in person to your local full service MVA or...
Read more >Duplicate Registration, License Plate(s) or Tab, Division of ...
I am listed as an owner on the title/registration and I live in Alaska: Go to your local DMV office with: A copy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @pySilver
I just wanted to add my 2 cents here. I can definitely appreciate this being annoying, I’ve run into things like this before too. In my opinion it’s not really a Wagtail problem, it’s more of a naming convention problem. This happens in almost every ecosystem that allows custom feature registration. Two different packages had the exact same idea and used the same feature name — that’s bound to happen when people can create their own features. It’s typically a pretty rare find though.
I think in this particular case, you could look at the source code of these packages get an idea of what they’re doing and then write your own RichText features. It takes a little digging but it’s relatively simple with Wagtail’s hooks (you’ll probably need to include any extra .css and .js files with a hook, and then use a register feature hook).
For this issue: allowing duplicate tags is a good thing I think. It allows for custom styling using just a simple
<div>
instead of having a limited number of HTML elements to use. I like the idea of an unregister_feature and I think we could to start a conversation around that in a new issue based on that feature proposal (if you haven’t already).I’m going to close this issue for now (EDIT: It was already closed I just hadn’t noticed yet), but if you’d like to open an issue about the unregister function that could be a good place to start the conversation. Or if you have working code for an unregister_feature function, definitely open a pull request! 😄
@KalobTaulien yeah, I agree. I’ll open ticket regarding
unregister_feature
functionality