Score:0

How can I add markup for hyphenation to taxonomy term titles?

in flag

I'm displaying a list of taxonomy terms in a narrow column. Some of the names are too wide to fit and wrap. I thought perhaps inserting a <wbr> in the name would solve this, but the tag is just printed out as a literal. Is there a way to use rich text in taxonomy term names?

taggartJ avatar
cn flag
mmm should avoid adding markup to names .. try to use css to fix your issue.
pglatz avatar
in flag
I agree adding markup in names is a bad idea. My real problem is that long names are breaking in arbitrary places, I would like them to break where hyphenation would occur, but I don't think there is a CSS solution for that. i.e, the word "subscriptions" would ideally break after "sub". I thought adding a hint tag might work when used with `hyphens:manual`, I just wanted to experiment. I tried `word-break: break-word` which is for whole words. All I can think of now is either using some javascript to add the <wbr> tags, or (more realistically) tell the editors to just use shorter words.
ru flag
Every HTML entity and every special symbol also has a unicode-counterpart, which can be entered as "single letter". On Windows PCs this usually is ALT + SOME_NUMBER. This is not just visual symbols like bullets or arrows, there is also a number for non-breaking space `&nbsp;` and there also is a number for soft-hyphen `&shy;`.
leymannx avatar
ne flag
CSS hyphenation is very poor. Either go for `&shy;` or implement a hyphenation JS library.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.