Hi @ All,
i have just a simple question. Is it possible to insert a string from a dropdownlist into the fckeditor where my cursor is? And how?
thanks a lot
greetings
WW
i have just a simple question. Is it possible to insert a string from a dropdownlist into the fckeditor where my cursor is? And how?
thanks a lot
greetings
WW
Re: Insert from DropDownList
I've written a plug-in that was designed to insert pre-defined HTML based on a valid form field list; it's not terribly difficult once you find the right bit of code to hook in to.
I started by looking at the Style drop-down code. It, in turn, uses FCKToolbarSpecialCombo as a prototype. If you have a static list of stuff you want to insert, you only need to define a CreateItems function that loads whatever source of items you have for the drop-down (XML, JavaScript object...), register your new item to the system per the standard plug-in for toolbar instructions and your plug-in is pretty much complete.
Create a 'mynewcombo' directory in the editor/plugins directory, create a 'lang' directory under that, create a lang entry for your language for 'MyNewCombo', then create the fckplugin.js file in the 'mynewcombo' directory:
Add 'mynewcombo' as a plugin and 'MyNewCombo' to your Toolbar line in fckconfig.js and you're ready to rock and roll.
Re: Insert from DropDownList
thanks a lot, but i have two more questions.
1) What do you meen whith: create a lang entry for your language for 'MyNewCombo' ?
2) Add 'mynewcombo' as a plugin and 'MyNewCombo' to your Toolbar line in fckconfig.js <----- How should this look like?
thanks, greetings from Vienna
WW
Re: Insert from DropDownList
thanks a lot
WW
Re: Insert from DropDownList
LesBarstow has provided you with the code of a plugin to help you, he has explained the steps that you need to follow and you are demanding for a detailed step by step?
If you don't want to read the forums and the docs, and you need the code so badly that you can't wait even a single day, why don't you hire a developer?
Re: Insert from DropDownList
Take some time to read through the Developer Docs, especially the section on writing plug-ins, and you may also need to delve a bit into the source code if you want to find many useful functions that already exist in the editor code.