Is it possible to read inline style tag?
See original GitHub issueCurrently when my cell content contains <br>
tag, it will recognize and start a new line.
However when the cell content contains <b>
or <i>
tags, it won’t recognize.
I tried to change the js file from innerText to innerHTML:
if (cell.raw && cell.raw instanceof HTMLElement) {
cell.text = (cell.raw.innerHTML || '').trim();
}
but it will display the <b>
tag instead of showing bold text.
May I ask is there any way to let the plugin read these tags?
Thanks a lot!
My question is similar to #412
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Inline Styles in HTML - Codecademy
Inline styles look and operate much like CSS, with a few differences. Inline styles directly affect the tag they are written in, without...
Read more >How to read inline styling of an element? - Stack Overflow
I'm not interested in css attributes that are inherited via declarations in a stylesheet, only inline styles. One last thing, I have no...
Read more >Inline CSS Guide – How to Style an HTML Tag Directly
We can use inline styles to style this element by adding the style attribute to the opening tag, followed by CSS property-value pairs....
Read more >The Style Information element - HTML - MDN Web Docs
This text will be green. Inline styles take precedence over CSS included externally. The style attribute can override it, though.
Read more >Avoid using inline css styles - DEV Community
We cannot use css selectors while writing inline styles. Selectors like before , after , hover , focus etc are very much useful...
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
I am sorry but I don’t understand how can I use these tools to get two different styles in the same cell. It seems to me that the style will override the whole cell content.
For example if I have a text: Lorem ipsum dolor sit amet,
<b>
consectetur</b>
adipiscing elit.<i style="color:red;">
Suspendisse in finibus libero.</i>
Do you mind to further illustrate a bit more of how can I do this? 😦
In the didDrawCell the text is already drawn. Try willDrawCell.