WO2023045923A1 - Text editing method and apparatus, and electronic device - Google Patents

Text editing method and apparatus, and electronic device Download PDF

Info

Publication number
WO2023045923A1
WO2023045923A1 PCT/CN2022/119904 CN2022119904W WO2023045923A1 WO 2023045923 A1 WO2023045923 A1 WO 2023045923A1 CN 2022119904 W CN2022119904 W CN 2022119904W WO 2023045923 A1 WO2023045923 A1 WO 2023045923A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
editing
editing function
target
input
Prior art date
Application number
PCT/CN2022/119904
Other languages
French (fr)
Chinese (zh)
Inventor
鲍阳
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2023045923A1 publication Critical patent/WO2023045923A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • the present application belongs to the technical field of communication, and in particular relates to a text editing method, device and electronic equipment.
  • the purpose of the embodiments of the present application is to provide a text editing method, device and electronic equipment, which can solve the problem of low text editing efficiency in the prior art.
  • the embodiment of the present application provides a text editing method, including:
  • Editing is performed on the selected text according to the category of the target editing function option.
  • the embodiment of the present application provides a text editing device, including:
  • the first receiving module is used to receive the user's movement input on the target editing function option
  • the first response module 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 moving input, and determine the selected text according to the position;
  • a processing module configured to edit the selected text according to the category of the target editing function option.
  • an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented .
  • the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.
  • a sixth aspect provides a computer program product, the computer program product is stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the method described in the first aspect step.
  • an electronic device configured to execute the steps of the method described in the first aspect.
  • Fig. 1 is one of flow charts of the text editing method of the embodiment of the present application.
  • Fig. 2 is one of the schematic diagrams of the text editing interface of the embodiment of the present application.
  • Fig. 3 is the second schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 4 is the third schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 5 is the fourth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 6 is the fifth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 7 is the sixth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 8 is the seventh schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 9 is the eighth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 10 is the ninth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 11 is the tenth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 12 is the eleventh schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 13 is the twelfth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 14 is the thirteenth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 15 is the fourteenth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 16 is the fifteenth schematic diagram of the text editing interface of the embodiment of the present application.
  • Fig. 17 is a structural block diagram of a text editing device according to an embodiment of the present application.
  • FIG. 18 is a structural block diagram of an electronic device according to an embodiment of the present application.
  • FIG. 19 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
  • the present application provides a text editing method, which specifically includes the following steps:
  • Step 11 receiving the user's movement input on the target editing function option
  • the target editing function option can be a specific functional element control, such as a specific font size (such as small four, initial number, 20, etc.), a specific font color (such as red, black, green, etc.), a specific font (such as italics, bold, Song, etc.), strikethrough, underline, bold, agent, etc., can also be functional style options, such as font, font size, color, alignment, list style and other major styles.
  • a specific font size such as small four, initial number, 20, etc.
  • a specific font color such as red, black, green, etc.
  • a specific font Such as italics, bold, Song, etc.
  • strikethrough underline, bold, agent, etc.
  • an editing function selection area b and a text editing area a are displayed on the convenient interface, wherein the text to be edited is displayed in the text editing area a, and the target text is displayed in the editing function selection area b.
  • Edit function options are displayed on the convenient interface, wherein the text to be edited is displayed in the text editing area a, and the target text is displayed in the editing function selection area b.
  • the movement input may include a touch operation in which the user presses and holds the icon of the target editing function option and then moves.
  • 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;
  • determining the selected text includes:
  • Step 13 Edit the selected text according to the category of the target editing function option.
  • the categories of target editing function options may include: specific functional element controls and functional style options.
  • the specific functional element controls include: such as specific font size (such as small four, first number, 20, etc.), specific font color (such as red, black, green, etc.), specific font (such as italics, bold, Song, etc.) ), strikethrough, underline, bold, etc.
  • the functional style options can include: such as font, font size, color, alignment, list style and other categories of styles.
  • the icon of the target editing function option is displayed on the text editing interface, and in the case of receiving the user's movement input to the icon of the target editing function option; in response to the movement
  • the input end operation determines the position of the target editing function option in the text to be edited, and determines the selected text according to the position, and performs editing processing on the selected text according to the category of the target editing function option.
  • the style of the text in the icon of the target editing function option is consistent with the style of the text in the text editing area.
  • the font style of the text displayed on the Font button control is the same as the body text font style of the text editing area. In this way, it is convenient for the user to know the text style of the main text through the icon of the target editing function option at a glance.
  • the above method further includes:
  • the first input includes but not limited to: input operations such as click, double click, slide or long press.
  • the target editing function option is an alignment style
  • click the alignment icon to expand and display specific alignment controls, as shown in FIG. 6, including left alignment, right alignment, center alignment, Scatter and align four control icons);
  • step 13 when the category of the target editing function option is a function element control, the above step 13 includes:
  • the user's text editing process can be simplified, the user's text editing operation can be facilitated, and the text editing efficiency can be improved.
  • the above method further includes:
  • the target text part is displayed as a text editing effect corresponding to the target editing function option; wherein, the target text part is the same as the target editing function Depending on the position of the option.
  • the target text part is the paragraph, text line or sentence where the position of the target editing function option is located.
  • the font size effect of the first paragraph is displayed as 23 font size.
  • the user can preview the text editing effect in advance during the process of moving the target editing function option, so that the user can adjust the text editing operation in time and select a suitable text editing effect.
  • step 13 when the category of the target editing function option is a function style option, step 13 includes:
  • the user's text editing process can be simplified, the user's text editing operation can be facilitated, and the text editing efficiency can be improved.
  • the above method further includes:
  • the selected text is adjusted in response to the movement input.
  • the selected text when the selected text does not meet the requirements, the selected text can be finely adjusted by moving and inputting the first adjustment cursor and the second adjustment cursor.
  • the paragraph where the cursor is located needs to have a text change animation, so that the user can adjust the selected text more intuitively.
  • a virtual keyboard in the case where a virtual keyboard is displayed on the text editing page, after the above step 11, it also includes:
  • the virtual keyboard In response to the movement input, the virtual keyboard is hidden.
  • the virtual keyboard In response to the end operation of the mobile input, display the virtual keyboard, and display a cursor after the selected text; or, in the case that the end position of the mobile input is not at the text to be edited, respond At the end of the movement input operation, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
  • 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 mobile input, the virtual keyboard is displayed, and in the A cursor is displayed after the selected text; or, in the case that 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, the virtual keyboard is displayed without changing the The position of the cursor displayed in the text to be edited can facilitate subsequent text editing operations by the user.
  • the cursor stays on the text content of the effect applied by the user, and the virtual keyboard appears; if no effect is applied to the text after moving out of the target editing function option (such as in Response area let go of the screen), after the font style selection area is closed, the virtual keyboard appears, and the cursor position remains unchanged.
  • the target editing function option such as in Response area let go of the screen
  • the above method also includes:
  • the text input after the current cursor is executed with a text editing function corresponding to the target editing function option;
  • the function of the specific text style option acts on the input content after the cursor; if there is a selection state in the text editing area a text, the function of the specific text style option is applied to the content newly input by the user after the selected text and the last text of the selected text. In this way, through various text editing operation settings, the user's text editing process can be edited, and text editing efficiency can be improved.
  • the present invention optimizes the style application process in the text editing process through the gesture operation mode on the touch screen. Move the text style or text element control to the specified paragraph in the content display area by long-pressing the movement method, and the corresponding paragraph can be automatically identified according to the click position, and the style/or text element control is added to the target paragraph. After letting go The adjustment handles appearing before and after the selected paragraph can be finely adjusted, which optimizes the tedious operation of selecting text by moving the cursor up, down, left, and right in the traditional editing method, and improves the user experience.
  • the text editing method provided in the embodiment of the present application may be executed by a text editing device, or a control module in the text editing device for executing the text editing method.
  • the text editing device executed by the text editing device is taken as an example to describe the text editing device provided in the embodiment of the present application.
  • the present application provides a text editing device 1700, including:
  • the first receiving module 1701 is configured to receive the user's movement input on the target editing function option
  • the first response module 1702 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 moving input, and determine the selected text according to the position;
  • the processing module 1703 is configured to edit the selected text according to the category of the target editing function option.
  • the first response module 1702 includes:
  • the first response submodule is configured to determine the paragraph, text line or sentence where the position is located as the selected text.
  • the device when the category of the target editing function option is a functional element control, the device further includes:
  • the first processing module is configured to perform a text editing function corresponding to the target editing function option on the selected text.
  • the processing module 1703 includes:
  • the second processing submodule is used to display a plurality of functional element controls corresponding to the target editing function option
  • a third processing submodule configured to receive user selection input on a target functional element control among the plurality of functional element controls
  • the fourth processing submodule is configured to execute the text editing function corresponding to the target function element control on the selected text in response to the selection input.
  • the device 1700 includes:
  • a display module configured to display a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text, respectively;
  • a second receiving module configured to receive a movement input for the first adjustment cursor and the second adjustment cursor
  • the second response module is configured to adjust the selected text in response to the movement input.
  • the device further includes:
  • a third response module configured to hide the virtual keyboard in response to the movement input
  • 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, at the end position of the movement input in a location other than the text to be edited In the case of the text, in response to the end operation of the movement input, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
  • the device 1700 also includes:
  • a third receiving module configured to receive user selection input on the target editing function option
  • the fifth response module is configured to execute the text corresponding to the target editing function option for the text input after the current cursor in response to the selection input when the selected text does not exist in the text to be edited Edit function;
  • the sixth response module is configured to perform editing on the selected text and the text input after the current cursor in response to the selection input when the selected text exists in the text to be edited.
  • the text editing function corresponding to the function option.
  • the icon of the target editing function option is displayed on the text editing interface, and in the case of receiving the user's movement input to the icon of the target editing function option ;
  • 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 further according to the category of the target editing function option, select the selected text Do editing.
  • the operation steps for the user to select text can be simplified, and the text operation efficiency can be improved.
  • the text editing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
  • the device may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an Ultra-Mobile Personal Computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a Personal Digital Assistant (Personal Digital Assistant).
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (TeleVision, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • PC Personal Computer
  • TV TeleVision, TV
  • teller machine or self-service machine etc.
  • the text editing device in the embodiment of the present application may be a device with an operating system.
  • the operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
  • the text editing device provided by the embodiment of the present application can realize various processes realized by the method embodiments in FIG. 1 to FIG. 16 , and details are not repeated here to avoid repetition.
  • the embodiment of the present application further provides an electronic device 1800, including a processor 1801, a memory 1802, and programs or instructions stored in the memory 1802 and operable on the processor 1801,
  • an electronic device 1800 including a processor 1801, a memory 1802, and programs or instructions stored in the memory 1802 and operable on the processor 1801,
  • the program or instruction is executed by the processor 1801
  • each process of the above-mentioned text editing method embodiment can be realized, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 19 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • 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. part.
  • the electronic device 1900 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1910 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
  • a power supply such as a battery
  • the structure of the electronic device shown in FIG. 19 does not constitute a limitation to the electronic device.
  • the electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
  • the user input unit 1907 is used to receive the user's movement input on the target editing function option
  • Processor 1910 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 moving input, and determine the selected text according to the position; according to the position of the target editing function option Category, edit the selected text.
  • 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.
  • the processor 1910 is further configured to perform a text editing function corresponding to the target editing function option on the selected text.
  • the display unit 1906 is configured to display a plurality of functional element controls corresponding to the target editing function option; the user input unit 1907 is also used to receiving a user's selection input of a target functional element control among the plurality of functional element controls; the processor 1910 is further configured to, in response to the selection input, execute the selected text corresponding to the target functional element control Text editing function.
  • the display unit 1906 is further configured to respectively display a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text;
  • the user input unit 1907 is further configured to receive movement input for the first adjustment cursor and the second adjustment cursor;
  • the processor 1910 is further configured to adjust the selected text in response to the movement input.
  • the processor 1910 is further configured to hide the virtual keyboard in response to the movement input;
  • the processor 1910 is further configured to display the virtual keyboard in response to the end operation of the movement input, and display a cursor after the selected text; In the case of the text, in response to the end operation of the movement input, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
  • the user input unit 1907 is also configured to receive user selection input on the target editing function option
  • the processor 1910 is further configured to, in the case that the selected text does not exist in the text to be edited, in response to the selection input, execute the text corresponding to the target editing function option for the text input after the current cursor Edit function;
  • the processor 1910 is further configured to, in the case that the selected text exists in the text to be edited, respond to the selection input, execute the selected text and the text input after the current cursor with the target editing The text editing function corresponding to the function option.
  • the icon of the target editing function option is displayed on the text editing interface, and in the case of receiving the user's movement input to the icon of the target editing function option; in response to the The end operation of the moving input determines the position of the target editing function option in the text to be edited, and determines the selected text 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.
  • the input unit 1904 may include a graphics processor (Graphics Processing Unit, GPU) 19041 and a microphone 19042, and the graphics processor 19041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
  • 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, or the like.
  • the user input unit 1907 includes a touch panel 19071 and other input devices 19072 . Touch panel 19071, also called touch screen.
  • the touch panel 19071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 19072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • the memory 1909 can be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 1910 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1910 .
  • the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above text editing method embodiment is realized, and the same To avoid repetition, the technical effects will not be repeated here.
  • the processor is the processor in the electronic device described in the above embodiments.
  • the readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
  • the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to realize the above text editing method embodiment Each process can achieve the same technical effect, so in order to avoid repetition, it will not be repeated here.
  • chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
  • the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
  • the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

Abstract

The present application discloses a text editing method and apparatus, and an electronic device, belonging to the technical field of communications. The text editing method comprises: receiving a movement input from a user on a target editing function option; in response to an end operation of the movement input, determining the position of the target editing function option in a text to be edited, and determining selected text according to the position; editing the selected text according to the type of the target editing function option.

Description

文字编辑方法、装置和电子设备Text editing method, device and electronic device
相关申请的交叉引用Cross References to Related Applications
本申请主张在2021年09月24日在中国提交的中国专利申请No.202111120872.8的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202111120872.8 filed in China on September 24, 2021, the entire contents of which are hereby incorporated by reference.
技术领域technical field
本申请属于通信技术领域,具体涉及一种文字编辑方法、装置和电子设备。The present application belongs to the technical field of communication, and in particular relates to a text editing method, device and electronic equipment.
背景技术Background technique
随着科技的发展,移动设备所具有的功能越来越强大,在人们的工作、生活、办公、娱乐等活动中扮演着越来越重要的角色。其中,对于很多文字编辑类的应用来说,在桌面端通过鼠标和键盘可以方便地对文本进行选择和编辑,但是在手机端只能通过手指长按光标来选取一段文本,之后再应用样式,操作过程存在定位光标容易出错,且操作较为繁琐,操作效率低的问题。With the development of science and technology, mobile devices have more and more powerful functions, and play an increasingly important role in people's work, life, office, entertainment and other activities. Among them, for many text editing applications, the text can be conveniently selected and edited through the mouse and keyboard on the desktop, but on the mobile phone, only a long press of the cursor can be used to select a piece of text, and then apply the style. In the operation process, there are problems that positioning the cursor is easy to make mistakes, and the operation is relatively cumbersome, and the operation efficiency is low.
发明内容Contents of the invention
本申请实施例的目的是提供一种文字编辑方法、装置和电子设备,能够解决现有技术中文本编辑效率低的问题。The purpose of the embodiments of the present application is to provide a text editing method, device and electronic equipment, which can solve the problem of low text editing efficiency in the prior art.
第一方面,本申请实施例提供了一种文字编辑方法,包括:In the first aspect, the embodiment of the present application provides a text editing method, including:
接收用户对目标编辑功能选项的移动输入;Receive the user's movement input on 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 determine the selected text according to the position;
根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。Editing is performed on the selected text according to the category of the target editing function option.
第二方面,本申请实施例提供了一种文字编辑装置,包括:In the second aspect, the embodiment of the present application provides a text editing device, including:
第一接收模块,用于接收用户对目标编辑功能选项的移动输入;The first receiving module is used to receive the user's movement input on the target editing function option;
第一响应模块,用于响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本;The first response module 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 moving input, and determine the selected text according to the position;
处理模块,用于根据所述目标编辑功能选项的类别,对所述被选中文本 进行编辑处理。A processing module, configured to edit the selected text according to the category of the target editing function option.
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor, and the program or instruction is The processor implements the steps of the method described in the first aspect when executed.
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or an instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented .
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In the fifth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions, so as to implement the first aspect the method described.
第六方面,提供了一种计算机程序产品,所述计算机程序产品被存储在非易失的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述的方法的步骤。A sixth aspect provides a computer program product, the computer program product is stored in a non-volatile storage medium, and the computer program product is executed by at least one processor to implement the method described in the first aspect step.
第七方面,提供了一种电子设备,被配置为执行如第一方面所述的方法的步骤。In a seventh aspect, there is provided an electronic device configured to execute the steps of the method described in the first aspect.
在本申请实施例中,在进行文本编辑时,通过接收用户对目标编辑功能选项的移动输入;响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本,进一步根据目标编辑功能选项的类别,对被选中文本进行编辑处理。如此,能够简化用户选择文本的操作步骤,提高文本操作效率。In the embodiment of the present application, when editing text, by receiving the user's movement input on the target editing function option; in response to the end operation of the movement input, determining the position of the target editing function option in the text to be edited, The selected text is determined according to the position, and the selected text is further edited 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.
附图说明Description of drawings
图1是本申请实施例的文字编辑方法的流程图之一;Fig. 1 is one of flow charts of the text editing method of the embodiment of the present application;
图2是本申请实施例的文字编辑界面示意图之一;Fig. 2 is one of the schematic diagrams of the text editing interface of the embodiment of the present application;
图3是本申请实施例的文字编辑界面示意图之二;Fig. 3 is the second schematic diagram of the text editing interface of the embodiment of the present application;
图4是本申请实施例的文字编辑界面示意图之三;Fig. 4 is the third schematic diagram of the text editing interface of the embodiment of the present application;
图5是本申请实施例的文字编辑界面示意图之四;Fig. 5 is the fourth schematic diagram of the text editing interface of the embodiment of the present application;
图6是本申请实施例的文字编辑界面示意图之五;Fig. 6 is the fifth schematic diagram of the text editing interface of the embodiment of the present application;
图7是本申请实施例的文字编辑界面示意图之六;Fig. 7 is the sixth schematic diagram of the text editing interface of the embodiment of the present application;
图8是本申请实施例的文字编辑界面示意图之七;Fig. 8 is the seventh schematic diagram of the text editing interface of the embodiment of the present application;
图9是本申请实施例的文字编辑界面示意图之八;Fig. 9 is the eighth schematic diagram of the text editing interface of the embodiment of the present application;
图10是本申请实施例的文字编辑界面示意图之九;Fig. 10 is the ninth schematic diagram of the text editing interface of the embodiment of the present application;
图11是本申请实施例的文字编辑界面示意图之十;Fig. 11 is the tenth schematic diagram of the text editing interface of the embodiment of the present application;
图12是本申请实施例的文字编辑界面示意图之十一;Fig. 12 is the eleventh schematic diagram of the text editing interface of the embodiment of the present application;
图13是本申请实施例的文字编辑界面示意图之十二;Fig. 13 is the twelfth schematic diagram of the text editing interface of the embodiment of the present application;
图14是本申请实施例的文字编辑界面示意图之十三;Fig. 14 is the thirteenth schematic diagram of the text editing interface of the embodiment of the present application;
图15是本申请实施例的文字编辑界面示意图之十四;Fig. 15 is the fourteenth schematic diagram of the text editing interface of the embodiment of the present application;
图16是本申请实施例的文字编辑界面示意图之十五;Fig. 16 is the fifteenth schematic diagram of the text editing interface of the embodiment of the present application;
图17是本申请实施例的文字编辑装置的结构框图;Fig. 17 is a structural block diagram of a text editing device according to an embodiment of the present application;
图18是本申请实施例的电子设备的结构框图;FIG. 18 is a structural block diagram of an electronic device according to an embodiment of the present application;
图19是本申请实施例的电子设备的硬件结构示意图。FIG. 19 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will clearly describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application belong to the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that references to "first," "second," etc. distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的文字编辑方法、装置及电子设备进行详细地说明。The text editing method, device and electronic equipment provided by the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
如图1所示,本申请提供一种文字编辑方法,具体包括以下步骤:As shown in Figure 1, the present application provides a text editing method, which specifically includes the following steps:
步骤11,接收用户对目标编辑功能选项的移动输入; Step 11, receiving the user's movement input on the target editing function option;
该步骤中,目标编辑功能选项可以为具体的功能元素控件,如具体的字号(如小四、初号、20等)、具体的字体颜色(如红色、黑色、绿色等)、具体的字体(如楷体、黑体、宋体等)、删除线、下划线、加粗、代办等,也可以为功能样式选项,如字体、字号、颜色、对齐、列表样式等大类样式。In this step, the target editing function option can be a specific functional element control, such as a specific font size (such as small four, initial number, 20, etc.), a specific font color (such as red, black, green, etc.), a specific font ( Such as italics, bold, Song, etc.), strikethrough, underline, bold, agent, etc., can also be functional style options, such as font, font size, color, alignment, list style and other major styles.
示例性的,如图2至16所示,在便捷界面上显示有编辑功能选择区域b,以及文本编辑区域a,其中,文本编辑区域a中显示待编辑文本,编辑功能选择区域b中显示目标编辑功能选项。Exemplarily, as shown in Figures 2 to 16, an editing function selection area b and a text editing area a are displayed on the convenient interface, wherein the text to be edited is displayed in the text editing area a, and the target text is displayed in the editing function selection area b. Edit function options.
其中,移动输入可以包括用户长按目标编辑功能选项的图标并移动的触控操作。Wherein, the movement input may include a touch operation in which the user presses and holds the icon of the target editing function option and then moves.
步骤12,响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本; 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;
其中,步骤12中根据所述位置,确定被选中文本包括:Wherein, according to the position in step 12, determining the selected text includes:
将所述位置所在的段落、文本行或句子,确定为被选中文本。Determine the paragraph, text line or sentence where the position is located as the selected text.
示例性的,如图8所示,以功能元素控件为具体字号控件为示例,当用户移动“23”字号控件至待编辑文本处的第二段落时,将第二段落作为被选中文本。Exemplarily, as shown in FIG. 8 , taking the functional 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, the second paragraph is taken as the selected text.
示例性的,如图12所示,以功能元素控件为具体模板控件为示例,当用户移动如图12所示的气泡模板控件至待编辑文本处的第一段落时,将第一段落作为被选中文本。Exemplarily, as shown in Figure 12, taking the functional element control as an example of a specific template control, when the user moves the bubble template control as shown in Figure 12 to the first paragraph of the text to be edited, the first paragraph is used as the selected text .
步骤13,根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。Step 13: Edit the selected text according to the category of the target editing function option.
该步骤中,目标编辑功能选项的类别可以包括:具体的功能元素控件和功能样式选项。其中,具体的功能元素控件包括:如具体的字号(如小四、初号、20等)、具体的字体颜色(如红色、黑色、绿色等)、具体的字体(如楷体、黑体、宋体等)、删除线、下划线、加粗、代办等,功能样式选项可以包括:如字体、字号、颜色、对齐、列表样式等大类样式。In this step, the categories of target editing function options may include: specific functional element controls and functional style options. Among them, the specific functional element controls include: such as specific font size (such as small four, first number, 20, etc.), specific font color (such as red, black, green, etc.), specific font (such as italics, bold, Song, etc.) ), strikethrough, underline, bold, etc., the functional style options can include: such as font, font size, color, alignment, list style and other categories of styles.
上述实施例中,当用户在文本编辑界面进行文本编辑时,在文本编辑界面显示目标编辑功能选项的图标,在接收用户对目标编辑功能选项的图标的移动输入的情况下;响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本,根据目标编辑功能选项的类别,对所述被选中文本进行编辑处理。如此,能够简化用户选择文本的操作步骤,提高文本操作效率。In the above embodiment, when the user edits text on the text editing interface, the icon of the target editing function option is displayed on the text editing interface, and in the case of receiving the user's movement input to the icon of the target editing function option; in response to the movement The input end operation determines the position of the target editing function option in the text to be edited, and determines the selected text according to the position, and performs 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.
在一实施例中,所述目标编辑功能选项的图标中的文字的样式与文本编辑区域的正文文字样式一致。In an embodiment, the style of the text in the icon of the target editing function option is consistent with the style of the text in the text editing area.
例如,字体按钮控件上显示的文字的字体样式与文本编辑区域的正文字体样式相同。这样,便于用于一目了然的通过目标编辑功能选项的图标获知正文的文字样式。For example, the font style of the text displayed on the Font button control is the same as the body text font style of the text editing area. In this way, it is convenient for the user to know the text style of the main text through the icon of the target editing function option at a glance.
在一实施例中,在在所述目标编辑功能选项为功能样式选项的情况下,上述方法还包括:In an embodiment, when the target editing function option is a function style option, the above method further includes:
接收用户对所述目标编辑功能选项的第一输入;receiving a user's first input on the target editing function option;
响应于所述第一输入,展开显示所述目标编辑功能选项对应的多个功能元素控件。In response to the first input, expand and display a plurality of functional element controls corresponding to the target editing function option.
其中,所述第一输入包括但不限于:点击、双击、滑动或长按等输入操作。Wherein, the first input includes but not limited to: input operations such as click, double click, slide or long press.
示例性的,如图3所示,在所述目标编辑功能选项为字号样式时,点击字号样式图标“A”,则展开显示为如图4所示出的具体的字号控件;Exemplarily, as shown in FIG. 3, when the target editing function option is a font size style, click the font size style icon "A", and then the specific font size control as shown in FIG. 4 will be expanded and displayed;
示例性的,如图5所示,在所述目标编辑功能选项为对齐样式时,点击对齐图标,则展开显示具体的对齐控件,如图6所示,包括左对齐、右对齐、居中对齐、分散对齐四个控件图标);Exemplarily, as shown in FIG. 5, when the target editing function option is an alignment style, click the alignment icon to expand and display specific alignment controls, as shown in FIG. 6, including left alignment, right alignment, center alignment, Scatter and align four control icons);
进一步地,在一实施例中,在所述目标编辑功能选项的类别为功能元素控件的情况下,上述步骤13包括:Further, in an embodiment, when the category of the target editing function option is a function element control, the above step 13 includes:
将所述被选中文本执行与所述目标编辑功能选项对应的文字编辑功能。Execute the text editing function corresponding to the target editing function option on the selected text.
示例性的,如图7至9所示,以功能元素控件为具体字号控件为示例, 当用户移动“23”字号控件至待编辑文本处的第二段落时(如图8,虚线箭头示出有移动轨迹),第二段落处的文字字号效果显示为23号字体大小;当移动“23”字号控件至待编辑文本处的第二段落并松手后,第二段文字的字体大小更新为23号字号。Exemplarily, as shown in Figures 7 to 9, taking the functional element control as an example of a specific font size control, when the user moves the "23" font size control to the second paragraph of the text to be edited (as shown in Figure 8, the dotted arrow There is a moving track), the font size effect of the text at the second paragraph is displayed as a font size of 23; when the "23" font size control is moved to the second paragraph of the text to be edited and let go, the font size of the second paragraph is updated to 23 font size.
示例性的,如图10至12所示,以功能元素控件为具体气泡模板控件为示例,当用户手指移动如图11的气泡模板控件至待编辑文本处的第一段落时(如图12,虚线箭头示出有移动轨迹),第一段落文字为被选中文本,第一段落处的文字效果显示为如图12所示的气泡效果。Exemplarily, as shown in Figures 10 to 12, taking the functional element control as a specific bubble template control as an example, when the user moves the bubble template control as shown in Figure 11 to the first paragraph of the text to be edited (as shown in Figure 12, the dotted line The arrow shows a moving track), the text in the first paragraph is the selected text, and the text effect at the first paragraph is displayed as a bubble effect as shown in Figure 12.
通过上述实施例,能够简化用户的文字编辑过程,便捷用户的文字编辑操作,提高文字编辑效率。Through the foregoing embodiments, the user's text editing process can be simplified, the user's text editing operation can be facilitated, and the text editing efficiency can be improved.
其中,在一具体实施例中,所述接收用户对目标编辑功能选项的移动输入之后,上述方法还包括:Wherein, in a specific embodiment, after receiving the user's movement input on the target editing function option, the above method further includes:
响应于所述移动输入,在所述目标编辑功能选项经过待编辑文本时,将目标文本部分显示为与所述目标编辑功能选项对应的文字编辑效果;其中,所述目标文本部分与目标编辑功能选项的位置有关。In response to the movement input, when the target editing function option passes through the text to be edited, the target text part is displayed as a text editing effect corresponding to the target editing function option; wherein, the target text part is the same as the target editing function Depending on the position of the option.
如,目标文本部分为目标编辑功能选项的位置所在的段落、文本行或句子。For example, the target text part is the paragraph, text line or sentence where the position of the target editing function option is located.
示例性的,在移动“23”字号控件的过程中,当用户移动“23”字号控件至待编辑文本处的某一段落时(如第一段落)时,第一段落处的文字字号效果显示为23号字体大小。这样,能够使用户在移动目标编辑功能选项的过程中,提前预览文字编辑效果,以便用户及时做调整文字编辑操作,选择合适的文字编辑效果。Exemplarily, in the process of moving the "23" font size control, when the user moves the "23" font size control to a certain paragraph (such as the first paragraph) of the text to be edited, the font size effect of the first paragraph is displayed as 23 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 that the user can adjust the text editing operation in time and select a suitable text editing effect.
进一步地,在一实施例中,在所述目标编辑功能选项的类别为功能样式选项的情况下,步骤13,包括:Further, in an embodiment, when the category of the target editing function option is a function style option, step 13 includes:
显示所述目标编辑功能选项对应的多个功能元素控件;Displaying multiple functional element controls corresponding to the target editing function option;
接收用户对所述多个功能元素控件中的目标功能元素控件的选择输入;receiving a user's selection input of a target functional element control among the plurality of functional element controls;
响应于所述选择输入,将所述被选中文本执行与所述目标功能元素控件 对应的文字编辑功能。In response to the selection input, execute the text editing function corresponding to the target function element control on the selected text.
示例性的,如图13至16所示,以功能样式选项为字号为示例(如图13中用户点击的“A”图标),当用户移动字号“A”控件至待编辑文本处的第二段落时(如图14,虚线箭头示出有移动轨迹),第二段落处的文字显示为被选中状态;当移动“A”字号控件至待编辑文本处的第二段落并松手后,显示功能元素控件选择区域b2(如图14和15所示);进一步,接收用户对功能元素控件选择区域b2中的目标功能元素控件(“23”字号)的点击输入,将第二段文字的字体大小更新为23号字号(如图16所示)。Exemplarily, as shown in Figures 13 to 16, taking the function style option as the font size as an example (the "A" icon clicked by the user in Figure 13), when the user moves the font size "A" control to the second When entering a paragraph (as shown in Figure 14, the dotted arrow shows the moving track), the text at the second paragraph is displayed as being selected; when the "A" font size control is moved to the second paragraph at the text to be edited and let go, the display function Element control selection area b2 (as shown in Figures 14 and 15); further, receiving the user's click input on the target functional element control ("23" font size) in the functional element control selection area b2, and changing the font size of the second paragraph of text to Update the font size to 23 (as shown in Figure 16).
通过上述实施例,能够简化用户的文字编辑过程,便捷用户的文字编辑操作,提高文字编辑效率。Through the foregoing embodiments, the user's text editing process can be simplified, the user's text editing operation can be facilitated, and the text editing efficiency can be improved.
在一实施例中,在上述步骤12之后,上述方法还包括:In one embodiment, after the above step 12, the above method further includes:
在所述被选中文本的起始点和结束点分别显示第一调节光标和第二调节光标;Displaying a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text, respectively;
接收对所述第一调节光标和所述第二调节光标的移动输入;receiving movement input for the first adjustment cursor and the second adjustment cursor;
响应于所述移动输入,调整所述被选中文本。The selected text is adjusted in response to the movement input.
该实施例中,在被选中文字不满足要求时,通过对第一调节光标和所述第二调节光标的移动输入,能够精细调节被选中文字。其中,在移动过程中光标所在的段落需有文本变化动效,以使用户更直观的调整被选中文字。In this embodiment, when the selected text does not meet the requirements, the selected text can be finely adjusted by moving and inputting the first adjustment cursor and the second adjustment cursor. Among them, during the moving process, the paragraph where the cursor is located needs to have a text change animation, so that the user can adjust the selected text more intuitively.
在一实施例中,在文字编辑页面显示有虚拟键盘的情况下,上述步骤11之后,还包括:In one embodiment, in the case where a virtual keyboard is displayed on the text editing page, after the above step 11, it also includes:
响应于所述移动输入,隐藏所述虚拟键盘。In response to the movement input, the virtual keyboard is hidden.
响应于所述移动输入的结束操作,显示所述虚拟键盘,且在所述被选中文本之后显示光标;或者,在所述移动输入的结束位置在非所述待编辑文本处的情况下,响应于所述移动输入的结束操作,显示所述虚拟键盘,且不改变所述待编辑文本中显示的光标位置。In response to the end operation of the mobile input, display the virtual keyboard, and display a cursor after the selected text; or, in the case that the end position of the mobile input is not at the text to be edited, respond At the end of the movement input operation, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
该实施例中通过隐藏虚拟键盘,能够增加可编辑的文本区域,也能够避免虚拟键盘对编辑操作过程有干扰;通过响应于所述移动输入的结束操作, 显示所述虚拟键盘,且在所述被选中文本之后显示光标;或者,在所述移动输入的结束位置在非所述待编辑文本处的情况下,响应于所述移动输入的结束操作,显示所述虚拟键盘,且不改变所述待编辑文本中显示的光标位置能便于用户后续的文本编辑操作。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 mobile input, the virtual keyboard is displayed, and in the A cursor is displayed after the selected text; or, in the case that 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, the virtual keyboard is displayed without changing the The position of the cursor displayed in the text to be edited can facilitate subsequent text editing operations by the user.
进一步的,为了便于用户的编辑操作,当用户完成移动输入后,光标停留在用户施加效果的文本内容后,虚拟键盘出现;若移动出目标编辑功能选项后未对文本施加效果(如在非文本响应区松手离开屏幕),在字体样式选择区收起后,虚拟键盘出现,光标位置始终不变。Further, in order to facilitate the user's editing operation, after the user completes the movement input, the cursor stays on the text content of the effect applied by the user, and the virtual keyboard appears; if no effect is applied to the text after moving out of the target editing function option (such as in Response area let go of the screen), after the font style selection area is closed, the virtual keyboard appears, and the cursor position remains unchanged.
在一实施例中,上述方法还包括:In one embodiment, the above method also includes:
接收用户对所述目标编辑功能选项的选择输入;receiving a user's selection input of the target editing function option;
在所述待编辑文本中不存在所述被选中文本的情况下,响应于所述选择输入,将当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能;In the case that the selected text does not exist in the text to be edited, in response to the selection input, the text input after the current cursor is executed with a text editing function corresponding to the target editing function option;
在所述待编辑文本中存在所述被选中文本的情况下,响应于所述选择输入,将所述被选中文本和当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能。In the case where the selected text exists in the text to be edited, in response to the selection input, execute the text editing function corresponding to the target editing function option on the selected text and the text input after the current cursor .
该实施例中,如单击具体文本样式选项时,如文本编辑区域a中无选中的文字,则具体文本样式选项所的功能作用于光标后输入的内容;如果文本编辑区域a中有选择状态的文字,则具体文本样式选项所的功能作用在选中文字和选中文字的最后一个文字之后,用户新输入的内容。如此,通过多样化的文字编辑操作设置,能够编辑用户文字编辑过程,提高文字编辑效率。In this embodiment, when clicking on the specific text style option, if there is no selected text in the text editing area a, then the function of the specific text style option acts on the input content after the cursor; if there is a selection state in the text editing area a text, the function of the specific text style option is applied to the content newly input by the user after the selected text and the last text of the selected text. In this way, through various text editing operation settings, the user's text editing process can be edited, and text editing efficiency can be improved.
上述方案中,本发明通过触屏上的手势操作方式,将文字编辑过程中的样式应用过程进行了优化。通过长按移动方式,将文字样式或文本元素控件移动到内容显示区的指定段落上,能够自动根据点击位置识别出对应的段落,将样式/或文本元素控件添加到在目标段落上,松手后在选中的段落前后出现调节手柄可以精细调节,优化了传统编辑方式需要通过上下左右移动光标来选择文本的繁琐操作,提升了用户的体验。In the above solution, the present invention optimizes the style application process in the text editing process through the gesture operation mode on the touch screen. Move the text style or text element control to the specified paragraph in the content display area by long-pressing the movement method, and the corresponding paragraph can be automatically identified according to the click position, and the style/or text element control is added to the target paragraph. After letting go The adjustment handles appearing before and after the selected paragraph can be finely adjusted, which optimizes the tedious operation of selecting text by moving the cursor up, down, left, and right in the traditional editing method, and improves the user experience.
需要说明的是,本申请实施例提供的文字编辑方法,执行主体可以为文字编辑装置,或者该文字编辑装置中的用于执行文字编辑方法的控制模块。本申请实施例中以文字编辑装置执行文字编辑方法为例,说明本申请实施例提供的文字编辑装置。It should be noted that, the text editing method provided in the embodiment of the present application may be executed by a text editing device, or a control module in the text editing device for executing the text editing method. In the embodiment of the present application, the text editing device executed by the text editing device is taken as an example to describe the text editing device provided in the embodiment of the present application.
如17所示,本申请提供一种文字编辑装置1700,包括:As shown in 17, the present application provides a text editing device 1700, including:
第一接收模块1701,用于接收用户对目标编辑功能选项的移动输入;The first receiving module 1701 is configured to receive the user's movement input on the target editing function option;
第一响应模块1702,用于响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本;The first response module 1702 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 moving input, and determine the selected text according to the position;
处理模块1703,用于根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。The processing module 1703 is configured to edit the selected text according to the category of the target editing function option.
可选的,所述第一响应模块1702包括:Optionally, the first response module 1702 includes:
第一响应子模块,用于将所述位置所在的段落、文本行或句子,确定为被选中文本。The first response submodule is configured to determine the paragraph, text line or sentence where the position is located as the selected text.
可选的,在所述目标编辑功能选项的类别为功能元素控件的情况下,所述装置还包括:Optionally, when the category of the target editing function option is a functional element control, the device further includes:
第一处理模块,用于将所述被选中文本执行与所述目标编辑功能选项对应的文字编辑功能。The first processing module is configured to perform a text editing function corresponding to the target editing function option on the selected text.
可选的,在所述目标编辑功能选项的类别为功能样式选项的情况下,所述处理模块1703包括:Optionally, when the category of the target editing function option is a function style option, the processing module 1703 includes:
第二处理子模块,用于显示所述目标编辑功能选项对应的多个功能元素控件;The second processing submodule is used to display a plurality of functional element controls corresponding to the target editing function option;
第三处理子模块,用于接收用户对所述多个功能元素控件中的目标功能元素控件的选择输入;A third processing submodule, configured to receive user selection input on a target functional element control among the plurality of functional element controls;
第四处理子模块,用于响应于所述选择输入,将所述被选中文本执行与所述目标功能元素控件对应的文字编辑功能。The fourth processing submodule is configured to execute the text editing function corresponding to the target function element control on the selected text in response to the selection input.
可选的,所述装置1700包括:Optionally, the device 1700 includes:
显示模块,用于在所述被选中文本的起始点和结束点分别显示第一调节 光标和第二调节光标;A display module, configured to display a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text, respectively;
第二接收模块,用于接收对所述第一调节光标和所述第二调节光标的移动输入;A second receiving module, configured to receive a movement input for the first adjustment cursor and the second adjustment cursor;
第二响应模块,用于响应于所述移动输入,调整所述被选中文本。The second response module is configured to adjust the selected text in response to the movement input.
可选的,在文字编辑页面显示有虚拟键盘的情况下,所述装置还包括:Optionally, in the case where a virtual keyboard is displayed on the text editing page, the device further includes:
第三响应模块,用于响应于所述移动输入,隐藏所述虚拟键盘;A third response module, configured to hide the virtual keyboard in response to the movement input;
第四响应模块,用于响应于所述移动输入的结束操作,显示所述虚拟键盘,且在所述被选中文本之后显示光标;或者,在所述移动输入的结束位置在非所述待编辑文本处的情况下,响应于所述移动输入的结束操作,显示所述虚拟键盘,且不改变所述待编辑文本中显示的光标位置。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, at the end position of the movement input in a location other than the text to be edited In the case of the text, in response to the end operation of the movement input, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
可选的,所述装置1700还包括:Optionally, the device 1700 also includes:
第三接收模块,用于接收用户对所述目标编辑功能选项的选择输入;A third receiving module, configured to receive user selection input on the target editing function option;
第五响应模块,用于在所述待编辑文本中不存在所述被选中文本的情况下,响应于所述选择输入,将当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能;The fifth response module is configured to execute the text corresponding to the target editing function option for the text input after the current cursor in response to the selection input when the selected text does not exist in the text to be edited Edit function;
第六响应模块,用于在所述待编辑文本中存在所述被选中文本的情况下,响应于所述选择输入,将所述被选中文本和当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能。The sixth response module is configured to perform editing on the selected text and the text input after the current cursor in response to the selection input when the selected text exists in the text to be edited. The text editing function corresponding to the function option.
通过本申请实施例中的文字编辑装置,当用户在文本编辑界面进行文本编辑时,在文本编辑界面显示目标编辑功能选项的图标,在接收用户对目标编辑功能选项的图标的移动输入的情况下;响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本,进一步根据目标编辑功能选项的类别,对被选中文本进行编辑处理。如此,能够简化用户选择文本的操作步骤,提高文本操作效率。Through the text editing device in the embodiment of the present application, 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, and in the case of receiving the user's movement input to the icon of the target editing function option ; 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 according to the position, determine the selected text, and further according to the category of the target editing function option, select the selected text Do editing. In this way, the operation steps for the user to select text can be simplified, and the text operation efficiency can be improved.
本申请实施例中的文字编辑装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、 车载电子设备、可穿戴设备、超级移动个人计算机(Ultra-Mobile Personal Computer,UMPC)、上网本或者个人数字助理(Personal Digital Assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(Personal Computer,PC)、电视机(TeleVision,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The text editing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplary, the mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device, an Ultra-Mobile Personal Computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a Personal Digital Assistant (Personal Digital Assistant). Assistant, PDA), etc., non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (Personal Computer, PC), television (TeleVision, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
本申请实施例中的文字编辑装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为IOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The text editing device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
本申请实施例提供的文字编辑装置能够实现图1至图16的方法实施例实现的各个过程,为避免重复,这里不再赘述。The text editing device provided by the embodiment of the present application can realize various processes realized by the method embodiments in FIG. 1 to FIG. 16 , and details are not repeated here to avoid repetition.
可选地,如图18所示,本申请实施例还提供一种电子设备1800,包括处理器1801,存储器1802,存储在存储器1802上并可在所述处理器1801上运行的程序或指令,该程序或指令被处理器1801执行时实现上述文字编辑方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 18 , the embodiment of the present application further provides an electronic device 1800, including a processor 1801, a memory 1802, and programs or instructions stored in the memory 1802 and operable on the processor 1801, When the program or instruction is executed by the processor 1801, each process of the above-mentioned text editing method embodiment can be realized, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。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.
图19为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 19 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1900包括但不限于:射频单元1901、网络模块1902、音频输出单元1903、输入单元1904、传感器1905、显示单元1906、用户输入单元1907、接口单元1908、存储器1909、以及处理器1910等部件。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. part.
本领域技术人员可以理解,电子设备1900还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1910逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图19中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1900 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 1910 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 19 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .
其中,用户输入单元1907,用于接收用户对目标编辑功能选项的移动输入;Wherein, the user input unit 1907 is used to receive the user's movement input on the target editing function option;
处理器1910,用于响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本;根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。 Processor 1910, 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 moving input, and determine the selected text according to the position; according to the position of the target editing function option Category, edit the selected text.
可选地,处理器1910在根据所述位置,确定被选中文本时,具体用于将所述位置所在的段落、文本行或句子,确定为被选中文本。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.
可选地,在所述目标编辑功能选项的类别为功能元素控件的情况下,处理器1910,还用于将所述被选中文本执行与所述目标编辑功能选项对应的文字编辑功能。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.
可选地,在所述目标编辑功能选项的类别为功能样式选项的情况下,显示单元1906,用于显示所述目标编辑功能选项对应的多个功能元素控件;用户输入单元1907,还用于接收用户对所述多个功能元素控件中的目标功能元素控件的选择输入;处理器1910,还用于响应于所述选择输入,将所述被选中文本执行与所述目标功能元素控件对应的文字编辑功能。Optionally, when the category of the target editing function option is a function style option, the display unit 1906 is configured to display a plurality of functional element controls corresponding to the target editing function option; the user input unit 1907 is also used to receiving a user's selection input of a target functional element control among the plurality of functional element controls; the processor 1910 is further configured to, in response to the selection input, execute the selected text corresponding to the target functional element control Text editing function.
显示单元1906,还用于在所述被选中文本的起始点和结束点分别显示第一调节光标和第二调节光标;The display unit 1906 is further configured to respectively display a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text;
用户输入单元1907,还用于接收对所述第一调节光标和所述第二调节光标的移动输入;The user input unit 1907 is further configured to receive movement input for the first adjustment cursor and the second adjustment cursor;
处理器1910,还用于响应于所述移动输入,调整所述被选中文本。The processor 1910 is further configured to adjust the selected text in response to the movement input.
可选地,在文字编辑页面显示有虚拟键盘的情况下,处理器1910,还用于响应于所述移动输入,隐藏所述虚拟键盘;Optionally, when a virtual keyboard is displayed on the text editing page, the processor 1910 is further configured to hide the virtual keyboard in response to the movement input;
处理器1910,还用于响应于所述移动输入的结束操作,显示所述虚拟键盘,且在所述被选中文本之后显示光标;或者,在所述移动输入的结束位置在非所述待编辑文本处的情况下,响应于所述移动输入的结束操作,显示所述虚拟键盘,且不改变所述待编辑文本中显示的光标位置。The processor 1910 is further configured to display the virtual keyboard in response to the end operation of the movement input, and display a cursor after the selected text; In the case of the text, in response to the end operation of the movement input, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
可选地,用户输入单元1907,还用于接收用户对所述目标编辑功能选项的选择输入;Optionally, the user input unit 1907 is also configured to receive user selection input on the target editing function option;
处理器1910,还用于在所述待编辑文本中不存在所述被选中文本的情况下,响应于所述选择输入,将当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能;The processor 1910 is further configured to, in the case that the selected text does not exist in the text to be edited, in response to the selection input, execute the text corresponding to the target editing function option for the text input after the current cursor Edit function;
处理器1910,还用于在所述待编辑文本中存在所述被选中文本的情况下,响应于所述选择输入,将所述被选中文本和当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能。The processor 1910 is further configured to, in the case that the selected text exists in the text to be edited, respond to the selection input, execute the selected text and the text input after the current cursor with the target editing The text editing function corresponding to the function option.
本申请提供的电子设备,当用户在文本编辑界面进行文本编辑时,在文本编辑界面显示目标编辑功能选项的图标,在接收用户对目标编辑功能选项的图标的移动输入的情况下;响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本。如此,能够简化用户选择文本的操作步骤,提高文本操作效率。For the electronic device provided by the present application, 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, and in the case of receiving the user's movement input to the icon of the target editing function option; in response to the The end operation of the moving input determines the position of the target editing function option in the text to be edited, and determines the selected text 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.
应理解的是,本申请实施例中,输入单元1904可以包括图形处理器(Graphics Processing Unit,GPU)19041和麦克风19042,图形处理器19041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1906可包括显示面板19061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板19061。用户输入单元1907包括触控面板19071以及其他输入设备19072。触控面板19071,也称为触摸屏。触控面板19071可包括触摸检测装置和触摸控制器两个部分。其他输入设备19072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1909可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器1910可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1910中。It should be understood that, in this embodiment of the present application, the input unit 1904 may include a graphics processor (Graphics Processing Unit, GPU) 19041 and a microphone 19042, and the graphics processor 19041 is used for the image capture device ( Such as the image data of the still picture or video obtained by the camera) for processing. 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, or the like. The user input unit 1907 includes a touch panel 19071 and other input devices 19072 . Touch panel 19071, also called touch screen. The touch panel 19071 may include two parts, a touch detection device and a touch controller. Other input devices 19072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here. The memory 1909 can be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 1910 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, and the modem processor mainly processes wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1910 .
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述文字编辑方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above text editing method embodiment is realized, and the same To avoid repetition, the technical effects will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer readable storage medium, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述文字编辑方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to realize the above text editing method embodiment Each process can achieve the same technical effect, so in order to avoid repetition, it will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通 过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器或者网络设备等)执行本申请各个实施例所述的方法。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-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of computer software products, which are stored in a storage medium (such as ROM/RAM, magnetic disk, etc.) , optical disc), including several instructions to enable 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.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.

