Skip to content

Conversation

@vemonet
Copy link
Contributor

@vemonet vemonet commented Mar 10, 2025

Add rendering of HTML in the default YASR table for cell that have the datatype rdf:HTML. We have some people at SIB that wants it particularly to display images. I think it makes sense to be in the default implementation, if the datatype is HTML then the users would better see it as rendered HTML

I was considering adding a checkbox Render HTML to enable it/disable it. But simple view already does it

I have also added .title to give more explanationation about each checkbox effect when hovering them with the mouse

You can test HTML rendering with this query:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?img ?span WHERE {
  BIND("<img src='https://raw.githubusercontent.com/sib-swiss/sparql-llm/refs/heads/main/chat-with-context/demo/sib-logo.png' />"^^rdf:HTML AS ?img)
  BIND("<span style='color: red;'>toast</span>"^^rdf:HTML AS ?span)
}

@ludovicm67

@changeset-bot
Copy link

changeset-bot bot commented Mar 10, 2025

⚠️ No Changeset found

Latest commit: c6ecd76

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant