This is mostly for my own reference but I decide it to post here since this blog has been quiet for 2 years.
Here you find the page edit buttons:
Core: /sitecore/system/setttings/html editor profiles/rich text default_old/webeditButtons/ (weird that they use default_old but thats what they do - and that took me a while to figure out )
duplicate an item there and you have a new button.
In the datasection you find 3 options:
Icon - self explanatory
Tooltip - selfexplatory
Click: A call to a javascript function, f.eks.:
Striketrough: javascript:Sitecore.WebEdit.execute("strikeThrough", true, true);
Italic: javascript:Sitecore.WebEdit.execute("Italic", true, true);
And so on. All the execute commands listed here: https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla (I only tested it with strikeThrough, but it should work)
Regarding calling sitecore functionality. There is only created 2 functions in the js file: (website/shell/applications/weEdit.js)
Insert image:
javascript:Sitecore.WebEdit.insertImage($JavascriptParameters)
Insert Link:
javascript:Sitecore.WebEdit.insertLink($JavascriptParameters)
So if we wan't to make something more that that we would have to write new functions for that.
Thats it. :-)
No comments:
Post a Comment