Is your feature request related to a problem? Please describe.
Using Yomichan there’s no way to add any to handle any format clearing with css…
It’s annoying because sometimes these dictionaries are wrapped in like 20 divs, nested anchor elements, random weird styles, and it messes up my definitions.
Describe the solution you’d like
I would like anything (setting, button, shortcut) that would let me hard reset them, as in just extract any innerText and re-paste deleting everything else, so its just strings.
Describe alternatives you’ve considered
Each time I need to go manually back to the definition, copy it, then re-paste. When you have a lot of cards to make it gets very tedious, as this isn’t the only step.
This isn’t a nit pick, I have a plugin that messes with the definition field, it completely breaks because of the def’s weird formatting, so I have to manually go in do it or else it just won’t work, and that’s important to me
I would appreciate it if u someone can add this
Or if someone could point me to a plugin or some kind of script…
But that’s not what I mean. Anki pastes the definitions not me, so there’s no way to control that by holding down shift when the note gets made, that still requires me go back out and manually copy the definition.
I’m looking at the Field Replacements and I’m not really sure how that works sry, if that does fix my problem could you show me how if you don’t mind?
Also, Ctrl + r only strips element styles, it doesn’t extract the InnerText, removing all elements wrapping it.
What I want is a button or some kind of shortcut that strips everything by just extracting the innerText, just like Ctrl + r (maybe Ctrl + Alt + Shift + r) but not just styles, it strips all elements and leaves the strings.
This feature is super simple to add in svelte, but I know maybe there might not be any room for a shortcut or anything in Anki anymore, it’s also pretty niche, so I’m just wondering if maybe it could actually be added, or if there’s a script/plugin out there somewhere that has this feature
… that doesn’t seem like it could be true. Is this something that the add-on is pulling in automatically? If so, this may be something you need to ask to be fixed on the add-on side.
The shortcut I posted should jump you directly to the “HTML Stripping” section of the page. You would need to change your {{FieldName}} to {{text:FieldName}} in your card template(s).
I’m not in the we-will-or-won’t-add-a-feature department. I’m just offering ideas that might let you live with the app as it currently is. Even when an idea for a new feature is adopted, it can take a few months for it to make it into a release.
… that doesn’t seem like it could be true. Is this something that the add-on is pulling in automatically? If so, this may be something you need to ask to be fixed on the add-on side.
My bad, I meant Yomichan is adding the definitions, through Anki Connect.
The shortcut I posted should jump you directly to the “HTML Stripping” section of the page. You would need to change your {{FieldName}} to {{text:FieldName}} in your card template(s).
Yea this didn’t work either, my card templates are barebones, the entire definition is wrapped in a single div, it’s just all the styling is being applied with Anki Connect, so it just pastes the html as is.
I’m not sure if it’s possible to do anything about this beforehand because the styling and format is so random, so I can’t know exactly what is wrapping the actual strings beforehand,
If you think there’s another anki feature that might help I will definitely try it but I think maybe I just have to write a script myself but I don’t know if that will work either
Yes, it does seem that Yomichan is in the best position from keeping this unnecessary html away from you.
I don’t know what you tried, but works fine for me. I added your sample to the HTML view of a field. This is what it looks like displayed on a card template with and without HTML stripping.
I don’t know what you tried, but works fine for me. I added your sample to the HTML view of a field. This is what it looks like displayed on a card template with and without HTML stripping.
Actually you’re right, it did work, but the plugin I’m using parses the definition on flip not once, but every time you view it, this messes with it as well, and I still want some elements to work as well like li, ul, ol, and div, not remove all of them as you view the note, so basically it needs to be hardcoded without a script it seems… I now realize that its probably not possible for Anki to fix this problem, I will try to find something inside of Yomichan instead
I would like to bump this as Yomichan is sunset and It’s fork has no plans to implement something for this, I’m wondering if this could be done still…?
i have ajatt tools, but this doesn’t really pertain to Japanese, more so html, as I’m just simply trying to strip my definition of any html, so it’s just the text,
I’m also open to any alternatives or if someone has any scripts I could use…But I also personally think that a lot of people using Anki might also find this useful
I don’t know what is “the fork”. Fork is a copy of another repository. So there are other forks too. Actively updated and maintained. Is Yomitan promoting the idea that only they are a valid fork of Yomichan?
Sorry i don’t really get your point…and “the” just refers to the subject we were talking about, which is Yomitan…
I use Yomitan, have been using it for a while, I’m not gonna go around to every fork asking for this specific feature, then spend days migrating all my stuff over to that fork if they happen to add it.
I’m just simply asking if Anki can add this feature, or if anyone has an idea on a script or something…not really about anything else
I thought you had a chance with tatsumoto but anyways, I hope you find something on Anki’s side. I do know another program that let’s you sentence mine without all the weird nested elements, but if you’re using Yomitan, you also probably know about that.