The "Palette" in this sample is not a Palette (or GoJS control) at all. It is a collection of HTML elements with draggable attributes using the HTML Drag and Drop API.
This sample lets you drag these HTML elements onto the Diagram to create GoJS nodes. As the mouse passes over stationary nodes in the Diagram, they are highlighted.
This sample also demonstrates allowing external clipboard pasting,
by modifying myDiagram.commandHandler.doKeyDown
to do nothing but allow
the event to bubble, and then defining a "paste"
event on the document
.
So the user can select some text, either on the page or in some other app,
and then a paste in the diagram will create a new node using that text.