问题
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