Sorry, I didn’t get you.
Also, for the popup I’m willing to use joplin views dialog api and some basic css.