Text editing method, device and electronic device

By receiving and responding to moving inputs to determine the position and selected text in the text to be edited, and editing according to the category, the problem of low efficiency in text editing operations on the mobile side is solved, and more efficient and accurate text editing operations are achieved.

CN113805753BActive Publication Date: 2025-05-30VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111120872.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2025-05-30
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

In the prior art, the text editing operation on the mobile phone is inefficient, the positioning cursor is prone to errors, and the operation is cumbersome.

Method used

By receiving the user's moving input to the target editing function option, in response to the end operation of the moving input, the position of the target editing function option in the text to be edited, and the selected text is determined based on the position, and the editing process is performed according to the category of the target editing function option.

Benefits of technology

It simplifies the operation steps of users to select text, improves text operation efficiency, and reduces the possibility of cursor positioning errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113805753B_ABST
    Figure CN113805753B_ABST
Patent Text Reader

Abstract

The present application discloses a text editing method, apparatus and electronic device, belonging to the field of communication technologies. The text editing method includes: receiving a movement input of a user to a target editing function option; in response to an end operation of the movement input, determining a position of the target editing function option in a text to be edited, and determining a selected text according to the position; and performing an editing process on the selected text according to a category of the target editing function option.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technologies, and particularly relates to a text editing method, apparatus, and electronic device. Background Art

[0002] With the development of technology, mobile devices have become more and more powerful and play an increasingly important role in people's work, life, office, entertainment and other activities. Among them, for many text editing applications, it is convenient to select and edit text through a mouse and keyboard on the desktop, but on the mobile phone side, only a section of text can be selected by long-pressing the cursor with a finger, and then applying styles. There are problems in the operation process that it is easy to make mistakes in positioning the cursor, and the operation is relatively cumbersome and the operation efficiency is low. Summary of the Invention

[0003] The purpose of the embodiments of this application is to provide a text editing method, apparatus, and electronic device, which can solve the problem of low text editing efficiency in the prior art.

[0004] In a first aspect, the embodiments of this application provide a text editing method, including:

[0005] Receiving a mobile input of a user for a target editing function option;

[0006] In response to the end operation of the mobile input, determining the position of the target editing function option in the text to be edited, and determining the selected text according to the position;

[0007] Performing an editing process on the selected text according to the category of the target editing function option.

[0008] In a second aspect, the embodiments of this application provide a text editing apparatus, including:

[0009] A first receiving module, configured to receive a mobile input of a user for a target editing function option;

[0010] A first response module, configured to, in response to the end operation of the mobile input, determine the position of the target editing function option in the text to be edited, and determine the selected text according to the position;

[0011] A processing module, configured to perform an editing process on the selected text according to the category of the target editing function option.

[0012] In a third aspect, the embodiments of this application provide an electronic device, which includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0013] Fourthly, an embodiment of the present application provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0014] Fifthly, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the method described in the first aspect.

[0015] In the embodiment of the present application, when performing text editing, by receiving a user's moving input for a target editing function option; in response to the end operation of the moving input, determining the position of the target editing function option in the text to be edited, and determining the selected text according to the position, and further editing the selected text according to the category of the target editing function option. In this way, the operation steps of the user to select text can be simplified, and the text operation efficiency can be improved. Description of the Drawings

[0016] Figure 1 is one of the flowcharts of the text editing method according to the embodiment of the present application;

[0017] Figure 2 is one of the schematic diagrams of the text editing interface according to the embodiment of the present application;

[0018] Figure 3 is the second schematic diagram of the text editing interface according to the embodiment of the present application;

[0019] Figure 4 is the third schematic diagram of the text editing interface according to the embodiment of the present application;

[0020] Figure 5 is the fourth schematic diagram of the text editing interface according to the embodiment of the present application;

[0021] Figure 6 is the fifth schematic diagram of the text editing interface according to the embodiment of the present application;

[0022] Figure 7 is the sixth schematic diagram of the text editing interface according to the embodiment of the present application;

[0023] Figure 8 is the seventh schematic diagram of the text editing interface according to the embodiment of the present application;

[0024] Figure 9 is the eighth schematic diagram of the text editing interface according to the embodiment of the present application;

[0025] Figure 10 is the ninth schematic diagram of the text editing interface according to the embodiment of the present application;

[0026] Figure 11 It is the tenth schematic diagram of the text editing interface in the embodiments of the present application;

[0027] Figure 12 It is the eleventh schematic diagram of the text editing interface in the embodiments of the present application;

