question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hook register_rich_text_features allows duplicate tags to be registered

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
KalobTauliencommented, Aug 20, 2019

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! 😄

0reactions
pySilvercommented, Aug 20, 2019

@KalobTaulien yeah, I agree. I’ll open ticket regarding unregister_feature functionality

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found