Claims (13)

  1. 一种文字编辑方法,包括:A text editing method, comprising:
    接收用户对目标编辑功能选项的移动输入;Receive the user's movement input on 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 determine the selected text according to the position;
    根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。Editing is performed on the selected text according to the category of the target editing function option.
  2. 根据权利要求1所述的文字编辑方法,其中,所述根据所述位置,确定被选中文本包括:The text editing method according to claim 1, wherein said determining the selected text according to said position comprises:
    将所述位置所在的段落、文本行或句子,确定为被选中文本。Determine the paragraph, text line or sentence where the position is located as the selected text.
  3. 根据权利要求1所述的文字编辑方法,其中,在所述目标编辑功能选项的类别为功能元素控件的情况下,所述根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理包括:The text editing method according to claim 1, wherein when the category of the target editing function option is a function element control, the selected text is edited according to the category of the target editing function option Processing includes:
    将所述被选中文本执行与所述目标编辑功能选项对应的文字编辑功能。Execute the text editing function corresponding to the target editing function option on the selected text.
  4. 根据权利要求1所述的文字编辑方法,其中,在所述目标编辑功能选项的类别为功能样式选项的情况下,所述根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理包括:The text editing method according to claim 1, wherein, when the category of the target editing function option is a function style option, the selected text is edited according to the category of the target editing function option Processing includes:
    显示所述目标编辑功能选项对应的多个功能元素控件;Displaying multiple functional element controls corresponding to the target editing function option;
    接收用户对所述多个功能元素控件中的目标功能元素控件的选择输入;receiving a user's selection input of a target functional element control among the plurality of functional element controls;
    响应于所述选择输入,将所述被选中文本执行与所述目标功能元素控件对应的文字编辑功能。In response to the selection input, execute the text editing function corresponding to the target function element control on the selected text.
  5. 根据权利要求1所述的文字编辑方法,其中,所述根据所述位置,确定被选中文本之后,所述方法还包括:The text editing method according to claim 1, wherein, after determining the selected text according to the position, the method further comprises:
    在所述被选中文本的起始点和结束点分别显示第一调节光标和第二调节光标;Displaying a first adjustment cursor and a second adjustment cursor at the start point and end point of the selected text, respectively;
    接收对所述第一调节光标或所述第二调节光标的移动输入;receiving a movement input of the first adjustment cursor or the second adjustment cursor;
    响应于所述移动输入,调整所述被选中文本。The selected text is adjusted in response to the movement input.
  6. 根据权利要求1所述的文字编辑方法,其中,在文字编辑页面显示有虚拟键盘的情况下,所述接收用户对目标编辑功能选项的移动输入之后,所 述方法还包括:The text editing method according to claim 1, wherein, in the case where a virtual keyboard is displayed on the text editing page, after receiving the user's movement input to the target editing function option, the method further includes:
    响应于所述移动输入,隐藏所述虚拟键盘;hiding the virtual keyboard in response to the movement input;
    响应于所述移动输入的结束操作,显示所述虚拟键盘,且在所述被选中文本之后显示光标;或者,在所述移动输入的结束位置在非所述待编辑文本处的情况下,响应于所述移动输入的结束操作,显示所述虚拟键盘,且不改变所述待编辑文本中显示的光标位置。In response to the end operation of the mobile input, display the virtual keyboard, and display a cursor after the selected text; or, in the case that the end position of the mobile input is not at the text to be edited, respond At the end of the movement input operation, the virtual keyboard is displayed without changing the position of the cursor displayed in the text to be edited.
  7. 根据权利要求1所述的文字编辑方法,其中,所述方法还包括:The text editing method according to claim 1, wherein said method further comprises:
    接收用户对所述目标编辑功能选项的选择输入;receiving a user's selection input of the target editing function option;
    在所述待编辑文本中不存在所述被选中文本的情况下,响应于所述选择输入,将当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能;In the case that the selected text does not exist in the text to be edited, in response to the selection input, the text input after the current cursor is executed with a text editing function corresponding to the target editing function option;
    在所述待编辑文本中存在所述被选中文本的情况下,响应于所述选择输入,将所述被选中文本和当前光标之后输入的文字执行与所述目标编辑功能选项对应的文字编辑功能。In the case where the selected text exists in the text to be edited, in response to the selection input, execute the text editing function corresponding to the target editing function option on the selected text and the text input after the current cursor .
  8. 一种文字编辑装置,包括:A text editing device, comprising:
    第一接收模块,用于接收用户对目标编辑功能选项的移动输入;The first receiving module is used to receive the user's movement input on the target editing function option;
    第一响应模块,用于响应于所述移动输入的结束操作,确定所述目标编辑功能选项在待编辑文本中的位置,并根据所述位置,确定被选中文本;The first response module 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 moving input, and determine the selected text according to the position;
    处理模块,用于根据所述目标编辑功能选项的类别,对所述被选中文本进行编辑处理。A processing module, configured to edit the selected text according to the category of the target editing function option.
  9. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-7任一项所述的文字编辑方法的步骤。An electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and operable on the processor, wherein the program or instruction is executed by the processor to achieve claim 1 The step of the text editing method described in any one of -7.
  10. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-7任一项所述的文字编辑方法的步骤。A readable storage medium storing programs or instructions on the readable storage medium, wherein the steps of the text editing method according to any one of claims 1-7 are implemented when the programs or instructions are executed by a processor.
  11. 一种芯片,包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-7任一项所述的文字编辑方法的步骤。A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the text editing method according to any one of claims 1-7 A step of.
  12. 一种计算机程序产品,其中,所述计算机程序产品被存储在非易失的存储介质中,所述计算机程序产品被至少一个处理器执行时实现如权利要求1-7任一项所述的文字编辑方法的步骤。A computer program product, wherein the computer program product is stored in a non-volatile storage medium, and when the computer program product is executed by at least one processor, the text according to any one of claims 1-7 is realized. Edit the steps of the method.
  13. 一种电子设备,被配置为执行如权利要求1-7任一项所述的文字编辑方法的步骤。An electronic device configured to execute the steps of the text editing method according to any one of claims 1-7.
PCT/CN2022/119904 2021-09-24 2022-09-20 Text editing method and apparatus, and electronic device WO2023045923A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111120872.8 2021-09-24
CN202111120872.8A CN113805753A (en) 2021-09-24 2021-09-24 Character editing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023045923A1 true WO2023045923A1 (en) 2023-03-30

Family

ID=78940324

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119904 WO2023045923A1 (en) 2021-09-24 2022-09-20 Text editing method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN113805753A (en)
WO (1) WO2023045923A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113805753A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Character editing method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132752A (en) * 2017-12-21 2018-06-08 维沃移动通信有限公司 A kind of method for editing text and mobile terminal
CN108279964A (en) * 2018-01-19 2018-07-13 广州视源电子科技股份有限公司 The implementation method and device that text control, mask for copy editor render
CN113805753A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Character editing method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108132752A (en) * 2017-12-21 2018-06-08 维沃移动通信有限公司 A kind of method for editing text and mobile terminal
CN108279964A (en) * 2018-01-19 2018-07-13 广州视源电子科技股份有限公司 The implementation method and device that text control, mask for copy editor render
CN113805753A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Character editing method and device and electronic equipment

Also Published As

Publication number Publication date
CN113805753A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
WO2022068773A1 (en) Desktop element adjustment method and apparatus, and electronic device
WO2023005920A1 (en) Screen splitting method and apparatus, and electronic device
WO2023125425A1 (en) Display method and apparatus, and electronic device
WO2022156668A1 (en) Information processing method and electronic device
WO2023056977A1 (en) Application program start method and apparatus, and electronic device
WO2023030306A1 (en) Method and apparatus for video editing, and electronic device
WO2023083158A1 (en) Text selection method, text selection apparatus, and electronic device
WO2023045923A1 (en) Text editing method and apparatus, and electronic device
WO2022143660A1 (en) Icon display method and apparatus, and electronic device
WO2022111397A1 (en) Control method and apparatus, and electronic device
CN110427138A (en) Translation information processing method, device, electronic equipment and storage medium
WO2023045919A1 (en) Text editing method and apparatus
WO2023025305A1 (en) Application icon management method and apparatus, and electronic device
WO2023174369A1 (en) Text selection method, text selection apparatus, electronic device and readable storage medium
WO2023165421A1 (en) Chat window information input method and apparatus, and electronic device
WO2023131043A1 (en) Information processing method and apparatus, and electronic device
WO2023155858A1 (en) Document editing method and apparatus
WO2023093809A1 (en) File editing processing method and apparatus, and electronic device
WO2023036115A1 (en) Text content selection method and apparatus
WO2023093590A1 (en) Display control method and apparatus, and electronic device and medium
WO2023045920A1 (en) Text display method and text display apparatus
CN111857503A (en) Display method, display device and electronic equipment
WO2023284640A9 (en) Picture processing method and electronic device
WO2022247814A1 (en) Method and apparatus for selecting target character, electronic device, and storage medium
WO2023030307A1 (en) Screenshot method and apparatus, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22871969

Country of ref document: EP

Kind code of ref document: A1