How the elements generated by ng-repeat in Angularjs connect with external elements and return values

there is a problem in current development:
I need a rich text editor to edit something in each generated element in multiple div generated through ng-repeat.
the logic I currently imagine needs to be implemented is shown in the following figure: these three elements are dynamically generated through ng-repeat, and the number of elements can be 0. After clicking to show the copy, the rich text editor will be displayed. After the content is saved in the rich text editor, the content of the rich text editor will be bound to a variable in the dynamically generated element. At present, there is not much idea about how to save the content in the rich text editor. If you set ng-clik to the edit copy button, you can transfer the original element to the rich text editor, but how can the content in the rich text editor be saved back to this dynamically generated element?

Sep.27,2021

solved, with two global variables to locate the value in ng-repeat. Click Edit to update the global variable, and save it according to the global variable

Menu