TECHNICAL FIELD

The present disclosure relates to the field of computer technologies, and more particularly, to a document input content processing method and apparatus, an electronic device, and a storage medium.

BACKGROUND

With the development of Internet technologies, the number of applications supported by the Internet is becoming increasingly larger, and online documents are an important form of Internet applications. Online documents are an extension of traditional desktop word processing applications in Internet applications. Online document technology has gradually eliminated users' dependence on processing software.

Currently, in a process of editing an online document, a user can paste some content on an online document page through copy and paste functions according to his/her needs. For example, when the user pastes an address through the paste function, a link address will be directly pasted to a corresponding target position of the online document.

However, when the user needs to view related content, for example, a title or content, of the link address, the user needs to trigger the link address of the online document and open a page corresponding to the link address to view content that needs to be viewed. Consequently, it can be seen that there are many operation steps for the user to learn about the related content of the page corresponding to the link address on the online document page, and use experience of the online document for the user is not ideal.

SUMMARY

The present disclosure provides a document input content processing method and apparatus, an electronic device, and a storage medium, capable of enabling a user to view related link content of a link address on an online document page without clicking on the link address on the online document page, reducing operation steps of viewing link content by the user, facilitating intuitively knowing the link content by a document user, and improving user experience.

According to an embodiment in a first aspect of the present disclosure, a document input content processing method is provided. The method includes: receiving current input content in a document region on an online document page; displaying, in response to identifying that the current input content is a link address, a selection box on the online document page, the selection box including at least one non-link display mode; obtaining a target display mode selected by a user from the at least one non-link display mode; and obtaining, based on the target display mode, corresponding page content from a page corresponding to the link address, and displaying the corresponding page content in the document region.

In an embodiment of the present disclosure, the method further includes, prior to said displaying the selection box on the online document page, determining whether a network protocol type corresponding to the link address is a predetermined network protocol type. Said displaying the selection box on the online document page is performed when it is determined that the network protocol type corresponding to the link address is the predetermined network protocol type.

In an embodiment of the present disclosure, the method further includes, prior to said displaying the selection box on the online document page, determining whether a link type of the link address is a predetermined link type. Said displaying the selection box on the online document page includes: displaying a first selection box on the online document page when it is determined that the link type of the link address is the predetermined link type, wherein the first selection box includes a number, N, of non-link display modes, where N is a positive integer greater than 1; and displaying a second selection box on the online document page when it is determined that the link type of the link address is not the predetermined link type, wherein the second selection box includes a number, M, of non-link display modes, where M is a positive integer different from N.

In an embodiment of the present disclosure, said determining whether the link type of the link address is the predetermined link type includes: obtaining a predetermined address format rule corresponding to the predetermined link type; and determining whether an address format of the link address conforms to the predetermined address format rule. It is determined that the link type of the link address is the predetermined link type when it is determined that the address format of the link address conforms to the predetermined address format rule.

In an embodiment of the present disclosure, the method further includes, prior to said displaying the selection box on the online document page: determining a link type of the link address based on the link address; and determining the at least one non-link display mode in the selection box based on the link type.

In an embodiment of the present disclosure, when the target display mode is a title display mode, said obtaining, based on the target display mode, the corresponding page content from the page corresponding to the link address, and displaying the corresponding page content in the document region include: obtaining, based on the title display mode, title information from the page corresponding to the link address, and displaying the title information in the document region.

In an embodiment of the present disclosure, when the target display mode is a web page display mode, said obtaining, based on the target display mode, the corresponding page content from the page corresponding to the link address, and displaying the corresponding page content in the document region includes: obtaining, based on the web page display mode, all page content from the page corresponding to the link address; and creating a window in the document region, and displaying a part of all the page content in the created window.

According to an embodiment in a first aspect of the present disclosure, a document input content processing apparatus is provided. The apparatus includes: a receiving module configured to receive current input content in a document region on an online document page; a display module configured to display, in response to identifying that the current input content is a link address, a selection box on the online document page, the selection box including at least one non-link display mode; an obtaining module configured to obtain a target display mode selected by a user from the at least one non-link display mode; and a processing module configured to obtain, based on the target display mode, corresponding page content from a page corresponding to the link address, and display the corresponding page content in the document region.

According to an embodiment of the present disclosure, the apparatus further includes a first determining module configured to determine whether a network protocol type corresponding to the link address is a predetermined network protocol type. The display module is specifically configured to display the selection box on the online document page when it is determined that the network protocol type corresponding to the link address is the predetermined network protocol type.

According to an embodiment of the present disclosure, the apparatus further includes a second determining module configured to determine whether a link type of the link address is a predetermined link type. The display module is specifically configured to: display a first selection box on the online document page when it is determined that the link type of the link address is the predetermined link type, wherein the first selection box includes a number, N, of non-link display modes, where N is a positive integer greater than 1; and display a second selection box on the online document page when it is determined that the link type of the link address is not the predetermined link type, wherein the second selection box includes a number, M, of non-link display modes, where M is a positive integer different from N.

According to an embodiment of the present disclosure, the second determining module is specifically configured to determine whether an address format of the link address conforms to the predetermined address format rule. It is determined that the link type of the link address is the predetermined link type when it is determined that the address format of the link address conforms to the predetermined address format rule.

According to an embodiment of the present disclosure, the apparatus further includes: a first determination module configured to determine a link type of the link address based on the link address; and a second determination module configured to determine the at least one non-link display mode in the selection box based on the link type.

According to an embodiment of the present disclosure, when the target display mode is a title display mode, the processing module is specifically configured to obtain, based on the title display mode, title information from the page corresponding to the link address, and display the title information in the document region.

According to an embodiment of the present disclosure, when the target display mode is a web page display mode, the processing module is specifically configured to: obtain, based on the web page display mode, all page content from the page corresponding to the link address; and create a window in the document region, and display a part of all the page content in the created window.

With the document input content processing apparatus according to the embodiments of the present disclosure, current input content is received in a document region on an online document page. In response to determining that the current input content is a link address, a selection box is displayed on the online document page. In response to determining that a display mode selected by a user from the selection box is a non-link display mode, corresponding content is obtained, based on the non-link display mode selected by the user, from a page of the link address. The corresponding content of the page linked with the link address is displayed in the document region. Therefore, the user can view related link content of the link address on the online document page without clicking on the link address on the online document page, thereby reducing operation steps of viewing the link content by the user, facilitating intuitively knowing the link content by a document user, and improving user experience.

To achieve the above objects, according to an embodiment in a third aspect of the present disclosure, an electronic device is provided. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable by the processor. The processor executes the program so as to: receiving current input content in a document region on an online document page; displaying, in response to identifying that the current input content is a link address, a selection box on the online document page, the selection box including at least one non-link display mode; obtain a target display mode selected by a user from the at least one non-link display mode; and obtain, based on the target display mode, corresponding page content from a page corresponding to the link address, and display the corresponding page content in the document region.

To achieve the above objects, according to an embodiment in a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores a computer program which is executed by a processor so as to: receive current input content in a document region on an online document page; display, in response to identifying that the current input content is a link address, a selection box on the online document page, the selection box including at least one non-link display mode; obtain a target display mode selected by a user from the at least one non-link display mode; and obtain, based on the target display mode, corresponding page content from a page corresponding to the link address, and display the corresponding page content in the document region.

Additional aspects and advantages of the present disclosure will be given at least in part in the following description, or become apparent at least in part from the following description, or can be learned from practicing of the present disclosure.

