diff --git a/common/commonDefines.js b/common/commonDefines.js index 99f3e0b57f..052d3ec8fc 100644 --- a/common/commonDefines.js +++ b/common/commonDefines.js @@ -3706,7 +3706,8 @@ window.AscCommon.g_cIsBeta = "false"; Selection: "Selection", Image: "Image", Shape: "Shape", - OleObject: "OleObject" + OleObject: "OleObject", + Hyperlink: "Hyperlink" }; diff --git a/common/editorscommon.js b/common/editorscommon.js index 5887a51d70..207fd74adf 100644 --- a/common/editorscommon.js +++ b/common/editorscommon.js @@ -13188,13 +13188,15 @@ } - function CPluginCtxMenuInfo(sType, sOlePluginGuid) { + function CPluginCtxMenuInfo(sType, sOlePluginGuid, sHyperLinkVal) { if(!sType) { this["type"] = Asc.c_oPluginContextMenuTypes.None; } else { this["type"] = sType; this["guid"] = sOlePluginGuid; + if (sHyperLinkVal) + this["value"] = sHyperLinkVal; } } //------------------------------------------------------------export--------------------------------------------------- diff --git a/word/api.js b/word/api.js index c0ae8e2deb..189448724c 100644 --- a/word/api.js +++ b/word/api.js @@ -13448,6 +13448,10 @@ background-repeat: no-repeat;\ { return new AscCommon.CPluginCtxMenuInfo(); } + const hyperlink = oLogicDocument.IsCursorInHyperlink(); + if (hyperlink) { + return new AscCommon.CPluginCtxMenuInfo(Asc.c_oPluginContextMenuTypes.Hyperlink, undefined, hyperlink.GetValue()); + } if (!oLogicDocument.IsSelectionUse()) { return new AscCommon.CPluginCtxMenuInfo(Asc.c_oPluginContextMenuTypes.Target);