Hello I have a CMS and it links the pages like /?p=pageName so to aboid typing all code and try to remember page names. I created a plug in that reads the CMS available pages and generates the appropiate code. I use the Placeholder plugin as a base. And now the program works perfect!.
But I noticed a "bug" on it, ok when I want to add a link to any text, simply I select the text, (lets say "link") and then click on my plugin icon in the editor (Yellow P).
I type the page link and contents. When I click the ok button the link is added perfectly...
the problem becomes when I select the link again (or place the cusor on it) and do the same process again the "link" text now says "linklink". If i do the same thing now says "linklinklinklink" and so on...
I followed this tutorial, word by word... even if you do it it will beheave like Im telling you.
http://sourceforge.net/forum/forum.php? ... _id=257180
I noticed and think the problem is in FCK.InsertHtml on the FCKInsertLink.Add function. If the selected text has no ancestor node <A> it works. the problem is when it has it.
I hope you can help me
Thanks!!
Mon, 08/07/2006 - 12:15
#1
RE: InsertHTML method is duplicating inserted
You can also take a look at the plugin that I uploaded a few days ago as it uses twice the code from the link dialog to generate links and as it is a very simplified version it can help you to find the correct code.