CN110929484A - Text processing method, device and storage medium - Google Patents
Text processing method, device and storage medium Download PDFInfo
- Publication number
- CN110929484A CN110929484A CN201911098298.3A CN201911098298A CN110929484A CN 110929484 A CN110929484 A CN 110929484A CN 201911098298 A CN201911098298 A CN 201911098298A CN 110929484 A CN110929484 A CN 110929484A
- Authority
- CN
- China
- Prior art keywords
- text content
- text
- display interface
- operation instruction
- selected state
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 31
- 238000001514 detection method Methods 0.000 claims description 16
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 241000282421 Canidae Species 0.000 description 2
- 241000406668 Loxodonta cyclotis Species 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012552 review Methods 0.000 description 2
- 241001455214 Acinonyx jubatus Species 0.000 description 1
- 241000282461 Canis lupus Species 0.000 description 1
- 241000282323 Felidae Species 0.000 description 1
- 241000282326 Felis catus Species 0.000 description 1
- 241000282320 Panthera leo Species 0.000 description 1
- 241000282485 Vulpes vulpes Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/543—User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present disclosure relates to a text processing method, a text processing apparatus, and a storage medium, where the method is applied to an electronic device, and includes: detecting a first operation instruction aiming at first text content contained in a text file displayed on the electronic equipment, wherein the first text content is in a selected state; detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state; and if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected, editing the first text content and the at least one second text content. Compared with the method for selecting the plurality of text contents in the text file for multiple times and editing each selected text content for multiple times, the method for editing the plurality of text contents in the text file can simultaneously select the plurality of text contents and edit the selected plurality of text contents, is simple and convenient to operate, and meets the operation requirement of selecting the plurality of text contents and editing at one time.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a text processing method, apparatus, and storage medium.
Background
At present, electronic devices have been widely used in various fields of communication, entertainment, education, and the like. Taking the mobile terminal as an example, the mobile terminal has the advantages of convenience in carrying and acquisition and the like. More and more users prefer to use mobile terminals for the transmission and reading of text files, wherein the mobile terminals may include mobile phones, tablet computers, e-book readers, etc.
After a user reads a text file based on a mobile terminal, the user may need to review or recall the text file again, and the text content of a text file usually contains a lot of words, and then the text content in the text file needs to be marked or edited for subsequent review and recall.
Disclosure of Invention
The disclosure provides a text processing method, a text processing device and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a text processing method applied to an electronic device, including:
detecting a first operation instruction aiming at first text content contained in a text file displayed on the electronic equipment, wherein the first text content is in a selected state;
detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
and if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected, editing the first text content and the at least one second text content.
Optionally, the method further includes:
detecting a fourth operation instruction aiming at the text file, and entering a multi-selection state;
the detecting a second operation instruction for at least one second text content contained in the text file, the at least one second text content being in a selected state, includes:
and under the multi-selection state, detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state.
Optionally, the method further includes:
displaying an attribute selection window on a first display interface where the first text content is located;
detecting the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the editing control in the attribute selection window; or,
determining the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
Optionally, the at least one second text content is located on a second display interface different from the first display interface; the method further comprises the following steps:
and when the at least one second text content is in the selected state, updating the display position of the attribute selection window from the first display interface to the second display interface.
Optionally, the at least one second text content is located on the first display interface, and the at least one second text content is located at a different position on the first display interface from the first text content;
the displaying of the attribute selection window on the first display interface where the first text content is located includes:
displaying the attribute selection window on the first display interface at a different location from the at least one second text content and the first text content.
Optionally, the method further includes:
determining the text line number of the text contained in the first text content;
determining whether the text line number is larger than a set line number threshold value;
the displaying of the attribute selection window on the first display interface where the first text content is located includes:
and if the text line number is larger than the set line number threshold, displaying the attribute selection window on a first display interface where the first text content is located.
According to a second aspect of the embodiments of the present disclosure, there is provided a text processing apparatus applied to an electronic device, including:
the electronic equipment comprises a first detection module, a second detection module and a display module, wherein the first detection module is configured to detect a first operation instruction aiming at first text content contained in a text file displayed on the electronic equipment, and the first text content is in a selected state;
the second detection module is configured to detect a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
and the editing module is configured to edit the first text content and the at least one second text content if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected.
Optionally, the apparatus further comprises:
the third detection module is configured to detect a fourth operation instruction aiming at the text file and enter a multi-selection state;
the second detection module is further configured to detect a second operation instruction for at least one second text content included in the text file in the multiple-selection state, where the at least one second text content is in the selected state.
Optionally, the apparatus further comprises:
the display module is configured to display an attribute selection window on a first display interface where the first text content is located;
a fourth detection module configured to detect the third operation instruction for the first text content and the at least one second text content in the selected state based on the edit control in the property selection window; or,
determining the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
Optionally, the at least one second text content is located on a second display interface different from the first display interface; the device further comprises:
and the updating module is configured to update the display position of the attribute selection window from the first display interface to the second display interface when the at least one second text content is in the selected state.
Optionally, the at least one second text content is located on the first display interface, and the at least one second text content is located at a different position on the first display interface from the first text content;
the display module is specifically configured to:
displaying the attribute selection window on the first display interface at a different location from the at least one second text content and the first text content.
Optionally, the apparatus further comprises:
the first determining module is configured to determine the text line number of the text contained in the first text content;
a second determination module configured to determine whether the number of text lines is greater than a set line number threshold;
the display module is further specifically configured to:
and if the text line number is larger than the set line number threshold, displaying the attribute selection window on a first display interface where the first text content is located.
According to a third aspect of the embodiments of the present disclosure, there is provided a text processing apparatus including:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to: the steps in the text processing method of the first aspect described above are implemented when executed.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of a text processing apparatus, enable the apparatus to perform the text processing method of the first aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme, the method and the device for editing the first text content and the at least one second text content can simultaneously select the first text content and the at least one second text content, and simultaneously edit the selected first text content and the selected at least one second text content. Compared with the method and the device for editing the plurality of text contents in the text file, the method and the device for editing the plurality of text contents in the text file need to select the plurality of text contents in a plurality of times and edit each selected text content in a plurality of times, the technical scheme in the disclosure can select the plurality of text contents at the same time and edit the selected plurality of text contents at the same time, the operation is simple and convenient, and the operation requirement for selecting the plurality of text contents and editing at one time is met.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating a method of text processing according to an exemplary embodiment.
FIG. 2A is a flow diagram illustrating another method of text processing according to an example embodiment.
FIG. 2B illustrates a text file display interface in accordance with an exemplary embodiment.
FIG. 2C is an illustration of another text file display interface, according to an example embodiment.
FIG. 3 is a block diagram illustrating a text processing apparatus according to an example embodiment.
Fig. 4 is a block diagram illustrating a hardware configuration of a text processing apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a text processing method according to an exemplary embodiment, where the method is applied to an electronic device including a mobile terminal and a fixed terminal, as shown in fig. 1, and the mobile terminal includes: mobile phones, tablet computers, notebook computers, e-book readers, and the like; the fixed terminal includes a personal computer and the like. The method mainly comprises the following steps:
in step 101, detecting a first operation instruction for a first text content contained in a text file, wherein the first text content is in a selected state;
in step 102, detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
in step 103, if a third operation instruction for the first text content and the at least one second text content in the selected state is detected, the first text content and the at least one second text content are edited.
Here, a text file may be displayed on a display screen of the electronic device, and a user may input a first operation instruction for a first text content included in the text file based on a touch screen of the electronic device if the user is interested in the first text content while reading the text file. The first text content may be placed in a selected state if the electronic device detects a first operation instruction for the first text content. For example, when the electronic device detects that an operating body is placed at a first position of a text file, a first cursor and a second cursor are displayed on a display screen of the electronic device, and at this time, the position of the first text content may be determined and the first text content may be in a selected state through sliding tracks of the first cursor and the second cursor, where the operating body may include a finger of a user or a stylus pen, and when the first text content is in the selected state, a background color of the first text content in the selected state is different from a background color of the text content not in the selected state.
The text file includes, but is not limited to, at least one of: e-books, web pages, public push files, push files for reading applications.
Taking an e-book in which a text file is in a text format shown by a reader application installed on an electronic device as an example, when a user reads a part of text content of the e-book, for example, a paragraph of a chapter of the e-book or a sentence of a paragraph, and feels that the paragraph or the sentence is important or splendid, the paragraph or the sentence may be selected, where the selected first text content may be a text content selected before the second text content.
After the electronic device executes a first operation instruction for the first text content, the first text content can be switched from a reading state to a selected state, a second operation instruction for at least one second text content contained in the text file is detected, the at least one second text content is switched from the reading state to the selected state, and if a third operation instruction for the first text content and the at least one second text content in the selected state is detected, the first text content and the at least one second text content are edited.
In the process of reading the text file, if the user is interested in a second text content contained in the text file, a second operation instruction aiming at the second text content can be input based on a touch screen of the electronic device, and if the electronic device detects the second operation instruction aiming at the second text content, the second text content can be in a selected state. The second operation instruction may be a click operation, a slide operation, or the like. For example, when the electronic device detects that the operating body touches the second position of the text file, a third cursor and a fourth cursor are displayed on a display screen of the electronic device, and at this time, the position of the second text content can be determined through the sliding tracks of the third cursor and the fourth cursor, and the second text content is in a selected state. The operation body can comprise a finger of a user or a touch pen, and since the first text content is in the selected state in the process of selecting the second text content, when the second text content is in the selected state, the background color of the second text content can be updated to be the same as that of the first text content, so that the first text content and the second text content in the selected state can be distinguished from other unselected text contents.
In the case that the first text content and the at least one second text content are in the selected state, if a third operation instruction for the first text content and the at least one second text content in the state is detected, the selected first text content and the at least one second text content may be edited at the same time.
In the embodiment of the disclosure, the first text content and the at least one second text content can be simultaneously selected, and the selected first text content and the selected at least one second text content can be simultaneously edited. Compared with the method and the device for editing the plurality of text contents in the text file, the method and the device for editing the plurality of text contents in the text file need to select the plurality of text contents in a plurality of times and edit each selected text content in a plurality of times, the technical scheme in the disclosure can select the plurality of text contents at the same time and edit the selected plurality of text contents at the same time, the operation is simple and convenient, and the operation requirement for selecting the plurality of text contents and editing at one time is met.
In other optional embodiments, the method further comprises:
detecting a fourth operation instruction aiming at the text file, and entering a multi-selection state;
detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state, and the method comprises the following steps:
and under the multi-selection state, detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in the selected state.
Here, a fourth operation instruction may be detected based on a multi-selection control displayed in a property selection window on a first display interface where the first text content is located, and if the fourth operation instruction for the multi-selection control in the property selection window is detected, the electronic device may be controlled to enter a multi-selection state based on the fourth operation instruction, where the fourth operation instruction may be a click operation, a long-press operation, or the like performed on the multi-selection control, and in the multi-selection state, a selection operation may be simultaneously performed on one or more text contents, so that the text contents are selected under a plurality of discrete operations, and enter the selection state.
The electronic equipment displays an attribute selection window on the first display interface while selecting the first text content based on the first operation instruction. In this way, the first operation instruction simultaneously triggers the electronic equipment to execute the display of the text content selection and attribute selection window.
After detecting that the execution of the fourth operation instruction for the second text content is finished, that is, after controlling the electronic device to be in the multi-selection state, if the user is interested in one second text content contained in the text file, a second operation instruction for the second text content may be input based on a touch screen of the electronic device, and if the electronic device detects the second operation instruction for the second text content, the second text content may be in the selection state. The second operation instruction may be a click operation, a slide operation, or the like. For example, when the electronic device detects that the operating body touches the second position of the text file, a third cursor and a fourth cursor are displayed on a display screen of the electronic device, and at this time, the position of the second text content can be determined through the sliding tracks of the third cursor and the fourth cursor, and the second text content is in a selected state. The operation body can comprise a finger of a user or a touch pen, and since the first text content is in the selected state in the process of selecting the second text content, when the second text content is in the selected state, the background color of the second text content can be updated to be the same as that of the first text content, so that the first text content and the second text content in the selected state can be distinguished from other unselected text contents.
In other alternative embodiments, the background color of the second text content in the selected state may be updated to be different from the background color of the first text content in the selected state, as long as the first text content and the second text content in the selected state can be distinguished from other text contents not in the selected state.
Of course, after the first text content and the second text content enter the selected state, the multi-selection control may also be continuously displayed in the attribute selection window, and based on the fourth operation instruction for the multi-selection control, the text file enters the multi-selection state, and the next second text content is selected until the user finishes selecting, and all the selected text files are edited.
Here, in the multiple selection state, if a third operation instruction for the first text content and the at least one second text content in the state is detected, the selected first text content and the at least one second text content may be subjected to editing processing at the same time.
In other optional embodiments, in a case that the first text content is in the selected state, if the fourth operation instruction for the multi-selection control is not detected and the third operation instruction for the first text content in the selected state is detected, the first text content may be directly subjected to editing processing, and after the first text content is subjected to editing processing, the property selection window may further be continuously displayed on the first display interface displaying the first text content.
In the embodiment of the disclosure, a multi-selection state may be entered based on a fourth operation instruction of a multi-selection control in a property selection window of a first display interface where a first text content is located, so that the first text content and at least one second text content are simultaneously selected, and the selected first text content and at least one second text content are simultaneously edited. Compared with the method and the device for editing the plurality of text contents in the text file, the method and the device for editing the plurality of text contents in the text file need to select the plurality of text contents in a plurality of times and edit each selected text content in a plurality of times, the technical scheme in the disclosure can select the plurality of text contents at the same time and edit the selected plurality of text contents at the same time, the operation is simple and convenient, and the operation requirement for selecting the plurality of text contents and editing at one time is met.
In other optional embodiments, the method further comprises:
displaying an attribute selection window on a first display interface where the first text content is located;
detecting a third operation instruction aiming at the first text content and at least one second text content in a selected state based on the editing control in the attribute selection window; or,
detecting the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
After the electronic device executes the first operation instruction for the first text content, a property selection window may be further displayed on the first display interface where the first text content is located, where multiple controls may be displayed in the property selection window, so that a user may input corresponding operations based on the multiple controls in the property selection window, for example, a fourth operation instruction is input based on a multiple selection control in the property selection window, so as to cause the electronic device to enter a multiple selection state; and inputting a third operation instruction based on the editing control in the attribute selection window to perform editing processing and the like on the selected text content, wherein the attribute selection window can be displayed in a popup mode, namely, after the first operation instruction is executed, the attribute selection window is automatically popped up on the first text display interface.
In the embodiment of the present disclosure, a plurality of editing controls may be set in the attribute selection window, so that corresponding third operation instructions may be received based on the editing controls, respectively, where the third operation instructions may be scribe operation instructions, copy operation instructions, and the like. Detecting a scribing operation aiming at the first text content and at least one second text content in a selected state through an editing control used for receiving the scribing operation in the attribute selection window; and detecting the copy operation of the first text content and the at least one second text content in the selected state through an editing control used for receiving the copy operation in the attribute selection window. In this way, it is possible to underline the first text content and the at least one second text content at the same time, or to copy the first text content and the at least one second text content at the same time.
In other optional embodiments, when the property selection window is not displayed through the display interface, gesture information input by a user may be directly received based on a touch screen of the electronic device, and a third operation instruction for the first text content and the at least one second text content in the selected state may be determined based on the gesture information, so that the first text content and the at least one second text content in the selected state may be directly edited based on the third operation instruction. Wherein, the different gestures are different in the corresponding operation instruction. For example, when it is detected that the operation body slides on the touch screen of the electronic device in a straight track, the sliding gesture information may be received, and at this time, it may be determined that the third operation instruction for the first text content and the at least one second text content in the selected state is an underlining operation instruction, so as to underline the first text content and the at least one second text content in the selected state.
In other optional embodiments, when the attribute selection window is displayed through the display interface, gesture information input by a user may also be directly received based on other areas on the electronic device outside the attribute selection window, and a third operation instruction for the first text content and the at least one second text content in the selected state is determined based on the gesture information, so that the first text content and the at least one second text content in the selected state are directly edited based on the third operation instruction. In the process of using the electronic device by a user, the electronic device can be directly in a multi-selection state based on the multi-selection control, the editing control in the attribute selection window is directly based on or a third operation instruction is directly input based on gesture information, the first text content and the second text content are simultaneously edited, and convenience in executing corresponding operations on the text file is improved.
In some embodiments, the method further comprises:
and after the electronic equipment enters the selected state, in the process of selecting one or more second text contents based on the second operation instruction, the attribute selection window is maintained at the first display position of the first display page.
In other alternative embodiments, the at least one second text content is located on a second display interface different from the first display interface; the method further comprises the following steps:
and when at least one second text content is in a selected state, updating the display position of the attribute selection window from the first display interface to the second display interface.
It should be noted that, in the case that the first text content is in the selected state, and the user does not select the second text content, the attribute selection window may be displayed on the first display interface where the first text content is located, for example, outside the area covered by the first text content displayed on the first display interface. When the first text content and the at least one second text content are both in the selected state and the second text content is on a second display interface different from the first display interface, the display position of the attribute selection window can be updated from the first display interface to the second display interface, so that when a user needs to select a next second text content, the user can directly enter a multi-selection state based on the multi-selection control in the attribute selection window displayed on the second display interface where the currently selected second text content is located, further the operation of selecting the next second text content is executed, the user does not need to return to the first display interface again to execute corresponding operation, and the convenience and experience of the user can be improved. In this manner, after the first text content is selected, a fourth operation instruction acting on the multi-selection control needs to be detected before each additional text content is selected.
In other optional embodiments, the at least one second text content is located on the first display interface, and the at least one second text content is located in a different position on the first display interface than the first text content;
displaying a property selection window on a first display interface where a first text content is located, comprising:
and displaying the attribute selection window on the first display interface at a position different from the at least one second text content and the first text content.
Here, the first text content and the at least one second text content may be displayed on the same display interface, for example, different positions on the first display interface, and the attribute selection window is the different positions of the first text content and the second text content displayed on the first display interface. Therefore, the attribute selection window cannot shield the first text content and the second text content, further the editing of the first text content and the second text content by a user cannot be influenced, and the user experience can be improved.
In other optional embodiments, the method further comprises:
determining the text line number of the text contained in the first text content;
determining whether the number of lines of the text is larger than a set line number threshold value;
displaying a property selection window on a first display interface where a first text content is located, comprising:
and if the text line number is larger than the set line number threshold, displaying an attribute selection window on a first display interface where the first text content is located.
Here, before displaying the attribute selection window, a text line number of a text included in the first text content may be determined, and when the text line number is greater than a set function threshold, the attribute selection window is displayed on the first display interface where the first text content is located. Therefore, the probability that the attribute selection window is displayed when the attribute selection window is not needed due to mistaken touch on the text file when the user performs operations such as page turning or amplification in the process of reading the text file can be reduced.
In other optional embodiments, the method further comprises: detecting a click operation directed to a region other than the attribute selection window, and if the click operation directed to the region other than the attribute selection window is detected, enabling the attribute selection window to be in a hidden state; or, detecting a hiding operation for the hidden control in the attribute selection window, and if the hiding operation for the hidden control in the attribute selection window is detected, enabling the attribute selection window to be in a hidden state.
In other optional embodiments, the third operation instruction comprises at least one of: adding annotation operation instructions, marking-out operation instructions, searching word operation instructions, adding note operation instructions, adding bookmark operation instructions, sharing operation instructions, copying operation instructions, moving operation instructions and cutting operation instructions.
FIG. 2A is a flow diagram illustrating another text processing method according to an exemplary embodiment, as shown in FIG. 2A, including the steps of:
in step 201a, when reading or editing a text file, a plurality of lines of words (first text content) in the text file are selected, and after the plurality of lines of words are selected, an attribute selection window automatically pops up.
Here, the selected lines of text may be the first text content. Fig. 2B is a text file display interface according to an exemplary embodiment, shown in fig. 2B, when selected, "many genera can be further categorized as the same family (family), such as felidae (lion, cheetah, house cat), canidae (wolf, fox, jackal), elephant (elephant, elephant-foot, ivory). All members of the same family, "after this paragraph of text, the attribute selection window 201b may be displayed on the interface where this paragraph of text is located, and displayed in the attribute selection window 201 b: the system comprises a multi-selection control for enabling the electronic equipment to enter a multi-selection state, an editing control for receiving a copying operation, an editing control for receiving a marking operation and an editing control for receiving an adding annotation operation.
In step 202a, clicking on the multi-selection control in the property selection window continues to select multiple lines of text (second text content).
Here, after the multi-selection control is clicked, the continuously selected multiple lines of characters can be second text contents, and in the embodiment of the disclosure, after one second text content is selected, other second text contents can be continuously selected. Fig. 2C is another text file display interface according to an exemplary embodiment, as shown in fig. 2C, after the first text content 201C is selected, the second text content 202C may be selected, and after the second text content 202C is selected, the position of the attribute selection window 203C is updated so that the attribute selection window 203C is closer to the second text content 202C than to the first text content 201C.
In step 203a, after the first text content and the second text content are selected, all the selected first text content and second text content are subjected to editing operations of copying, drawing, commenting, and inputting ideas.
In other alternative embodiments, the coordinates of the text content may be determined by the movement trajectory of the operation body, so as to obtain the position of the text content, and implement the editing process on the text content at the corresponding position. The operating System of the electronic device may be an Android operating System or an Input Output System (IOS), and may also be other operating systems, which are not limited herein. The electronic equipment comprises the ink screen, for example, a mobile phone comprising the ink screen, an electronic book reader comprising the ink screen and the like, and the experience of reading of a user can be improved by arranging the ink screen.
The text file is in a multi-selection state based on the multi-selection control, the first text content and the second text content are simultaneously selected in the multi-selection state, and the first text content and the second text content are simultaneously edited, so that the characters can be conveniently marked by a user, and the reading experience of the user is improved.
FIG. 3 is a block diagram illustrating a text processing apparatus according to an example embodiment. As shown in fig. 3, the text processing apparatus 300 mainly includes:
the first detection module 301 is configured to detect a first operation instruction for first text content included in a text file displayed on the electronic device, where the first text content is in a selected state;
a second detecting module 302, configured to detect a second operation instruction for at least one second text content included in the text file, where the at least one second text content is in a selected state;
the editing module 303 is configured to perform editing processing on the first text content and the at least one second text content if a third operation instruction for the first text content and the at least one second text content in the selected state is detected.
In other alternative embodiments, the apparatus 300 further comprises:
the third detection module is configured to detect a fourth operation instruction aiming at the text file, and the text file enters a multi-selection state;
the second detection module is further configured to detect a second operation instruction for at least one second text content included in the text file in the multiple-selection state, where the at least one second text content is in the selected state.
In other alternative embodiments, the apparatus 300 further comprises:
the display module is configured to display an attribute selection window on a first display interface where the first text content is located;
the fourth detection module is configured to detect a third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the editing control in the attribute selection window; or,
detecting the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
In other alternative embodiments, the at least one second text content is located on a second display interface different from the first display interface; the apparatus 300 further comprises:
and the updating module is configured to update the display position of the attribute selection window from the first display interface to the second display interface when the at least one second text content is in the selected state.
In other optional embodiments, the at least one second text content is located on the first display interface, and the at least one second text content is located in a different position on the first display interface than the first text content;
the display module 302 is specifically configured to:
and displaying the attribute selection window on the first display interface at a position different from the at least one second text content and the first text content.
In other alternative embodiments, the apparatus 300 further comprises:
the first determining module is configured to determine the text line number of the text contained in the first text content;
a second determining module configured to determine whether the number of text lines is greater than a set line number threshold;
the display module is further specifically configured to:
and if the text line number is larger than the set line number threshold, displaying an attribute selection window on a first display interface where the first text content is located.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 4 is a block diagram illustrating a hardware configuration of a text processing apparatus 500 according to an exemplary embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 4, the apparatus 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, a sensor component 514, and a communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 502 may include one or more processors 520 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 520 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of a text processing apparatus, enable the text processing apparatus to perform a text processing method, the method comprising:
detecting a first operation instruction aiming at first text content contained in a text file, wherein the first text content is in a selected state;
detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
and if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected, editing the first text content and the at least one second text content.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A text processing method applied to an electronic device includes:
detecting a first operation instruction aiming at first text content contained in a text file, wherein the first text content is in a selected state;
detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
and if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected, editing the first text content and the at least one second text content.
2. The method of claim 1, further comprising:
detecting a fourth operation instruction aiming at the text file, and entering a multi-selection state;
the detecting a second operation instruction for at least one second text content contained in the text file, the at least one second text content being in a selected state, includes:
and under the multi-selection state, detecting a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state.
3. The method of claim 1, further comprising:
displaying an attribute selection window on a first display interface where the first text content is located;
detecting the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the editing control in the attribute selection window; or,
determining the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
4. The method of claim 3, wherein the at least one second text content is located on a second display interface different from the first display interface; the method further comprises the following steps:
and when the at least one second text content is in the selected state, updating the display position of the attribute selection window from the first display interface to the second display interface.
5. The method of claim 3, wherein the at least one second text content is located on the first display interface and is in a different location on the first display interface than the first text content;
the displaying of the attribute selection window on the first display interface where the first text content is located includes:
displaying the attribute selection window on the first display interface at a different location from the at least one second text content and the first text content.
6. The method of claim 3, further comprising:
determining the text line number of the text contained in the first text content;
determining whether the text line number is larger than a set line number threshold value;
the displaying of the attribute selection window on the first display interface where the first text content is located includes:
and if the text line number is larger than the set line number threshold, displaying the attribute selection window on a first display interface where the first text content is located.
7. A text processing apparatus applied to an electronic device includes:
the first detection module is configured to detect a first operation instruction aiming at first text content contained in a text file, wherein the first text content is in a selected state;
the second detection module is configured to detect a second operation instruction aiming at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
and the editing module is configured to edit the first text content and the at least one second text content if a third operation instruction aiming at the first text content and the at least one second text content in the selected state is detected.
8. The apparatus of claim 7, further comprising:
the third detection module is configured to detect a fourth operation instruction aiming at the text file and enter a multi-selection state;
the second detection module is further configured to detect a second operation instruction for at least one second text content included in the text file in the multiple-selection state, where the at least one second text content is in the selected state.
9. The apparatus of claim 7, further comprising:
the display module is configured to display an attribute selection window on a first display interface where the first text content is located;
a fourth detection module configured to detect the third operation instruction for the first text content and the at least one second text content in the selected state based on the edit control in the property selection window; or,
determining the third operation instruction aiming at the first text content and the at least one second text content in the selected state based on the received gesture information.
10. The apparatus of claim 9, wherein the at least one second text content is located on a second display interface different from the first display interface; the device further comprises:
and the updating module is configured to update the display position of the attribute selection window from the first display interface to the second display interface when the at least one second text content is in the selected state.
11. The apparatus of claim 9, wherein the at least one second text content is located on the first display interface and is in a different position on the first display interface than the first text content;
the display module is specifically configured to:
displaying the attribute selection window on the first display interface at a different location from the at least one second text content and the first text content.
12. The apparatus of claim 9, further comprising:
the first determining module is configured to determine the text line number of the text contained in the first text content;
a second determination module configured to determine whether the number of text lines is greater than a set line number threshold;
the display module is further specifically configured to:
and if the text line number is larger than the set line number threshold, displaying the attribute selection window on a first display interface where the first text content is located.
13. A text processing apparatus, comprising:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to: when executed, implement the steps of any of the text processing methods of claims 1-6 above.
14. A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a text processing apparatus, enable the apparatus to perform the text processing method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911098298.3A CN110929484B (en) | 2019-11-12 | 2019-11-12 | Text processing method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911098298.3A CN110929484B (en) | 2019-11-12 | 2019-11-12 | Text processing method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110929484A true CN110929484A (en) | 2020-03-27 |
CN110929484B CN110929484B (en) | 2023-09-26 |
Family
ID=69852697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911098298.3A Active CN110929484B (en) | 2019-11-12 | 2019-11-12 | Text processing method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110929484B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486377A (en) * | 2020-12-07 | 2021-03-12 | 网易(杭州)网络有限公司 | Text editing method and device and electronic equipment |
WO2024179342A1 (en) * | 2023-02-27 | 2024-09-06 | 北京字跳网络技术有限公司 | Text format setting method and apparatus, and electronic device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104375980A (en) * | 2014-11-18 | 2015-02-25 | 小米科技有限责任公司 | Selection method and device for text content |
US20150142162A1 (en) * | 2000-02-01 | 2015-05-21 | Peer Intellectual Property Inc. | Multi-protocol multi-client equipment server |
CN107765967A (en) * | 2017-10-18 | 2018-03-06 | 北京小米移动软件有限公司 | The choosing method and device of text |
CN107967097A (en) * | 2017-12-05 | 2018-04-27 | 北京小米移动软件有限公司 | Method for editing text and device |
-
2019
- 2019-11-12 CN CN201911098298.3A patent/CN110929484B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150142162A1 (en) * | 2000-02-01 | 2015-05-21 | Peer Intellectual Property Inc. | Multi-protocol multi-client equipment server |
CN104375980A (en) * | 2014-11-18 | 2015-02-25 | 小米科技有限责任公司 | Selection method and device for text content |
CN107765967A (en) * | 2017-10-18 | 2018-03-06 | 北京小米移动软件有限公司 | The choosing method and device of text |
CN107967097A (en) * | 2017-12-05 | 2018-04-27 | 北京小米移动软件有限公司 | Method for editing text and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486377A (en) * | 2020-12-07 | 2021-03-12 | 网易(杭州)网络有限公司 | Text editing method and device and electronic equipment |
WO2024179342A1 (en) * | 2023-02-27 | 2024-09-06 | 北京字跳网络技术有限公司 | Text format setting method and apparatus, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN110929484B (en) | 2023-09-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11256381B2 (en) | Method for providing message function and electronic device thereof | |
US10296201B2 (en) | Method and apparatus for text selection | |
CN107153541B (en) | Browsing interaction processing method and device | |
CN108664201B (en) | Text editing method and device and electronic equipment | |
US8842082B2 (en) | Device, method, and graphical user interface for navigating and annotating an electronic document | |
CN107688399B (en) | Input method and device and input device | |
CN106980409B (en) | Input control method and device | |
CN110968364B (en) | Method and device for adding shortcut plugins and intelligent device | |
CN107239351B (en) | Pasting method and device | |
JP2017525076A (en) | Character identification method, apparatus, program, and recording medium | |
CN109388810A (en) | A kind of data processing method, device and the device for data processing | |
CN112035031B (en) | Note generation method and device, electronic equipment and storage medium | |
CN107885571B (en) | Display page control method and device | |
KR20140113155A (en) | Mobile device and control method for the same | |
CN110929484B (en) | Text processing method, device and storage medium | |
CN107390974B (en) | Code searching method, device, terminal and storage medium for webpage debugging | |
CN106020694B (en) | Electronic equipment, and method and device for dynamically adjusting selected area | |
CN107340881B (en) | Input method and electronic equipment | |
CN108108356A (en) | A kind of character translation method, apparatus and equipment | |
CN108469913B (en) | Method, apparatus and storage medium for modifying input information | |
CN109388328B (en) | Input method, device and medium | |
CN112905023A (en) | Input error correction method and device for input error correction | |
CN109408623B (en) | Information processing method and device | |
CN109101170B (en) | Method and device for realizing page turning by utilizing fingerprint keys | |
US20150269270A1 (en) | Method and device for controlling page rollback |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |