November Happy Hour will be moved to Thursday December 5th.

PlugIn i Editorn

Vote:
 
Jag försöker skapa en icon till editorn där användaren kan göra en linje
Iconen syns inte och jag får "fel" vid kompilering att IconOver och IconOff är gammalmodigt, att man ska använda Iconbase o IconType ist, är det därför det inte fungerar? Sen försöker jag retunerna en sträng med
men det verkar inte räcka? Tips emottages gärna.
#12163
Nov 12, 2004 13:41
Vote:
 
Do you have the EPiServer book? Chapter 13, page 303 will help you... If you dont - paste some code so we can have a look at it /John
#13775
Nov 12, 2004 14:08
Vote:
 
IconOff/IconOver still works, but we recommend using IconBase instead. You can have a look at this plugin sample. It is technically similar to your plugin: http://www.episerver.com/templates/CommunitySample____2648.aspx
#13776
Nov 12, 2004 14:35
Vote:
 
I tried this sample in 4.30 and I got warnings about iconoff/iconover . It says they will be removed in the future - in which version will they be removed? There is no sign of IconBase in this example - When was IconBase introduced? The EPiServer book makes no reference to IconBase either but maybe in the next edition I guess... /John
#13777
Nov 12, 2004 15:08
Vote:
 
I have used that example but can´t get the icons right Class-file: ClientScriptKey = "EditorPlugInLine.js"; ClientScriptBlock = editor.GetScriptTag("EditorPlugInLine.js"); IconOver = "dotline.gif"; IconOff = "dotted_grey_line.gif"; ClientSideOnClick = ("GetLine('{0}')"); JS-file: var line = "
"; return line.htmlText;
#13778
Nov 12, 2004 15:23
Vote:
 
Are they in the right folder? /util/images/Editor Do you get the image missing icon? rigth click on it, choose properties and you will see where it is looking for the images. I had put mine in Images folder by mistake but moved them to the Editor folder and now they work.
#13779
Nov 12, 2004 15:30
Vote:
 
The IconBase/IconType properties were introduced in 4.30, to make it easy to define a set of ikons with a one-liner. It made sense to simplify the icon definition part, since the editor plugin-icon has a strict _. format, for example n_off.gif, n_over.gif etc. So instead of saying IconOff = "n_off.gif"; IconOver = "n_over.gif"; . . you just say IconBase = "n"; And the editor will do the rest for you. As long as the filetype is the default (gif), you do not even have to bother about IconType. The sample editor plugin I referred to is now updated, so it uses IconBase. Unfortunately the book uses the old properties, we will fix that in the next revision.
#13780
Nov 12, 2004 16:02
Vote:
 
Det fungerar om jag använder redan befintliga ikoner i util/images/editorn men inte om jag lägger dit egna. Iconbase fungerar. Men jag får fortfarande inte in något
i editorn. Några förslag?
#13781
Nov 17, 2004 8:54
Vote:
 
I modified the example to get it to work instead of subscript.. a minor adjustment should get you what you need... in js file located at: util/javascript/editor function GetLine(id) { var currentTextRange = getEditor(id).document.selection.createRange(); var currentText = currentTextRange.htmlText; var newText = currentText + "
"; currentTextRange.pasteHTML(newText); }
in the cs file: ClientSideOnClick = String.Format("GetLine('{0}')", editor.ClientID);
#13782
Nov 17, 2004 11:10
Vote:
 
ps. the link to the example is now broken since the episerver site update!
#13783
Nov 17, 2004 11:11
Vote:
 
Its now here: http://www.episerver.com/templates/SampleSource.aspx? id=2648&file=SubscriptTool.js /John
#13784
Nov 17, 2004 11:12
Vote:
 
IconBase = "hr"; IconType = ".gif"; /util/images/Editor/hr_disabled.gif /util/images/Editor/hr_off.gif /util/images/Editor/hr_over.gif /util/images/Editor/hr_selected.gif Detta funkar fint.
#13785
Nov 18, 2004 10:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.