I plan to utilize the placeholder plug-in to allow users to add ... surprise ... placeholders to their text. I have this working just fine and the user ends up with a placeholder text similar to [[course=1234]] or [[program=4567]]. I want the user to be able to double click on the placeholder or select it and click the placeholder icon to edit the placeholder.
What I cannot figure out how to do is pass that placeholder code (e.g. [[course=1234]] or [[program=4567]]) back to the placeholder popup so the user can edit it.
I have tried to copy and modify code that does produce this result when editing a link, but I can't get the data to be accessible from the popup.
Any help would be greatly appreciated.
What I cannot figure out how to do is pass that placeholder code (e.g. [[course=1234]] or [[program=4567]]) back to the placeholder popup so the user can edit it.
I have tried to copy and modify code that does produce this result when editing a link, but I can't get the data to be accessible from the popup.
Any help would be greatly appreciated.
Re: How do I pass information to the placeholder popup?
Rather than trying to send the data to the placeholder popup, I'm grabbing it from the parent opener by using this code from within the placeholder popup window:
I hope this saves someone else some time.
Re: How do I pass information to the placeholder popup?
Unfortunately, this solution no longer works with release 2.5.1 of FCKeditor. The GetSelectedElement() method now returns null (and yes, there is selected text to get). Many of the other FCKSelection methods, like GetBoundaryParentElement(), work appropriately.
Any ideas as to why this suddenly stopped working are greatly appreciated.
Re: How do I pass information to the placeholder popup?
eSelected.innerHTML will then contain ALL the selected text (ie "[[group=123]]")