|
Param |
Method |
Event |
|
|
AddMenuv1.6 or higherAdds a custom menu.
Syntax[get] HRESULT AddMenu ( [put] HRESULT AddMenu ( Parameters[get] pVal [out, retval] Returns the AddMenu setting values. [put] newVal [in] Sets the AddMenu values. The values are as follows.
Return ValuesNone
RemarksTo specify the AddMenu value, you must apply it after the Editor’s MainClass is called and before the Editor is loaded. The call can be performed via the created MainClass object's "params". Enter the AddMenu setting values in the following order, separated by commas: Menu ID, Type, Menu Image URL, Menu Name. The image size should be 18x18. To add multiple menus, separate their values with the pipe ( | ) character. After adding the menu, use CreateToolbarParams to apply it to the editor. You must set the UserToolbar value to 'true' to use the menu. You can use the added menu by using the CE_OnCustomMenu event.
Sample CodesJavaScript [get] var object = new NamoSE("test");
var createTabValue = object.params.AddMenu;
JavaScript [put] <Adding One Menu>
var object = new NamoSE("test");
object.params.AddMenu = "userMenu,function,
http://www.namoeditor.co.kr/image/menu.jpg,User Menu"
object.params.UserToolbar = true;
object.params.CreateToolbar = "userMenu|newdoc|copy";
object.EditorStart();
<Adding Multiple Menus>
var object = new NamoSE("test");
object.params.AddMenu = "userMenu,function,http://www.namoeditor.co.kr/image/menu.jpg,User Menu|
userMenu1,function,http://www.namoeditor.co.kr/image/menu2.jpg,User Menu 2";
object.params.UserToolbar = true;
object.params.CreateToolbar = "userMenu|newdoc|copy|userMenu1";
object.EditorStart();
function CE_OnCustomMenu(e){
alert("customMenuID:" + e.customMenuID + "\n" + "type:" + e.type);
}
|