[0028] Figure 13 It is the twelfth schematic diagram of the text editing interface in the embodiments of the present application;

[0029] Figure 14 It is the thirteenth schematic diagram of the text editing interface in the embodiments of the present application;

[0030] Figure 15 It is the fourteenth schematic diagram of the text editing interface in the embodiments of the present application;

[0031] Figure 16 It is the fifteenth schematic diagram of the text editing interface in the embodiments of the present application;

[0032] Figure 17 It is the structural block diagram of the text editing device in the embodiments of the present application;

[0033] Figure 18 It is the structural block diagram of the electronic device in the embodiments of the present application;

[0034] Figure 19 It is the schematic diagram of the hardware structure of the electronic device in the embodiments of the present application. Detailed implementation manners

[0035] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0036] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.

[0037] Next, in conjunction with the accompanying drawings, the text editing methods, devices, and electronic devices provided in the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.

[0038] As Figure 1 shown, the present application provides a text editing method, which specifically includes the following steps:

[0039] Step 11: Receive the user's moving input for the target editing function option;

[0040] In this step, the target editing function option can be a specific function element control, such as a specific font size (e.g., small four, initial, 20, etc.), a specific font color (e.g., red, black, green, etc.), a specific font (e.g., regular script, boldface, Song typeface, etc.), strikethrough, underline, bold, to-do, etc., or it can be a function style option, such as large categories of styles like font, font size, color, alignment, list style, etc.

[0041] Exemplarily, as Figures 2 to 16 shown, on the convenient interface, there is an editing function selection area b and a text editing area a. Among them, the text to be edited is displayed in the text editing area a, and the target editing function option is displayed in the editing function selection area b.

[0042] Among them, the moving input may include a touch operation in which the user long-presses the icon of the target editing function option and moves it.

[0043] Step 12: In response to the end operation of the moving input, determine the position of the target editing function option in the text to be edited, and determine the selected text according to the position;

[0044] Among them, determining the selected text according to the position in step 12 includes:

[0045] Determine the paragraph, text line or sentence where the position is located as the selected text.

[0046] Exemplarily, as Figure 8 shown, taking the specific font size control as the function element control as an example, when the user moves the "23" font size control to the second paragraph of the text to be edited, the second paragraph is taken as the selected text.

[0047] Exemplarily, as Figure 12 shown, taking the specific template control as the function element control as an example, when the user moves the bubble template control as Figure 12 shown to the first paragraph of the text to be edited, the first paragraph is taken as the selected text.

[0048] Step 13: Edit and process the selected text according to the category of the target editing function option.

[0049] In this step, the categories of the target editing function options may include: specific function element controls and function style options. Among them, the specific function element controls include: specific font sizes (such as 12-point, 72-point, 20, etc.), specific font colors (such as red, black, green, etc.), specific fonts (such as KaiTi, HeiTi, SongTi, etc.), strikethrough, underline, bold, to-do, etc. The function style options may include: large categories of styles such as font, font size, color, alignment, list style, etc.

[0050] In the above embodiment, when the user performs text editing on the text editing interface, the icon of the target editing function option is displayed on the text editing interface. When receiving the user's input for moving the icon of the target editing function option; in response to the end operation of the moving input, determine the position of the target editing function option in the text to be edited, and according to the position, determine the selected text, and perform editing processing on the selected text according to the category of the target editing function option. In this way, the operation steps for the user to select text can be simplified, and the text operation efficiency can be improved.

[0051] In one embodiment, the style of the text in the icon of the target editing function option is the same as the style of the body text in the text editing area.

[0052] For example, the font style of the text displayed on the font button control is the same as the font style of the body text in the text editing area. In this way, it is convenient for the user to know the text style of the body text at a glance through the icon of the target editing function option.

[0053] In one embodiment, when the target editing function option is a function style option, the above method further includes:

[0054] Receiving a first input from the user for the target editing function option;

[0055] In response to the first input, expand and display a plurality of function element controls corresponding to the target editing function option.

[0056] Among them, the first input includes but is not limited to: input operations such as clicking, double-clicking, swiping, or long-pressing.

[0057] Exemplarily, as Figure 3 shown, when the target editing function option is the font size style, click the font size style icon "A", then expand and display the specific font size controls as shown in Figure 4 shown;

[0058] Exemplarily, as Figure 5 shown, when the target editing function option is the alignment style, click the alignment icon, then expand and display the specific alignment controls, such as Figure 6As shown, it includes four control icons for left alignment, right alignment, center alignment, and justified alignment);

