Hi,
I want to create a Dropdown Plugin (similar to the Font dropdowns) which list a number of values, for example [abc],[def],[ghi],..., and when I select these values they get inserted into the HTML code at the point of the cursor/selection.
Any ideas how this can be achieved?
TIA,
trappy123
I want to create a Dropdown Plugin (similar to the Font dropdowns) which list a number of values, for example [abc],[def],[ghi],..., and when I select these values they get inserted into the HTML code at the point of the cursor/selection.
Any ideas how this can be achieved?
TIA,
trappy123
RE: Dropdown Plugin Help
RE: Dropdown Plugin Help
ok.. I got it figured out... This mod below will allow you to have a custom drop down that will place in html (formated as u wish (as stated in your custom html file).
HEre are the file contents ... I will note them as best I can...
Custom Dialog File: (dialog Direcotory) fck_classify.html
Change the entries as u see fit.
___________________________________________
Please note: The line:
oEditor.FCK.InsertHtml( '<b>'+ GetE('txtName').value + '</b>' ) ;
is where all the html is happening (file below).
_________________________________________
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!--
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: fck_anchor.html
* Anchor dialog window.
*
* Version: 2.0 RC3
* Modified: 2005-02-16 19:13:27
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
-->
___________________________________________________________________________
fckeditorcode_ie_2.js - chnage in howerver many of the browser files u need to. Note also the page to the html file mentioned above.
There are two changes to this that you need to make
Look for Anchor and insert after (and alter as nessesary)
Note the second entry .. that is mine.
Change 1:
break;case 'Anchor':oCommand=new FCKDialogCommand('Anchor',FCKLang.DlgAnchorTitle,'dialog/fck_anchor.html',370,170);
break;case 'Classify':oCommand=new FCKDialogCommand('Classify',FCKLang.DlgClassifyTitle,'dialog/fck_classify.html',370,170);
Change 2: agian.. mine is the second one.
break;case 'Anchor':oItem=new FCKToolbarButton('Anchor',FCKLang.Anchor);
break;case 'Classify':oItem=new FCKToolbarButton('Classify',FCKLang.Classify);
____________________________________________________
en.js - again.. look for anchor... and add entries below ... modify as needed.
Classify : "Insert/Edit Classify Label",
ClassifyProp : "Classify Properties",
// Classify Dialog
DlgClassifyTitle : "Classify Properties",
DlgClassifyName : "Classify Name",
DlgClassifyErrorName : "Please type the Classify name",
_________________________________________________
fckconfig.js add the entry 'Classify', where ever you want the button to appear. 2 places to change
IE:
FCKConfig.ToolbarSets["Default"] = [
['Source','Bold','Italic','Underline','TextColor','BGColor','-','Preview','Cut','Copy','Paste','-','Find','Replace'],
['OrderedList','UnorderedList','-','Outdent','Indent','JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['SelectAll','Image','Table','Rule','Link','Unlink','Anchor','-','RemoveFormat','-','Classify','FontName','FontSize']
] ;
----------------AND------------------
FCKConfig.ContextMenu = ['Generic','Link','Anchor','Classify','Image','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','TableCell','Table','Form'] ;
_______________________________________________________________
Create an image called classify.gif (transparent) and place in the images folder under toolbar.
Thanks should be it!! Let me know how it works out for u!
RE: Dropdown Plugin Help
RE: Dropdown Plugin Help
in the above code:
break;case 'Classify':oItem=new FCKToolbarButton('Classify',FCKLang.Classify);
classify is the image name. it automatically grabs the image name with the same name. (it apears NOT to be caps sensitive.)
RE: Dropdown Plugin Help
unfortunately not yet. still waiting
RE: Dropdown Plugin Help
anyone? please?
RE: Dropdown Plugin Help