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.

Is it possible to read inline style tag?

See original GitHub issue

Currently 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:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
spp020105commented, Jan 14, 2019

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? 😦

1reaction
simonbengtssoncommented, Jan 10, 2019

In the didDrawCell the text is already drawn. Try willDrawCell.

Read more comments on GitHub >

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

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