[0059] Further, in one embodiment, when the category of the target editing function option is a function element control, step 13 above includes:

[0060] Perform a text editing function corresponding to the target editing function option on the selected text.

[0061] Exemplarily, as Figures 7 to 9 shown, taking the function element control as a specific font size control as an example, when the user moves the "23" font size control to the second paragraph of the text to be edited (as Figure 8 , the dashed arrow shows the movement trajectory), the text font size effect at the second paragraph is displayed as font size 23; when the "23" font size control is moved to the second paragraph of the text to be edited and then released, the font size of the second paragraph of text is updated to font size 23.

[0062] Exemplarily, as Figures 10 to 12 shown, taking the function element control as a specific bubble template control as an example, when the user's finger moves the bubble template control such as Figure 11 to the first paragraph of the text to be edited (as Figure 12 , the dashed arrow shows the movement trajectory), the text in the first paragraph is the selected text, and the text effect at the first paragraph is displayed as the bubble effect as Figure 12 shown.

[0063] Through the above embodiments, it is possible to simplify the user's text editing process, facilitate the user's text editing operation, and improve the text editing efficiency.

[0064] Among them, in a specific embodiment, after receiving the user's movement input of the target editing function option, the above method further includes:

[0065] In response to the movement input, when the target editing function option passes over the text to be edited, display the target text part as a text editing effect corresponding to the target editing function option; wherein, the target text part is related to the position of the target editing function option.

[0066] For example, the target text part is the paragraph, text line, or sentence where the position of the target editing function option is located.

[0067] Exemplarily, during the process of moving the "23" font size control, when the user moves the "23" font size control to a certain paragraph of the text to be edited (such as the first paragraph), the font size effect of the text at the first paragraph is displayed as the 23 - point font size. In this way, the user can preview the text editing effect in advance during the process of moving the target editing function option, so as to enable the user to adjust the text editing operation in time and select the appropriate text editing effect.

[0068] Further, in one embodiment, when the category of the target editing function option is a function style option, step 13 includes:

[0069] Displaying a plurality of function element controls corresponding to the target editing function option;

[0070] Receiving a selection input from the user for the target function element control among the plurality of function element controls;

[0071] In response to the selection input, performing a text editing function corresponding to the target function element control on the selected text.

[0072] Exemplarily, as Figures 13 to 16 shown, taking the function style option of font size as an example (such as Figure 13 the "A" icon clicked by the user), when the user moves the font size "A" control to the second paragraph of the text to be edited (such as Figure 14 , the dotted arrow shows the movement trajectory), the text at the second paragraph is shown in the selected state; when the "A" font size control is moved to the second paragraph of the text to be edited and then released, a function element control selection area b2 is displayed (such as Figure 14 and 15 shown); further, receiving a click input from the user for the target function element control ("23" font size) in the function element control selection area b2, and updating the font size of the second - paragraph text to 23 - point font size (such as Figure 16 shown).

[0073] Through the above - mentioned embodiments, the text editing process of the user can be simplified, the text editing operation of the user can be facilitated, and the text editing efficiency can be improved.

[0074] In one embodiment, after the above - mentioned step 12, the method further includes:

[0075] Displaying a first adjustment cursor and a second adjustment cursor at the start point and the end point of the selected text respectively;

[0076] Receiving a movement input for the first adjustment cursor and the second adjustment cursor;

[0077] In response to the movement input, adjusting the selected text.

[0078] In this embodiment, when the selected text does not meet the requirements, by moving the first adjustment cursor and the second adjustment cursor, the selected text can be finely adjusted. Among them, during the moving process, there should be a text change effect in the paragraph where the cursor is located, so that the user can more intuitively adjust the selected text.

[0079] In one embodiment, when a virtual keyboard is displayed on the text editing page, after step 11 above, the following is further included:

[0080] In response to the moving input, hide the virtual keyboard.

[0081] In response to the end operation of the moving input, display the virtual keyboard, and display a cursor after the selected text; or, when the end position of the moving input is not at the text to be edited, in response to the end operation of the moving input, display the virtual keyboard, and do not change the cursor position displayed in the text to be edited.

[0082] In this embodiment, by hiding the virtual keyboard, the editable text area can be increased, and the interference of the virtual keyboard on the editing operation process can also be avoided; by responding to the end operation of the moving input, displaying the virtual keyboard, and displaying a cursor after the selected text; or, when the end position of the moving input is not at the text to be edited, in response to the end operation of the moving input, displaying the virtual keyboard, and not changing the cursor position displayed in the text to be edited, it is convenient for the user's subsequent text editing operations.

