Hi All -
I’ve seen some snippets of code and seen a similar question asked a few times in the forum - still feeling unclear and would really be appreciative of some direction.
I have rich text in the “shortDescription” field of a dynamic content manager element and wanting it to have more line spacing. I added this code and it is not changing anything. Guessing my syntax is off - new to coding…please help
Thanks for the response, J.D. - since this is a dynamic element, I have 30 different pieces of text, it would be for all of those that are displayed as #shortDescription. Here’s what the live site looks like (not a dynamic page - am attempting to re-create this display via the content manager as another 25+ speakers are being added: “changemakertalent .com/meet-our-speakers” and right now, all the rich text is only displaying at a single line height that looks all squished up.
As a back-up, I might be willing to add the code to every single rich text element in the collection - not ideal, but I could at least solve the issue…have not found inline code that could be added to work that way either.
@nicole81813 you can apply it to dynamic elements and repeaters as well.
Let’s say you have a field key “description” in your database collection, and you wish to change the line-height of the description.
Then you can (for example) do something like this:
connect the repeater rich text element to the dateset “description” field.
@jonatandor35 Thank you - I was able to tweak the variables and got the code to do something! That was a massive step in the right direction for me. However, it now seems that the rich text is stripped from the “description” (all italics for specific titles within certain areas is gone).
I am happy to work offline with you and compensate you for time if that is something you’re open to. Guessing this is a quick solve for someone who understands Corvid well and I would appreciate a quick lesson. Feel free to PM if interested: nicole@beinspiredchange .com Many thanks!
@jonatandor35 So on the first option, I got an error message (red dot) so I added a parentheses - not sure if I put it in the right place, but the red dot went away. This did not make any changes to the results list. I then attempted the 2nd option and it also did not provide any changes to the default result set. I did not see any errors pop up and also tried to change the color of the text instead of changing the line height, but everything stayed the same…
You seem to be coming up with some creative ideas. Any more by chance??
One alternative I’m curious about…as much as this would be a manual solve, I’d potentially be willing to put the space request in each rich text line of the dynamic content table for short description. Currently it reads:
Why would anyone willingly plunge headfirst into the war-torn areas of Afghanistan, Darfur, or Libya? For this Pulitzer Prize-winning photojournalist, the simple answer is also the title of her memoir: It’s What I Do.
Wondering if height spacing could be added in here somehow??
And I also just saw this article: https://support.wix. com/en/article/corvid-tutorial-creating-a-rich-text-editor-using-the-html-component - not sure if it would be a potential option…
@jonatandor35 ok - so today I went back to explore one more time and scrolled further down the page than I had before. Oddly, it looks as though the bottom half or so of content did add spacing, while the first 6 elements did not…now I am baffled. Here’s the code and a screenshot…