Bind textblock background color to select menu choices

Hi,

Is there a way of changing the background color of a textblock dynamically using a select menu or by other means? I want to keep the existing text.
Something similar to this nonfunctional example, just to clarify:

$(go.TextBlock, {
text: “Test”,
stroke: “#000”,
background: “#CCC”,
textEditor: window.TextEditorSelectBox,
choices: [“yellow”, “white”]
},
new go.Binding(“background”, “choices”)
)

Brgds
Jan

Yes, there are many ways to design and implement something like that. Have you seen:
Text Editing Examples
HTML Context Menu
Simple Block Editor

None of those are exactly what you want, but they all exhibit different ways of doing something that could be helpful.

Thank you very much Walter! The custom context menu solution is brilliant, and exactly what I was looking for. It is really useful to be able to bind data to multiple parts of a template.

Brgds
Jan