[0083] Further, for the convenience of the user's editing operation, when the user completes the moving input and the cursor stays after the text content to which the user applies the effect, the virtual keyboard appears; if no effect is applied to the text after moving out of the target editing function option (such as releasing the hand and leaving the screen in the non-text response area), after the font style selection area is closed, the virtual keyboard appears and the cursor position remains unchanged.

[0084] In one embodiment, the above method further includes:

[0085] Receive the user's selection input for the target editing function option;

[0086] When the selected text does not exist in the text to be edited, in response to the selection input, perform the text editing function corresponding to the target editing function option on the text input after the current cursor;

[0087] When the selected text exists in the text to be edited, in response to the selection input, perform the text editing function corresponding to the target editing function option on the selected text and the text input after the current cursor.

[0088] In this embodiment, when a specific text style option is clicked, if there is no selected text in the text editing area a, the function of the specific text style option acts on the content input after the cursor; if there is selected text in the text editing area a, the function of the specific text style option acts on the selected text and the content newly input by the user after the last character of the selected text. In this way, through diverse text editing operations, the user's text editing process can be edited, improving the text editing efficiency.

[0089] In the above solution, the present invention optimizes the style application process in the text editing process through gesture operation methods on the touch screen. By means of long-press and movement, the text style or text element control is moved to a specified paragraph in the content display area, and the corresponding paragraph can be automatically recognized according to the click position, and the style / or text element control is added to the target paragraph. After releasing the finger, adjustment handles appear before and after the selected paragraph for fine adjustment, optimizing the cumbersome operation of the traditional editing method that requires moving the cursor up, down, left, or right to select text, and enhancing the user experience.

[0090] It should be noted that for the text editing method provided in the embodiments of the present application, the execution subject can be a text editing device, or a control module in the text editing device for executing the text editing method. In the embodiments of the present application, the text editing device executing the text editing method is taken as an example to illustrate the text editing device provided in the embodiments of the present application.

[0091] As shown in 17, the present application provides a text editing device 1700, including:

[0092] A first receiving module 1701, configured to receive a movement input of a user for a target editing function option;

[0093] A first response module 1702, configured to determine the position of the target editing function option in the text to be edited in response to the end operation of the movement input, and determine the selected text according to the position;

[0094] A processing module 1703, configured to perform editing processing on the selected text according to the category of the target editing function option.

[0095] Optionally, the first response module 1702 includes:

[0096] A first response sub-module, configured to determine the paragraph, text line, or sentence where the position is located as the selected text.

[0097] Optionally, when the category of the target editing function option is a functional element control, the device further includes:

[0098] The first processing module is configured to perform a text editing function corresponding to the target editing function option on the selected text.

[0099] Optionally, when the category of the target editing function option is a function style option, the processing module 1703 includes:

[0100] The second processing sub-module is configured to display a plurality of function element controls corresponding to the target editing function option;

[0101] The third processing sub-module is configured to receive a selection input of a target function element control from the plurality of function element controls by the user;

[0102] The fourth processing sub-module is configured to perform a text editing function corresponding to the target function element control on the selected text in response to the selection input.

[0103] Optionally, the device 1700 includes:

[0104] The display module is configured to display a first adjustment cursor and a second adjustment cursor at the start point and the end point of the selected text respectively;

[0105] The second receiving module is configured to receive a movement input for the first adjustment cursor and the second adjustment cursor;

[0106] The second response module is configured to adjust the selected text in response to the movement input.

[0107] Optionally, when a virtual keyboard is displayed on the text editing page, the device further includes:

[0108] The third response module is configured to hide the virtual keyboard in response to the movement input;

[0109] The fourth response module is configured to display the virtual keyboard in response to the end operation of the movement input, and display a cursor after the selected text; or, when the end position of the movement input is not at the text to be edited, display the virtual keyboard in response to the end operation of the movement input, and do not change the cursor position displayed in the text to be edited.

[0110] Optionally, the device 1700 further includes:

[0111] The third receiving module is configured to receive a selection input of the target editing function option by the user;

[0112] The fifth response module is configured to perform a text editing function corresponding to the target editing function option on the text input after the current cursor when there is no selected text in the text to be edited in response to the selection input;

[0113] A sixth response module, configured to, when the selected text exists in the text to be edited, in response to the selection input, perform a text editing function corresponding to the target editing function option on the selected text and the text input after the current cursor.

