Villkor för plugin i editor

Vote:
 
Hej, jag försöker skapa en ny knapp i editorn, som bara ska visas på en sida. Hur villkorar jag visningen av knappen, eller kan jag skapa den inifrån just den sida där den ska visas? Tack, nybörjaren
#12286
Mar 25, 2008 18:34
Vote:
 
Where in the editor is the putton supposed to appear? When creating a new page?
#13982
Mar 25, 2008 18:43
Vote:
 
A new page but more important, when updating an already existing page.
#13983
Mar 25, 2008 18:43
Vote:
 
If you want to display a button when creating/editing a page, this is probably best accomplished by creating the button as a userdefined property. This way you are sure not to mess up anything, which may happen if you change the code directly in the files in /edit folder. What exactly is the button supposed to do?
#13984
Mar 25, 2008 18:43
Vote:
 
It´s supposed to mark up a selected part in a text in a certain way. The button appears in the editor just fine from a javascript-file ("stolen" from codeexampels on this page), but it is shown in all editors, not only in that specific page I´m trying to reach.
#13985
Mar 25, 2008 18:43
Vote:
 
See the IConfigurableTool interface in the SDK, and the Available method. That should do the trick. Note, this runs on the server, so you can get the containing (EPiServer) page by using the Page property on the tool (as it inherits from Control.) Cast it to a PageBase, and you can check the page type and all the other properties on the page.
#13986
Mar 25, 2008 18:43
* 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.