I was checking these examples:
https://jsfiddle.net/qskxzh0e/3/
http://jsfiddle.net/3p1nra6m/1/
and https://stackblitz.com/edit/angular-component-drag
https://material.angular.io/cdk/drag-drop/overview
It is possible to insert (no replace all contained text) some Token form List as cdkDropListDropped
or cdkDrag
?
I already solved my previous question, because I could insert in the Textarea, and I have new chellenges, Here my stackblitz code (sorry for the colors and bliking, because I was testing methods):
For this code, I implemented an interface:
export interface EntryKeyValue {
key: string;
value: string;
}
In my component I have an array like:
ekvs: EntryKeyValue[] = [
{
key: 'first',
value: 'First Item'
},
{
key: 'second',
value: 'Second Item'
},
{
key: 'third',
value: 'Third Item'
},
];
In my HTML I would like to show the key
property, but in my Textarea I want to insert the value
property.
For Example: I should show 'third', but I should insert 'Third Item' in my textarea.
How to do it?
In the imports
array of my app.module.ts
file I have commented //, DragDropModule
because the *cdkDragPreview
is not shown! In order to the user know what is the final value inserted. But my methods are no working as right bottom square shows!!!
Is it compatible DragDropModule
with my methods?, and how to use both?