[0114] With the text editing device in the embodiments of the present application, when a user performs text editing on a text editing interface, an icon of a target editing function option is displayed on the text editing interface. When receiving a movement input of the user on the icon of the target editing function option; in response to the end operation of the movement input, the position of the target editing function option in the text to be edited is determined, and the selected text is determined according to the position. Further, according to the category of the target editing function option, editing processing is performed on the selected text. In this way, the operation steps for the user to select text can be simplified, and the text operation efficiency can be improved.

[0115] The text editing device in the embodiments of the present application can be a device, or a component, an integrated circuit, or a chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0116] The text editing device in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0117] The text editing device provided in the embodiments of the present application can implement Figures 1 to 16 each process implemented by the method embodiments. To avoid repetition, details are not described here again.

[0118] Optionally, as Figure 18As shown in the figure, an embodiment of the present application further provides an electronic device 1800, including a processor 1801, a memory 1802, a program or instruction stored on the memory 1802 and executable on the processor 1801. When the program or instruction is executed by the processor 1801, it implements each process of the above-described embodiment of the text editing method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0119] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0120] Figure 19 Schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present application.

[0121] The electronic device 1900 includes, but is not limited to: a radio frequency unit 1901, a network module 1902, an audio output unit 1903, an input unit 1904, a sensor 1905, a display unit 1906, a user input unit 1907, an interface unit 1908, a memory 1909, and a processor 1910, etc.

[0122] Those skilled in the art can understand that the electronic device 1900 may further include a power supply (such as a battery) for supplying power to each component. The power supply can be logically connected to the processor 1910 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 19 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0123] Among them, the user input unit 1907 is used to receive the user's mobile input for the target editing function option;

[0124] The processor 1910 is configured to determine the position of the target editing function option in the text to be edited in response to the end operation of the mobile input, and determine the selected text according to the position; and perform editing processing on the selected text according to the category of the target editing function option.

[0125] Optionally, when the processor 1910 determines the selected text according to the position, it is specifically configured to determine the paragraph, text line, or sentence where the position is located as the selected text.

[0126] Optionally, when the category of the target editing function option is a function element control, the processor 1910 is further configured to perform a text editing function corresponding to the target editing function option on the selected text.

[0127] Optionally, when the category of the target editing function option is a function style option, a display unit 1906 is configured to display a plurality of function element controls corresponding to the target editing function option; a user input unit 1907 is further configured to receive a selection input from the user for a target function element control among the plurality of function element controls; a processor 1910 is further configured to, in response to the selection input, perform a text editing function corresponding to the target function element control on the selected text.

[0128] The display unit 1906 is further configured to display a first adjustment cursor and a second adjustment cursor at the start point and the end point of the selected text, respectively.

[0129] The user input unit 1907 is further configured to receive a movement input for the first adjustment cursor and the second adjustment cursor.

[0130] The processor 1910 is further configured to, in response to the movement input, adjust the selected text.

[0131] Optionally, when a virtual keyboard is displayed on the text editing page, the processor 1910 is further configured to, in response to the movement input, hide the virtual keyboard.

[0132] The processor 1910 is further configured to, in response to an end operation of the movement input, display the virtual keyboard and display a cursor after the selected text; or, when the end position of the movement input is not at the text to be edited, in response to the end operation of the movement input, display the virtual keyboard and not change the position of the cursor displayed in the text to be edited.

[0133] Optionally, the user input unit 1907 is further configured to receive a selection input from the user for the target editing function option.

[0134] The processor 1910 is further configured to, when the selected text does not exist in the text to be edited, in response to the selection input, perform a text editing function corresponding to the target editing function option on the text input after the current cursor.

[0135] The processor 1910 is further configured to, when the selected text exists in the text to be edited, in response to the selection input, perform a text editing function corresponding to the target editing function option on the selected text and the text input after the current cursor.

[0136] For the electronic device provided in this application, when a user performs text editing on a text editing interface, an icon of a target editing function option is displayed on the text editing interface. In the case of receiving a movement input of the user on the icon of the target editing function option; in response to the end operation of the movement input, the position of the target editing function option in the text to be edited is determined, and the selected text is determined according to the position. In this way, the operation steps for the user to select text can be simplified, and the text operation efficiency can be improved.

