newspeak icon indicating copy to clipboard operation
newspeak copied to clipboard

Add custom view for DOM nodes

Open gbracha opened this issue 3 years ago • 3 comments

In the case of aliens that are DOM nodes, we should be able to display them as HTML. Is there an HTML pretty printer exposed in the browser?

gbracha avatar Apr 29 '21 02:04 gbracha

@gbracha what do you mean by "HTML pretty printer"?

Miciurash avatar Aug 12 '22 18:08 Miciurash

@Miciurash I mean a facility for displaying HTML with syntax highlighting or formatting beyond the raw text. Maybe by accessing dev tools? Though we'd want something portable. Otherwise, this would be pretty straightforward, just get the nodes outerhtml and show it in a CodeMirrorFragment. To do this, one needs tounderstand how we do custom object views in ObjectPresenters; we have such views for documents, lists, strings, numbers etc.

gbracha avatar Aug 13 '22 19:08 gbracha

The most basic thing would be to print out their outerhtml

gbracha avatar Aug 17 '22 11:08 gbracha