Add buttons/dropdownlist to sitecore webedit editor?

蹲街弑〆低调 提交于 2019-12-24 06:41:06

问题


Is it possible to add more buttons or a dropdownlist to the webedit editor when you are viewing the page in the page editor in sitecore?

If you look at the image below I would like to add a "H2" button in the toolbar.


回答1:


You need to add it to /sitecore/system/Settings/Html Editor Profiles/Rich Text Default/WebEdit Buttons/.

And, to create a h2-button, enter the following into the Click field of the new item:

chrome:field:execute({command:"FormatBlock", userInterface:true, value:'h2'})

('h2' being the block format you want)




回答2:


Yes, that is possible. You need to modify the Html Editor Profile for this which is located in the Core database under /sitecore/system/Settings/Html Editor Profiles

If you look at the Full profile, you can find a command for H2 (and other headings) there somewhere. This can be easily copied to the profile that you are currently using (i guess it's the Minimal profile). If you have access to the web.config, you may want to create a copy of the Minimal profile before editing it and configure it as HtmlEditor.DefaultProfile



来源:https://stackoverflow.com/questions/11984568/add-buttons-dropdownlist-to-sitecore-webedit-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!