The app loads from a library which includes a text "no data", we can't change the library directly and I wonder if a component can find that text and replace it with something like "select a project". I found an example with regex, but I couldn't make it work
-
it is unclear, you should add more information, what did you try?Murhaf Sousli– Murhaf Sousli2020-01-04 22:15:02 +00:00Commented Jan 4, 2020 at 22:15
-
please add full context and the code that you tried so farSergey Rudenko– Sergey Rudenko2020-01-05 01:06:06 +00:00Commented Jan 5, 2020 at 1:06
Add a comment
|
2 Answers
You can do it using the property textContent.
Example:
Given this HTML fragment:
<div id="element">This is your text!</div>
then set the element's text content:
document.getElementById('element').textContent = 'This text is different!';
// The HTML for id 'element' is now:
// <div id="element">This text is different!</div>