Hello @softboy99
Technically, your plugin is an HTML page and you can get the content from it for drag’n’drop, but it is not quite clear for me why you would want to use this approach. If you consider my answer from your another topic, you can simply implement insertion of merge fields with InsertContent
method as follows:
let doc = Api.GetDocument();
let para = Api.CreateParagraph();
para.AddText("field name"); // define merge field name
para.WrapInMailMergeField(); // convert the text to a merge field
doc.InsertContent([para], true); // insert merge field into current cursor position
I believe this is the easiest way to achieve your goal, if I understand it correctly.
By the way, are you developing plugin for Docs or for Desktop Editors?