Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to use real html in HTML prepend and HTML append (basic string widget) #150

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ E.g., if it was used in a menu and the menu is red, the circle would be red.
-->
## Changelog
### **WORK IN PROGRESS**
* (foxriver76) allow to use real html in HTML prepend and HTML append (basic string widget)
* (foxriver76) fixed problem while editing groups
* (foxriver76) do not automatically format button text as uppercase
* (foxriver76) do not automatically show page names as uppercase
* (bluefox) Implemented the signal icons for React widgets
* (bluefox) Implemented the last change indication for React widgets

Expand Down
6 changes: 4 additions & 2 deletions src/src/Vis/Widgets/Basic/BasicValueString.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ class BasicValueString extends VisRxWidget {
height: this.state.rxData.iconSize || 24,
}}
/> : null}
{this.state.rxData.html_prepend || ''}
{/* eslint-disable-next-line react/no-danger */}
<div style={{ display: 'inline' }} dangerouslySetInnerHTML={{ __html: this.state.rxData.html_prepend ?? '' }}></div>
<span>{body}</span>
{this.state.rxData.html_append || ''}
{/* eslint-disable-next-line react/no-danger */}
<div style={{ display: 'inline' }} dangerouslySetInnerHTML={{ __html: this.state.rxData.html_append ?? '' }}></div>
</div>
</div>;
}
Expand Down
Loading