Commit 98acdeb5 authored by Oleg Korshul's avatar Oleg Korshul

add asc_Remove method (key delete emulation)

parent 1be6eee1
...@@ -3657,4 +3657,7 @@ var editor; ...@@ -3657,4 +3657,7 @@ var editor;
prot["GetTextBoxInputMode"] = prot.GetTextBoxInputMode; prot["GetTextBoxInputMode"] = prot.GetTextBoxInputMode;
prot["asc_InputClearKeyboardElement"] = prot.asc_InputClearKeyboardElement; prot["asc_InputClearKeyboardElement"] = prot.asc_InputClearKeyboardElement;
// mobile
prot["asc_Remove"] = prot.asc_Remove;
})(window); })(window);
...@@ -1117,6 +1117,12 @@ ...@@ -1117,6 +1117,12 @@
{ {
}; };
baseEditorsApi.prototype.asc_Remove = function()
{
if (AscCommon.g_inputContext)
AscCommon.g_inputContext.emulateKeyDownApi(46);
};
// System input // System input
baseEditorsApi.prototype.SetTextBoxInputMode = function(bIsEnable) baseEditorsApi.prototype.SetTextBoxInputMode = function(bIsEnable)
{ {
......
...@@ -396,6 +396,26 @@ ...@@ -396,6 +396,26 @@
} }
}, },
emulateKeyDownApi : function(code)
{
var _e = {
altKey : false,
ctrlKey : false,
shiftKey : false,
target : null,
charCode : 0,
which : 0,
keyCode : code,
code : "",
preventDefault : function() {},
stopPropagation : function() {}
};
this.Api.onKeyDown(_e);
this.Api.onKeyUp(_e);
},
putAreaValue : function(val) putAreaValue : function(val)
{ {
this.DisableCompositeInput = true; this.DisableCompositeInput = true;
......
...@@ -6928,8 +6928,7 @@ background-repeat: no-repeat;\ ...@@ -6928,8 +6928,7 @@ background-repeat: no-repeat;\
asc_docs_api.prototype["asc_AddMath"] = asc_docs_api.prototype.asc_AddMath; asc_docs_api.prototype["asc_AddMath"] = asc_docs_api.prototype.asc_AddMath;
asc_docs_api.prototype["asc_SetMathProps"] = asc_docs_api.prototype.asc_SetMathProps; asc_docs_api.prototype["asc_SetMathProps"] = asc_docs_api.prototype.asc_SetMathProps;
asc_docs_api.prototype["asc_Remove"] = asc_docs_api.prototype.asc_Remove;
window['Asc']['asc_CCommentData'] = window['Asc'].asc_CCommentData = asc_CCommentData; window['Asc']['asc_CCommentData'] = window['Asc'].asc_CCommentData = asc_CCommentData;
asc_CCommentData.prototype['asc_getText'] = asc_CCommentData.prototype.asc_getText; asc_CCommentData.prototype['asc_getText'] = asc_CCommentData.prototype.asc_getText;
......
...@@ -9002,6 +9002,7 @@ background-repeat: no-repeat;\ ...@@ -9002,6 +9002,7 @@ background-repeat: no-repeat;\
// mobile // mobile
asc_docs_api.prototype["asc_GetDefaultTableStyles"] = asc_docs_api.prototype.asc_GetDefaultTableStyles; asc_docs_api.prototype["asc_GetDefaultTableStyles"] = asc_docs_api.prototype.asc_GetDefaultTableStyles;
asc_docs_api.prototype["asc_Remove"] = asc_docs_api.prototype.asc_Remove;
CParagraphPropEx.prototype['get_ContextualSpacing'] = CParagraphPropEx.prototype.get_ContextualSpacing; CParagraphPropEx.prototype['get_ContextualSpacing'] = CParagraphPropEx.prototype.get_ContextualSpacing;
CParagraphPropEx.prototype['get_Ind'] = CParagraphPropEx.prototype.get_Ind; CParagraphPropEx.prototype['get_Ind'] = CParagraphPropEx.prototype.get_Ind;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment