After clicking my custom button, I am creating a specific table with some specific elements inside it (with jquery) and placing it inside the froala editor. However, whenever I put it inside the editor, this custom table appears at the end point of froala editor. For example, I have 3 paragraphs and I want to add this table between 2nd and 3rd paragraphs, I click the position where I should put the table and insert it. However, it appears at the end of the third paragraph. Is there a way that I can get the current cursor position and put this table at this point?
Thanks in advance
edit : grammar