Did you already see our custom controls example? It should be possible to create an action with your custom functionality. With what are you struggling with?
The corresponding Code is under custom/CustomContextPad.js
The problem is now, when add e.g. 2 SemanticTasks (that Item on the Palette with S),
the first TaskName I assign is displayed correctly, but when I assign the TaskName
to the other element all 2 SemanticTasks get the TaskName of the latter one.
So, the first TaskName will be overwritten, such that all SemanticTasks display the
same TaskName. (See the picture: the SemanticTasks should have different TaskNames, but both have the same)
Thanks for sharing your code in the sandbox! It helped a lot to understand your problem.
It seems like once you submit the form inside the context pad action, it got executed for all elements you already executed the action once. You can verify this by setting a console.log inside the submit handler.
This is definitely related to the fact you register the handler on every single click event
It actually works, but there appear a lot of warnings when assigning the TaskNames
for SemanticTasks, such that performance is very low, when adding more
SemanticTasks and assigning their TaskNames. Could you inspect why the warnings
occur at all and how I could avoid them?
there is one more thing, which I just noticed. When you click on a semantic task and click on the screw-wrench symbol and choose a User Task, for instance then nothing happens. Is there an easy way to fix this?