AutoSizing a Panel that contains a textblock

How can we automatically size a textblock so that as we type the block expands.

Here is how we are declaring our node:

 $$(go.Node, "Auto",
                        minSize: new go.Size(20, 20),
                        resizable: true,
                        rotatable: true,
                        locationSpot: go.Spot.Center,
                        click: function (e, node) {
                            var obj = node.findObject("TEXTBLOCK");
                            var diagram = node.diagram;
                            diagram.currentTool = diagram.toolManager.textEditingTool;
                            var tool = diagram.toolManager.textEditingTool;
                            tool.textBlock = obj;
                        name: "TEXTBLOCK",
                        text: "Click to edit",
                        stroke: "black",
                        editable: true,
                        margin: 3,
                        textAlign: "left",
                        wrap: go.TextBlock.None
                    new go.Binding("text").makeTwoWay()),
                    new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
                    new go.Binding("desiredSize", "size", go.Size.parse).makeTwoWay(go.Size.stringify),
                    new go.Binding("angle").makeTwoWay(),
                    new go.Binding("position", "pos", go.Point.parse).makeTwoWay(go.Point.stringify),

Also when editing, we continue to see the original text behind the text block. Is this expected?

Setting a desiredSize on a textblock disallows it from sizing itself.

Yes, because nothing new is committed to the diagram yet. This may change in 1.7. You could change it yourself if you wanted to by mofiying the text editing tool to set the opacity of the TextBlock to 0 when activated and back to 1 when finished.