[0137] It should be understood that in the embodiments of this application, the input unit 1904 may include a Graphics Processing Unit (GPU) 19041 and a microphone 19042. The graphics processor 19041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 1906 may include a display panel 19061, and the display panel 19061 may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1907 includes a touch panel 19071 and other input devices 19072. The touch panel 19071 is also called a touch screen. The touch panel 19071 may include two parts: a touch detection device and a touch controller. The other input devices 19072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here. The memory 1909 may be used to store software programs and various data, including but not limited to application programs and operating systems. The processor 1910 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1910.

[0138] The embodiments of this application also provide a readable storage medium. A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, each process of the embodiment of the above-mentioned text editing method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.

[0139] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disc, etc.

[0140] Another embodiment of the present application further provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run programs or instructions to implement each process of the above-mentioned embodiment of the text editing method and can achieve the same technical effects. To avoid repetition, details are not described herein again.

[0141] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0142] It should be noted that in this document, the term "comprising", "including" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising such element. In addition, it should be pointed out that the methods and devices in the embodiments of the present application are not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.

[0144] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. A text editing method, characterized in that, it includes: Receiving a moving input from the user for a target editing function option; In response to the end operation of the moving input, determining the position of the target editing function option in the text to be edited, and determining the selected text according to the position; displaying a first adjustment cursor and a second adjustment cursor at the start point and the end point of the selected text respectively; Receiving a moving input for the first adjustment cursor or the second adjustment cursor; In response to the moving input, adjusting the selected text; Performing an editing process on the selected text according to the category of the target editing function option; Wherein, the method further includes: In response to the moving input, when the target editing function option passes through the text to be edited, displaying a target text part as a text editing effect corresponding to the target editing function option; wherein, the target text part is a paragraph, a text line or a sentence where the position of the target editing function option is located.

2. The text editing method according to claim 1, characterized in that, The determining the selected text according to the position includes: Determining the paragraph, text line or sentence where the position is located as the selected text.

3. The text editing method according to claim 1, characterized in that, When the category of the target editing function option is a function element control, the performing an editing process on the selected text according to the category of the target editing function option includes: Performing a text editing function corresponding to the target editing function option on the selected text.

4. The text editing method according to claim 1, characterized in that, When the category of the target editing function option is a function style option, the performing an editing process on the selected text according to the category of the target editing function option includes: Displaying a plurality of function element controls corresponding to the target editing function option; Receiving a selection input from the user for a target function element control among the plurality of function element controls; In response to the selection input, performing a text editing function corresponding to the target function element control on the selected text.

5. The text editing method according to claim 1, characterized in that, When a virtual keyboard is displayed on the text editing page, after receiving the moving input from the user for the target editing function option, the method further includes: In response to the moving input, hiding the virtual keyboard; In response to the end operation of the moving input, displaying the virtual keyboard and displaying a cursor after the selected text; or, when the end position of the moving input is not in the text to be edited, in response to the end operation of the moving input, displaying the virtual keyboard and not changing the cursor position displayed in the text to be edited.

6. The text editing method according to claim 1, characterized in that, When the category of the target editing function option is a function style option, the method further includes: Receiving a selection input from the user for a target function element control under the target editing function option; In the case where the selected text does not exist in the text to be edited, in response to the selection input, perform a text editing function corresponding to the target function element control on the text input after the current cursor; In the case where the selected text exists in the text to be edited, in response to the selection input, perform a text editing function corresponding to the target function element control on the selected text and the text input after the current cursor.

7. A text editing device, characterized in that, comprising: A first receiving module, configured to receive a movement input of a user to a target editing function option; A first response module, configured to determine the position of the target editing function option in the text to be edited in response to the end operation of the movement input, and determine the selected text according to the position; A display module, configured to display a first adjustment cursor and a second adjustment cursor at the start point and the end point of the selected text respectively; A second receiving module, configured to receive a movement input to the first adjustment cursor and the second adjustment cursor; A second response module, configured to adjust the selected text in response to the movement input; A processing module, configured to perform an editing process on the selected text according to the category of the target editing function option; The device further comprises: A third response module, configured to, in response to the movement input, when the target editing function option passes through the text to be edited, display a target text part as a text editing effect corresponding to the target editing function option; wherein, the target text part is a paragraph, a text line or a sentence where the position of the target editing function option is located.

8. An electronic device, characterized in that, comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, where when the program or instruction is executed by the processor, the steps of the text editing method according to any one of claims 1-6 are implemented.

9. A readable storage medium, characterized in that, a program or instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the text editing method according to any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Character translation method and device, storage medium and electronic equipment

    CN111401323A

  • Text editing method and device and electronic equipment

    CN112486377A