How to show "edit image" in Sitecore experience editor? -


in sitecore "content editor" can use "image editor" clicking "edit image" in data section, in experience editor not visible. there way make available editors use image editor? or behavior sitecore standard? picture field

i've written in blog post.

first you'll need add new button under

/sitecore/system/field types/simple types/image/webedit buttons 

you can duplicate 1 of existing ones , change icon , text yourself. make contents of click field:

chrome:field:editcontrol({command:"webedit:changeimage"}) 

(there's webedit:editimage can't name that).

open app_config\include\sitecore.experienceeditor.config , duplicate entry webedit:chooseimage. change command name webedit:changeimage per above. change type class create below.

if have access decompiler, take @ existing command sitecore.shell.framework.commands.shell.editimage existing command selecting image in experience editor sitecore.shell.applications.webedit.commands.chooseimage. you'll see they're similar, unfortunately use 2 different methods of opening dialog (windows.runapplication , sheerresponse.showmodaldialog) can't reuse existing class as-is. have created class uses bit of both (link below).

create class (eg. editimage.cs), make serializable , inherit webeditimagecommand other ee buttons. have posted full class gist you.

when select image in experience editor, should have button in list opens image editor in modal window when clicked.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -