CN113807059A - Text editing method and device - Google Patents

Text editing method and device Download PDF

Info

Publication number
CN113807059A
CN113807059A CN202111124147.8A CN202111124147A CN113807059A CN 113807059 A CN113807059 A CN 113807059A CN 202111124147 A CN202111124147 A CN 202111124147A CN 113807059 A CN113807059 A CN 113807059A
Authority
CN
China
Prior art keywords
target
text
input
attribute
sliding
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202111124147.8A
Other languages
Chinese (zh)
Inventor
李硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202111124147.8A priority Critical patent/CN113807059A/en
Publication of CN113807059A publication Critical patent/CN113807059A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • 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/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a text editing method and a text editing device, and belongs to the technical field of communication. The method comprises the following steps: in a text editing mode, receiving a first input of a target text; responding to the first input, editing the target text to obtain a target text of a first style; the first input is an operation of selecting a target attribute by a user and dragging a preset attribute value corresponding to the target attribute to the target text, and the first pattern comprises the target attribute and the preset attribute value of the target attribute.

Description

Text editing method and device
Technical Field
The application belongs to the technical field of communication, and particularly relates to a text editing method and device.
Background
At present, in a scene that a user edits a text, if the size of a font size of the text is to be set, the user needs to click the font size first, select a target font size in a displayed font size list, and then successfully set the text as the text of the target font size, and then, if the user wants to set other font sizes or fonts for the text, the above operations need to be repeated, so that the operation steps are complicated, and the operation is not flexible.
The problems that the steps of editing the text by the user are complicated and the operation is inflexible in the related technology need to be solved urgently.
Disclosure of Invention
The embodiment of the application aims to provide a text editing method and a text editing device, and the problems that in the related technology, the steps of editing texts by users are complex and the operation is inflexible can be solved.
In a first aspect, an embodiment of the present application provides a text editing method, where the method includes:
in a text editing mode, receiving a first input of a target text;
and responding to the first input, editing the target text to obtain the target text of the first style.
In a second aspect, an embodiment of the present application provides an apparatus for text editing, where the apparatus includes:
a first receiving unit for receiving a first input of a target text in a text editing mode;
and the first editing unit is used for responding to the first input and editing the target text to obtain a target text of a first style.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, the electronic equipment receives the operation that a user selects the target attribute and drags the preset attribute value corresponding to the selected target attribute to the target text, responds to the operation and edits the target text to obtain the target text with the first style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can effectively improve the experience of the user in text editing.
Drawings
FIG. 1 is a schematic flow chart diagram of a text editing method provided by the present application;
FIG. 2 is one of the diagrams provided herein for editing target text in a first style based on a second input;
FIG. 3 is a second schematic diagram of editing a target text in a first style based on a second input provided by the present application;
FIG. 4 is a third schematic diagram illustrating editing of a target text of a first style based on a second input provided by the present application;
FIG. 5 is a fourth illustration of editing target text in a first style based on a second input provided herein;
FIG. 6 is a schematic structural diagram of a text editing apparatus provided in the present application;
FIG. 7 is a schematic structural diagram of an electronic device provided herein;
fig. 8 is a schematic diagram of a hardware structure of an electronic device provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The text editing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof. According to the text editing method provided by the embodiment of the application, an execution main body is electronic equipment, and the electronic equipment provided by the embodiment of the application includes but is not limited to a mobile phone, a tablet computer, a computer, wearable equipment and the like.
In order to solve the problems of complicated steps and inflexible operation of a user for editing a text in the related art, an embodiment of the present application provides a text editing method, fig. 1 is a schematic flow diagram of the text editing method provided by the embodiment of the present application, and as shown in fig. 1, the method includes the following steps:
in a text editing mode, a first input is received for a target text, step 100.
Alternatively, in the text editing mode, the user may edit the font, font size, color, background, or other attributes of the text.
Optionally, the first input is an operation of selecting a target attribute for a user and dragging a preset attribute value corresponding to the target attribute to the target text.
Optionally, the target attribute includes attributes such as font, font size, color, or background.
Step 101, responding to the first input, editing the target text to obtain a target text of a first style.
Optionally, the first pattern includes the target attribute and a preset attribute value of the target attribute.
The preset attribute value may also be a default attribute value.
Optionally, in response to the first input, the electronic device edits the target text based on the target attribute and a preset attribute value corresponding to the target attribute to obtain a target text of a first style, where the first style includes the target attribute and the preset attribute value of the target attribute.
In the embodiment of the application, the electronic equipment receives the operation that a user selects the target attribute and drags the preset attribute value corresponding to the selected target attribute to the target text, responds to the operation and edits the target text to obtain the target text with the first style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can effectively improve the experience of the user in text editing.
Optionally, after obtaining the target text of the first style, the method further includes:
receiving a second input to the target text;
responding to the second input, editing the target text of the first style to obtain a target text of a second style;
wherein the second style includes the target attribute and a first attribute value of the target attribute.
It can be understood that, in the case that the target text of the first style obtained based on the first input cannot meet the user requirement, the user may further edit the target file of the first style until the target text meeting the user requirement is obtained.
Optionally, the second input is a sliding operation of a user on the text editing interface, the attribute value corresponding to the target attribute of the target text is switched continuously along with the sliding operation in the value of the attribute value set corresponding to the target attribute, and when the sliding operation is finished, the attribute value corresponding to the target attribute of the target text is the first attribute value. I.e. the first property value of the target property is determined based on the second input.
Optionally, the electronic device receives a second input of the target text from the user, and in response to the second input, edits the target text in the first style to obtain a target text in a second style, where the second style includes the target attribute and the first attribute value of the target attribute.
In the embodiment of the application, the electronic equipment responds to the second input of the target text by the user, edits the target text in the first style to obtain the target text in the second style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can further improve the experience of the user in editing the text.
Optionally, the editing the target text of the first style in response to the second input includes:
acquiring a sliding direction and sliding times corresponding to the second input;
based on the attribute value set of the target attribute, starting to move the sliding times from the preset attribute value according to the sliding direction to obtain the first attribute value;
editing the target text of the first style based on the target attribute and the first attribute value.
It is understood that the first attribute value is determined based on the sliding direction and the sliding number corresponding to the second input.
The embodiment of the application associates the sliding operation of the user with the switching of the attribute values. That is, the attribute value corresponding to the target attribute of the target text is continuously switched among the values of the attribute value set corresponding to the target attribute along with the sliding direction and the sliding frequency corresponding to the second input, the attribute value is switched once every sliding, and when the sliding is finished, the attribute value corresponding to the target attribute of the target text is the first attribute value.
And the sliding direction corresponding to the second input corresponds to the switching direction of the attribute value corresponding to the target attribute of the target text in the attribute value set of the target attribute.
For example, if the sliding direction is horizontal rightward sliding or vertical upward sliding, the switching direction of the attribute value corresponding to the target attribute of the target text in the attribute value set of the target attribute is to switch from a preset attribute value to the positive sequence direction of the attribute value set; and if the sliding direction is horizontal leftward sliding or vertical downward sliding, switching the attribute value corresponding to the target attribute of the target text in the attribute value set of the target attribute in the reverse direction from the preset attribute value to the attribute value set.
It should be noted that the attribute value sets of the target attribute are arranged in order, for example, the attribute value sets corresponding to the word sizes are arranged in the order from large to small.
Further, the number of sliding times corresponding to the second input corresponds to the number of switching times of the attribute value corresponding to the target attribute of the target text in the attribute value set of the target attribute.
For example, if the sliding direction is horizontal rightward sliding or vertical upward sliding, and the sliding frequency is 3, the attribute value corresponding to the target attribute of the target text is obtained by switching 3 times from a preset attribute value to the positive sequence direction of the attribute value set based on the attribute value set of the target attribute; and if the sliding direction is horizontal leftward sliding or vertical downward sliding, and the sliding frequency is 2, switching the attribute value corresponding to the target attribute of the target text from a preset attribute value to the reverse direction of the attribute value set for 2 times based on the attribute value set of the target attribute.
In the embodiment of the application, the electronic device obtains the sliding direction and the sliding times corresponding to the second input, based on the attribute value set of the target attribute, the sliding times are moved from the preset attribute according to the sliding direction to obtain the first attribute value, and then the target text of the first style is edited based on the target attribute and the first attribute value, so that the user can edit the attribute of the target text directly through sliding operation, and the experience of the user in text editing can be effectively improved.
Optionally, the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in the first preset direction, and then sliding for a fourth time in the second preset direction;
and sliding for the fifth time according to the second preset direction, and then sliding for the sixth time according to the first preset direction.
The second input may be a single sliding operation or a combination of sliding operations.
The first preset direction may be a ray direction which is horizontally rightward, horizontally leftward, vertically upward, vertically downward, and has a certain included angle with the horizontal direction, and the like, which is not limited in the present application.
It should be noted that the first preset direction is opposite to the second preset direction.
For example, if the first predetermined direction is horizontal to the right, the second predetermined direction is horizontal to the left; if the first predetermined direction is vertically upward, the second predetermined direction is vertically downward.
Any two of the first frequency, the second frequency, the third frequency, the fourth frequency, the fifth frequency and the sixth frequency may be the same or all the six frequencies are different, which is not limited in the present application.
The process of determining the first attribute value based on the second input is specifically described in conjunction with the following example.
For example, the second input is to slide horizontally three times to the left and then slide horizontally one time to the right, the attribute value set of the font size is { first font, second font, third font, fourth font, fifth font, and fifth font … … }, the preset attribute value is a fourth font, then the font is moved leftwards three times from the fourth font according to the attribute value set of the font size, the attribute value is a second font, then the font is moved rightwards one time from the second font, the third font is obtained, and the first attribute value is a third font.
Optionally, the electronic device obtains a sliding direction and sliding times corresponding to the second input, moves from a preset attribute value according to the sliding direction corresponding to the second input based on the attribute value set of the target attribute, the moving times are the sliding times corresponding to the second input, finally obtains a first attribute value, and edits the target text of the first style based on the target attribute and the first attribute value.
Fig. 2 is one of schematic diagrams of editing a target text of a first style based on a second input according to an embodiment of the present application. As shown in fig. 2, in the font editing mode of the text, the left diagram in fig. 2 shows "happy your" with a small font size for representing the target text of the first style, the left diagram in fig. 2 is subjected to an operation of the user to horizontally slide right in the text editing area to obtain the right diagram in fig. 2, and the right diagram in fig. 2 shows "happy your" with a large font size, wherein the operation of the user to horizontally slide right in the text editing area represents the second input.
Fig. 3 is a second schematic diagram of editing the target text in the first style based on the second input according to the embodiment of the present application. As shown in fig. 3, in the font editing mode of the text, the left diagram in fig. 3 shows "happy your" with a large font size for representing the target text of the first style, the right diagram in fig. 3 is obtained after the user performs an operation of horizontally sliding left in the text editing area, and the right diagram in fig. 3 shows "happy your" with a small font size, wherein the operation of horizontally sliding left in the text editing area by the user represents the second input.
Fig. 4 is a third schematic diagram of editing a target text of a first style based on a second input according to the embodiment of the present application. As shown in fig. 4, in the font editing mode of the text, the left diagram in fig. 4 shows "happy your" with a small font size for representing the target text of the first style, the right diagram in fig. 4 is obtained after the user performs an operation of sliding vertically upward in the text editing area, and the right diagram in fig. 4 shows "happy your" with a large font size, wherein the operation of sliding vertically upward in the text editing area by the user represents the second input.
Fig. 5 is a fourth schematic diagram illustrating editing of a target text in a first style based on a second input according to an embodiment of the present application. As shown in fig. 5, in the font editing mode of the text, the left diagram in fig. 5 shows "happy your" with a large font size for representing the target text of the first style, the left diagram in fig. 5 is subjected to an operation of the user to vertically slide down in the text editing area to obtain the right diagram in fig. 5, and the right diagram in fig. 5 shows "happy your" with a small font size, wherein the operation of the user to vertically slide down in the text editing area represents the second input.
Optionally, the method further comprises:
receiving a third input;
generating a custom template in response to the third input;
the third input is an operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes for a user; the custom template is a set which is generated according to the third input and contains at least one group of attributes and attribute values corresponding to the at least one group of attributes.
It should be noted that, in order to meet the customization requirement of the user for text editing, the embodiment of the present application provides a custom template function.
The user-defined template function is that the electronic equipment generates a user-defined template based on at least one group of attributes selected by a user and attribute values corresponding to each group of attributes.
Optionally, the electronic device receives a third input from the user, and generates a custom template in response to the third input, where the third input is an operation of selecting at least one set of attributes and attribute values corresponding to each set of attributes for the user.
For example, the third input is a click operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes by the user, and the custom template is a set containing at least one group of attributes and attribute values corresponding to at least one group of attributes generated according to the third input.
In the embodiment of the application, the electronic equipment responds to the third input to generate the custom template, so that the operation steps of editing the text are simplified, the operation is more flexible and efficient, and the customization requirement of the user on text editing is met.
Optionally, the first input is an operation of selecting a target group attribute in the custom template for a user, and dragging a preset attribute value set corresponding to the target group attribute to the target text.
It can be understood that the embodiment of the present application also provides a scheme for editing a text based on a custom template.
Optionally, the electronic device receives a first input of a target text from a user in a self-defined template editing mode of the text, and edits the target text in response to the first input to obtain a target text with a first style; the first input is the operation of selecting a target group attribute in a custom template for a user and dragging a preset attribute value set corresponding to the target group attribute to a target text, and the first pattern comprises the target group attribute and the preset attribute value of the target group attribute.
Further, the electronic equipment receives a second input of the target text, and in response to the second input, edits the target text in the first style to obtain a target text in a second style; wherein the second style includes a target group attribute and a first set of attribute values for the target group attribute.
Optionally, in response to the second input, editing the target text in the first style includes:
acquiring a sliding direction and sliding times corresponding to the second input;
based on the attribute value set of the target group attribute, starting from a preset attribute value set and moving the sliding times according to the sliding direction to obtain a first attribute value set;
editing the target text of the first style based on the target group attribute and the first set of attribute values.
Optionally, the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in a first preset direction and then sliding for a fourth time in a second preset direction;
sliding for the fifth time according to the second preset direction, and then sliding for the sixth time according to the first preset direction;
the first preset direction is opposite to the second preset direction.
It should be noted that, in the text editing method provided in the embodiment of the present application, the execution main body may be a text editing apparatus, or a control module in the text editing apparatus for executing the text editing method. In the embodiment of the present application, a method for executing text editing by a text editing apparatus is taken as an example, and the text editing apparatus provided in the embodiment of the present application is described.
Fig. 6 is a schematic structural diagram of a text editing apparatus according to an embodiment of the present application, where the text editing apparatus 600 includes: a first receiving unit 610 and a first editing unit 620, wherein,
a first receiving unit 610 for receiving a first input of a target text in a text editing mode;
a first editing unit 620, configured to, in response to the first input, edit the target text to obtain a target text in a first style; the first input is an operation of selecting a target attribute by a user and dragging a preset attribute value corresponding to the target attribute to the target text, and the first pattern comprises the target attribute and the preset attribute value of the target attribute.
In the embodiment of the application, the electronic equipment receives the operation that a user selects the target attribute and drags the preset attribute value corresponding to the selected target attribute to the target text, responds to the operation and edits the target text to obtain the target text with the first style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can effectively improve the experience of the user in text editing.
Optionally, the method further comprises:
a second receiving unit for receiving a second input to the target text;
the second editing unit is used for responding to the second input and editing the target text of the first style to obtain a target text of a second style;
wherein the second style includes the target attribute and a first attribute value of the target attribute.
In the embodiment of the application, the electronic equipment responds to the second input of the target text by the user, edits the target text in the first style to obtain the target text in the second style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can further improve the experience of the user in editing the text.
Optionally, the second editing unit includes:
the obtaining subunit is used for obtaining the sliding direction and the sliding times corresponding to the second input;
a determining subunit, configured to move the sliding times in the sliding direction from the preset attribute value based on the attribute value set of the target attribute, so as to obtain the first attribute value;
and the editing subunit is used for editing the target text of the first style based on the target attribute and the first attribute value.
In the embodiment of the application, the electronic device obtains the sliding direction and the sliding times corresponding to the second input, based on the combination of the attribute values of the target attribute, the sliding times are moved from the preset attribute according to the sliding direction to obtain the first attribute value, and then the target text of the first style is edited based on the target attribute and the first attribute value, so that the user can edit the attribute of the target text directly through sliding operation, and the experience of the user in text editing can be effectively improved.
Optionally, the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in the first preset direction, and then sliding for a fourth time in the second preset direction;
sliding for a fifth time in the second preset direction, and then sliding for a sixth time in the first preset direction;
wherein the first preset direction is opposite to the second preset direction.
Optionally, the method further comprises:
a third receiving unit for receiving a third input;
the generating unit is used for responding to the third input and generating a self-defined template;
the third input is an operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes for a user; the custom template is a set which is generated according to the third input and contains at least one group of attributes and attribute values corresponding to the at least one group of attributes.
In the embodiment of the application, the electronic equipment responds to the third input to generate the custom template, so that the operation steps of editing the text are simplified, the operation is more flexible and efficient, and the customization requirement of the user on text editing is met.
The text editing apparatus in the embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The text editing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The text editing apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 5, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the text editing apparatus method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
Wherein, the user input unit 807 is used for receiving a first input of the target text in the text editing mode;
a processor 810, configured to, in response to the first input, edit the target text to obtain a target text in a first style; the first input is an operation of selecting a target attribute by a user and dragging a preset attribute value corresponding to the target attribute to the target text, and the first pattern comprises the target attribute and the preset attribute value of the target attribute.
In the embodiment of the application, the electronic equipment receives the operation that a user selects the target attribute and drags the preset attribute value corresponding to the selected target attribute to the target text, responds to the operation and edits the target text to obtain the target text with the first style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can effectively improve the experience of the user in text editing.
Optionally, the processor 810 is further configured to:
receiving a second input to the target text;
responding to the second input, editing the target text of the first style to obtain a target text of a second style;
wherein the second style includes the target attribute and a first attribute value of the target attribute.
In the embodiment of the application, the electronic equipment responds to the second input of the target text by the user, edits the target text in the first style to obtain the target text in the second style, simplifies the operation steps of editing the text, is more flexible and efficient to operate, and can further improve the experience of the user in editing the text.
Optionally, the editing the target text of the first style in response to the second input includes:
acquiring a sliding direction and sliding times corresponding to the second input;
based on the attribute value set of the target attribute, starting to move the sliding times from the preset attribute value according to the sliding direction to obtain the first attribute value;
editing the target text of the first style based on the target attribute and the first attribute value.
In the embodiment of the application, the electronic device obtains the sliding direction and the sliding times corresponding to the second input, based on the combination of the attribute values of the target attribute, the sliding times are moved from the preset attribute according to the sliding direction to obtain the first attribute value, and then the target text of the first style is edited based on the target attribute and the first attribute value, so that the user can edit the attribute of the target text directly through sliding operation, and the experience of the user in text editing can be effectively improved.
Optionally, the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in the first preset direction, and then sliding for a fourth time in the second preset direction;
sliding for a fifth time in the second preset direction, and then sliding for a sixth time in the first preset direction;
wherein the first preset direction is opposite to the second preset direction.
Optionally, the processor 810 is further configured to:
receiving a third input;
generating a custom template in response to the third input;
the third input is an operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes for a user; the custom template is a set which is generated according to the third input and contains at least one group of attributes and attribute values corresponding to the at least one group of attributes.
In the embodiment of the application, the electronic equipment responds to the third input to generate the custom template, so that the operation steps of editing the text are simplified, the operation is more flexible and efficient, and the customization requirement of the user on text editing is met.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 809 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 810 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the process of the text editing method embodiment is implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the text editing method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method of text editing, comprising:
in a text editing mode, receiving a first input of a target text;
responding to the first input, editing the target text to obtain a target text of a first style;
the first input is an operation of selecting a target attribute by a user and dragging a preset attribute value corresponding to the target attribute to the target text, and the first pattern comprises the target attribute and the preset attribute value of the target attribute.
2. The method for editing text according to claim 1, wherein after obtaining the target text in the first style, the method further comprises:
receiving a second input to the target text;
responding to the second input, editing the target text of the first style to obtain a target text of a second style;
wherein the second style includes the target attribute and a first attribute value of the target attribute.
3. The text editing method of claim 2, wherein the editing the target text of the first style in response to the second input comprises:
acquiring a sliding direction and sliding times corresponding to the second input;
based on the attribute value set of the target attribute, starting to move the sliding times from the preset attribute value according to the sliding direction to obtain the first attribute value;
editing the target text of the first style based on the target attribute and the first attribute value.
4. The text editing method of claim 2 or 3, wherein the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in the first preset direction, and then sliding for a fourth time in the second preset direction;
sliding for a fifth time in the second preset direction, and then sliding for a sixth time in the first preset direction;
wherein the first preset direction is opposite to the second preset direction.
5. The text editing method of claim 1, wherein the method further comprises:
receiving a third input;
generating a custom template in response to the third input;
the third input is an operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes for a user; the custom template is a set which is generated according to the third input and contains at least one group of attributes and attribute values corresponding to the at least one group of attributes.
6. A text editing apparatus, comprising:
a first receiving unit for receiving a first input of a target text in a text editing mode;
the first editing unit is used for responding to the first input and editing the target text to obtain a target text of a first style;
the first input is an operation of selecting a target attribute by a user and dragging a preset attribute value corresponding to the target attribute to the target text, and the first pattern comprises the target attribute and the preset attribute value of the target attribute.
7. The text editing apparatus according to claim 6, further comprising:
a second receiving unit for receiving a second input to the target text;
the second editing unit is used for responding to the second input and editing the target text of the first style to obtain a target text of a second style;
wherein the second style includes the target attribute and a first attribute value of the target attribute.
8. The text editing apparatus according to claim 7, wherein the second editing unit includes:
the obtaining subunit is used for obtaining the sliding direction and the sliding times corresponding to the second input;
a determining subunit, configured to move the sliding times in the sliding direction from the preset attribute value based on the attribute value set of the target attribute, so as to obtain the first attribute value;
and the editing subunit is used for editing the target text of the first style based on the target attribute and the first attribute value.
9. The text editing apparatus of claim 7 or 8, wherein the second input comprises at least one of:
sliding the sliding plate for a first time according to a first preset direction;
sliding the sliding plate for a second time in a second preset direction;
sliding for a third time in the first preset direction, and then sliding for a fourth time in the second preset direction;
sliding for a fifth time in the second preset direction, and then sliding for a sixth time in the first preset direction;
wherein the first preset direction is opposite to the second preset direction.
10. The text editing apparatus according to claim 6, further comprising:
a third receiving unit for receiving a third input;
the generating unit is used for responding to the third input and generating a self-defined template;
the third input is an operation of selecting at least one group of attributes and attribute values corresponding to each group of attributes for a user; the custom template is a set which is generated according to the third input and contains at least one group of attributes and attribute values corresponding to the at least one group of attributes.
CN202111124147.8A 2021-09-24 2021-09-24 Text editing method and device Pending CN113807059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111124147.8A CN113807059A (en) 2021-09-24 2021-09-24 Text editing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111124147.8A CN113807059A (en) 2021-09-24 2021-09-24 Text editing method and device

Publications (1)

Publication Number Publication Date
CN113807059A true CN113807059A (en) 2021-12-17

Family

ID=78896572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111124147.8A Pending CN113807059A (en) 2021-09-24 2021-09-24 Text editing method and device

Country Status (1)

Country Link
CN (1) CN113807059A (en)

Similar Documents

Publication Publication Date Title
WO2023005920A1 (en) Screen splitting method and apparatus, and electronic device
CN111857513B (en) Background program control method and device and electronic equipment
CN112099707A (en) Display method and device and electronic equipment
CN112540740A (en) Split screen display method and device, electronic equipment and readable storage medium
CN112099714B (en) Screenshot method and device, electronic equipment and readable storage medium
CN113467660A (en) Information sharing method and electronic equipment
CN113918260A (en) Application program display method and device and electronic equipment
CN112817676A (en) Information processing method and electronic device
CN112269506A (en) Screen splitting method and device and electronic equipment
CN111813305A (en) Application program starting method and device
CN112449110B (en) Image processing method and device and electronic equipment
CN114518822A (en) Application icon management method and device and electronic equipment
CN112698762B (en) Icon display method and device and electronic equipment
CN114116098A (en) Application icon management method and device, electronic equipment and storage medium
CN113849092A (en) Content sharing method and device and electronic equipment
CN113703634A (en) Interface display method and device
CN113342232A (en) Icon generation method and device, electronic equipment and readable storage medium
CN112306320A (en) Page display method, device, equipment and medium
CN112162805B (en) Screenshot method and device and electronic equipment
CN113885748A (en) Object switching method and device, electronic equipment and readable storage medium
CN113807059A (en) Text editing method and device
CN113805753A (en) Character editing method and device and electronic equipment
CN113393372A (en) Desktop wallpaper setting method and device
CN113010072A (en) Searching method and device, electronic equipment and readable storage medium
CN113807831A (en) Payment method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination