CN110929484B - Text processing method, device and storage medium - Google Patents
Text processing method, device and storage medium Download PDFInfo
- Publication number
- CN110929484B CN110929484B CN201911098298.3A CN201911098298A CN110929484B CN 110929484 B CN110929484 B CN 110929484B CN 201911098298 A CN201911098298 A CN 201911098298A CN 110929484 B CN110929484 B CN 110929484B
- Authority
- CN
- China
- Prior art keywords
- text content
- text
- display interface
- operation instruction
- content
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 47
- 238000000034 method Methods 0.000 claims abstract description 45
- 238000001514 detection method Methods 0.000 claims description 15
- 238000004891 communication Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 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 3
- 241000283080 Proboscidea <mammal> Species 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000006978 adaptation 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
- 241000282465 Canis Species 0.000 description 1
- 241000282324 Felis Species 0.000 description 1
- 241000282326 Felis catus Species 0.000 description 1
- 241000282320 Panthera leo Species 0.000 description 1
- 241000282373 Panthera pardus Species 0.000 description 1
- 230000009471 action 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
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
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 disclosure relates to a text processing method, a device and a storage medium, wherein the method is applied to electronic equipment and comprises the following steps: detecting a first operation instruction for 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 for at least one second text content contained in the text file, wherein the at least one second text content is in a selected state; if a third operation instruction for the first text content and the at least one second text content in the selected state is detected, editing processing is performed on the first text content and the at least one second text content. Compared with the method for selecting a plurality of text contents in a text file for multiple times and editing each selected text content for multiple times, the method and the device for editing the text contents can simultaneously select the plurality of text contents and edit the selected plurality of text contents, are simple and convenient to operate, and meet the operation requirements of selecting the plurality of text contents and editing at one time.
Description
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a text processing method, a text processing device and a storage medium.
Background
Currently, electronic devices have been widely used in various fields of communication, entertainment, education, and the like. Taking a mobile terminal as an example, the mobile terminal has the advantages of convenience in carrying, acquisition and the like. More and more users prefer to use mobile terminals for transmission and reading of text files, which may include cell phones, tablet computers, e-book readers, etc.
After the user reads the text file based on the mobile terminal, the user may need to review or recall the text file again, and the text content of one text file usually contains a lot of words, at this time, the text content in the text file needs to be marked or edited for facilitating the 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 an embodiment of the present disclosure, there is provided a text processing method, applied to an electronic device, including:
detecting a first operation instruction for 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 for at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
If a third operation instruction for the first text content and the at least one second text content in the selected state is detected, editing processing is performed on the first text content and the at least one second text content.
Optionally, the method further comprises:
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, wherein the at least one second text content is in a selected state, includes:
and in the multi-selection state, detecting a second operation instruction for 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 comprises:
displaying an attribute selection window on a first display interface where the first text content is located;
detecting the third operation instruction for 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,
based on the received gesture information, the third operation instruction for the first text content and the at least one second text content in the selected state is determined.
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 steps of:
and updating 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 different from the first text content in position on the first display interface;
the displaying the attribute selection window on the first display interface where the first text content is located includes:
and displaying the attribute selection window on the first display interface at a different position from the at least one second text content and the first text content.
Optionally, the method further comprises:
determining the number of text lines of text contained in the first text content;
determining whether the number of lines of the text is larger than a set line number threshold;
the displaying the attribute selection window on the first display interface where the first text content is located includes:
and if the number of the text lines is larger than the set number of line threshold, displaying the attribute selection window on a first display interface where the first text content is located.
According to a second aspect of embodiments of the present disclosure, there is provided a text processing apparatus, applied to an electronic device, including:
a first detection module configured to detect a first operation instruction for a first text content included in a text file displayed on the electronic device, the first text content being in a selected state;
a second detection module configured to detect 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;
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 for the first text content and the at least one second text content in the selected state is detected.
Optionally, the apparatus further includes:
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 contained in the text file in the multi-selection state, where the at least one second text content is in the selected state.
Optionally, the apparatus further includes:
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 a selected state based on the edit control within the attribute selection window; or,
based on the received gesture information, the third operation instruction for the first text content and the at least one second text content in the selected state is determined.
Optionally, the at least one second text content is located on a second display interface different from the first display interface; the apparatus 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 different from the first text content in position on the first display interface;
The display module is specifically configured to:
and displaying the attribute selection window on the first display interface at a different position from the at least one second text content and the first text content.
Optionally, the apparatus further includes:
the first determining module is configured to determine the number of text lines of the text contained in the first text content;
a second determining module configured to determine whether the number of lines of text is greater than a set number of lines threshold;
the display module is further specifically configured to:
and if the number of the text lines is larger than the set number of line 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 in the first aspect 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, which when executed by a processor of a text processing apparatus, causes the apparatus to perform the text processing method in the first aspect described above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the technical scheme, the first text content and the at least one second text content can be simultaneously selected, and editing processing is simultaneously carried out on the selected first text content and the selected at least one second text content. Compared with the method for editing the text file, the method has the advantages that multiple text contents in the text file are required to be selected for multiple times, editing processing is performed on each selected text content for multiple times, the multiple text contents can be selected simultaneously, editing processing is performed on the selected multiple text contents simultaneously, operation is simple and convenient, and operation requirements of selecting the multiple text contents and editing at one time are 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 disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a text processing method according to an exemplary embodiment.
Fig. 2A is a flow chart illustrating another text processing method according to an exemplary embodiment.
FIG. 2B is a diagram illustrating a text file display interface in accordance with an exemplary embodiment.
FIG. 2C is another text file display interface shown in accordance with an exemplary embodiment.
Fig. 3 is a block diagram of a text processing device, according to an exemplary embodiment.
Fig. 4 is a block diagram showing a hardware configuration of a text processing apparatus according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a text processing method according to an exemplary embodiment, and as shown in fig. 1, the method is applied to an electronic device, the electronic device includes a mobile terminal and a fixed terminal, and the mobile terminal includes: a mobile phone, a tablet computer, a notebook computer, an electronic book reader and the like; the fixed terminal includes a personal computer or 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, the first text content being in a selected state;
in step 102, 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;
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, editing processing is performed on the first text content and the at least one second text content.
Here, the text file may be displayed on a display screen of the electronic device, and if the user is interested in the first text content included in the text file while reading the text file, the first operation instruction for the first text content may be input based on a touch screen of the electronic device. 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. The first operation instruction may be an instruction generated based on a click operation, a sliding operation and the like, for example, when the electronic device detects that an operation 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, at this time, the position of the first text content may be determined through sliding tracks of the first cursor and the second cursor, and the first text content is in a selected state, where the operation body may include a finger of a user or a stylus, 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: electronic books, web pages, public number push files, push files of reading applications.
Taking an electronic book in which a text file is in a text format displayed by a reader application installed on an electronic device as an example, when a user, during reading of the electronic book, is likely to feel that a certain paragraph or a certain sentence of a certain paragraph of the electronic book is important or very attractive when reading a certain portion of the text content of the electronic book, for example, the paragraph or the sentence is important or very attractive, the paragraph or the sentence may be selected, wherein the selected first text content may be the text content selected before the second text content.
After the electronic device executes the first operation instruction for the first text content, the first text content can be switched from the reading state to the selected state, the 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 the third operation instruction for the first text content and the at least one second text content in the selected state is detected, editing processing is performed on the first text content and the at least one second text content.
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 contacts the second position of the text file, a third cursor and a fourth cursor are displayed on the display screen of the electronic device, 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 the selected state. The operation body may include a finger or a stylus of a user, and since the first text content is also in the selected state during 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 may be updated to be the same as that of the first text content, so as to distinguish the first text content and the second text content in the selected state from other unselected text contents.
In the case where 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, editing processing may be performed on the selected first text content and at least one second text content at the same time.
In the embodiment of the disclosure, the first text content and the at least one second text content can be selected at the same time, and editing processing is performed on the selected first text content and the selected at least one second text content at the same time. Compared with the method for editing the text file, the method has the advantages that multiple text contents in the text file are required to be selected for multiple times, editing processing is performed on each selected text content for multiple times, the multiple text contents can be selected simultaneously, editing processing is performed on the selected multiple text contents simultaneously, operation is simple and convenient, and operation requirements of selecting the multiple text contents and editing at one time are met.
In other alternative 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 for at least one second text content contained in the text file, the at least one second text content being in a selected state, comprising:
In the multi-selection state, a second operation instruction for at least one second text content contained in the text file is detected, and the at least one second text content is in the selected state.
Here, the fourth operation instruction may be detected based on the multi-selection control displayed in the attribute selection window on the first display interface where the first text content is located, and if the fourth operation instruction for the multi-selection control in the attribute 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 performed on one or more text contents at the same time, so that a plurality of text contents are selected under a plurality of discrete operations and enter the selected state.
The electronic equipment selects the first text content based on the first operation instruction and simultaneously displays an attribute selection window on the first display interface. Thus, the first operation instruction 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 ended, that is, after controlling the electronic device to be in the multi-selection state, if a user is interested in one second text content contained in the text file, the second operation instruction for the second text content may be input based on the 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 put in the 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 contacts the second position of the text file, a third cursor and a fourth cursor are displayed on the display screen of the electronic device, 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 the selected state. The operation body may include a finger or a stylus of a user, and since the first text content is also in the selected state during 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 may be updated to be the same as that of the first text content, so as to distinguish the first text content and the second text content in the selected state from other unselected text contents.
In other alternative embodiments, the background color of the second text content in the selected state may also be updated to be different from the background color of the first text content in the selected state, so long as the first text content and the second text content in the selected state can be distinguished from other text content 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 can be continuously displayed in the attribute selection window, the text file enters the multi-selection state based on the fourth operation instruction for the multi-selection control, the next second text content is selected until the user finishes selecting, and editing processing is performed on all the selected text files.
Here, in the multi-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 editing process may be performed on the selected first text content and the at least one second text content at the same time.
In other optional embodiments, in the 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 editing process may be directly performed on the first text content, and after the editing process is performed on the first text content, the attribute selection window may be further displayed on the first display interface for displaying the first text content.
In the embodiment of the disclosure, the multi-selection state can be entered based on the fourth operation instruction of the multi-selection control in the attribute selection window of the first display interface where the first text content is located, so as to realize that the first text content and at least one second text content are simultaneously selected, and editing processing is simultaneously performed on the selected first text content and at least one second text content. Compared with the method for editing the text file, the method has the advantages that multiple text contents in the text file are required to be selected for multiple times, editing processing is performed on each selected text content for multiple times, the multiple text contents can be selected simultaneously, editing processing is performed on the selected multiple text contents simultaneously, operation is simple and convenient, and operation requirements of selecting the multiple text contents and editing at one time are met.
In other alternative 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 the selected state based on the editing control in the attribute selection window; or,
based on the received gesture information, the third operation instruction for the first text content and the at least one second text content in the selected state is detected.
Here, after the electronic device executes the first operation instruction for the first text content, an attribute selection window may be further displayed on the first display interface where the first text content is located, where a plurality of controls may be displayed in the attribute selection window, so that a user may input a corresponding operation based on the plurality of controls in the attribute selection window, for example, input a fourth operation instruction based on the multi-selection control in the attribute selection window, so that the electronic device enters a multi-selection state; and inputting a third operation instruction based on an 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 form, 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 disclosure, a plurality of editing controls may be set in the attribute selection window, so that corresponding third operation instructions may be respectively received based on the editing controls, where the third operation instructions may be a scribing operation instruction, a copying operation instruction, and the like. For example, detecting a scribing operation for a first text content and at least one second text content in a selected state by an editing control within a property selection window for receiving the scribing operation; a copy operation is detected for the first text content and the at least one second text content in the selected state by an edit control within the property selection window for receiving the copy operation. In this way, it is possible to simultaneously underline the first text content and the at least one second text content, or to simultaneously copy the first text content and the at least one second text content.
In other optional embodiments, when the attribute 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 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. Wherein, the different gesture signals have different operation instructions. For example, when it is detected that the operation body slides on the touch screen of the electronic device in a straight line trajectory, the slide gesture information may be received, and at this time, it may be determined that a third operation instruction for the first text content and the at least one second text content in the selected state is an underline addition operation instruction 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 except for 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 may be determined based on the gesture information, so that editing is directly performed on the first text content and the at least one second text content in the selected state based on the third operation instruction. In this case, by setting both the multi-selection control and the editing control in the attribute selection window, in the process of using by the user, the electronic device can be directly made to enter a multi-selection state based on the multi-selection control, and the third operation instruction is directly input based on the editing control in the attribute selection window or based on gesture information, and meanwhile, editing processing of the first text content and the second text content is achieved, so that 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 a first display position of first display of a first display page.
In other alternative embodiments, the at least one second text content is located on a second display interface that is different from the first display interface; the method further comprises the steps of:
and updating the display position of the attribute selection window from the first display interface to the second display interface when at least one second text content is in the selected state.
In addition, when 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 at least one second text content are in a selected state and the second text content is located 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 the next second text content, the multi-selection control in the attribute selection window displayed on the second display interface where the currently selected second text content is located can enter a multi-selection state directly, further the operation of selecting the next second text content is executed, and the operation does not need to return to the first display interface again to execute the 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 text content selection is added.
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 different from the first text content in position on the first display interface;
displaying an attribute selection window on a first display interface where the first text content is located, including:
and displaying an attribute selection window on the first display interface at a different position from at least one of the 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, e.g., different locations on the first display interface, and the attribute selection window is a different location of the first text content and the second text content displayed on the first display interface. Therefore, the attribute selection window does not shade the first text content and the second text content, and further the editing of the first text content and the second text content by a user is not affected, and the user experience can be improved.
In other alternative embodiments, the method further comprises:
determining the number of text lines of texts contained in the first text content;
determining whether the number of lines of the text is larger than a set line number threshold;
displaying an attribute selection window on a first display interface where the first text content is located, including:
And if the number of lines of the text 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 the attribute selection window is displayed, the number of text lines of the text included in the first text content may be determined first, and when the number of text lines is greater than the set function threshold, the attribute selection window is displayed on the first display interface where the first text content is located. Thus, the probability that the attribute selection window is displayed when not needed due to false touch generated on the text file when the user performs operations such as page turning or amplifying in the process of reading the text file can be reduced.
In other alternative embodiments, the method further comprises: detecting clicking operation aiming at the area outside the attribute selection window, and if detecting clicking operation aiming at the area outside the attribute selection window, enabling the attribute selection window to be in a hidden state; or detecting the hiding operation of the hiding control in the attribute selection window, and if the hiding operation of the hiding control in the attribute selection window is detected, enabling the attribute selection window to be in a hiding state.
In other alternative embodiments, the third operational instruction includes at least one of: the method comprises the following steps of adding annotation operation instructions, scribing operation instructions, word searching operation instructions, note adding operation instructions, bookmark adding operation instructions, sharing operation instructions, copying operation instructions, moving operation instructions and cutting operation instructions.
FIG. 2A is a flowchart illustrating another text processing method, as shown in FIG. 2A, according to an exemplary embodiment, the method comprising the steps of:
in step 201a, when a text file is read or edited, a plurality of lines of text (first text content) in the text file are selected, and after the plurality of lines of text are selected, an attribute selection window is automatically popped up.
Here, the selected plurality of lines of text may be the first text content. Fig. 2B is a diagram of a text file display interface, as shown in fig. 2B, in which "many genera can be reclassified as the same family" in choice, such as felines (lions, leopards, domestic cats), canines (wolves, foxes, jackals), elephants (elephants, long hair elephants, porcelains). All members of the same family, "after the text, the attribute selection window 201b may be displayed on the interface where the text is located, and the attribute selection window 201b may display: a multi-selection control for bringing the electronic device into a multi-selection state, an editing control for receiving a copy operation, an editing control for receiving a scribe operation, and an editing control for receiving an add annotation operation.
In step 202a, the multi-selection control in the property selection window is clicked, and the selection of multiple lines of text (second text content) continues.
Here, after clicking the multi-selection control, the plurality of lines of text that continue to be selected may be second text content, and in the embodiment of the present disclosure, after selecting one second text content, other second text content may also continue to be selected. Fig. 2C is another text file display interface shown in accordance with 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 the first text content 201C.
In step 203a, after the first text content and the second text content are selected, editing operations of copying, scribing, annotating, inputting ideas are performed on all the selected first text content and second text content.
In other optional embodiments, coordinates of the text content may be determined through a movement track of the operation body, so as to obtain a position of the text content, and implement editing processing of 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 (Input Output System, IOS), but may be other operating systems, which are not limited herein. The electronic equipment comprises the ink screen, such as a mobile phone comprising the ink screen, an electronic book reader comprising the ink screen and the like, and by arranging the ink screen, the experience of reading by a user can be improved.
Here, through setting up the multiple selection control, make text file in the multiple selection state based on the multiple selection control to select first text content and second text content simultaneously under the multiple selection state, and edit processing is carried out to first text content and second text content simultaneously, can be convenient for user mark characters, promote user's reading experience.
Fig. 3 is a block diagram of a text processing device, according to an exemplary embodiment. As shown in fig. 3, the text processing apparatus 300 mainly includes:
a first detection module 301 configured to detect a first operation instruction for a first text content included in a text file displayed on an electronic device, the first text content being in a selected state;
a second detection module 302 configured to detect 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;
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 contained in the text file in the multi-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;
a fourth detection module configured to detect a third operation instruction for the first text content and the at least one second text content in the selected state based on the editing control within the attribute selection window; or,
based on the received gesture information, the 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 at least one second text content is located on a second display interface that is 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 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 different from the first text content in position on the first display interface;
the display module 302 is specifically configured to:
and displaying an attribute selection window on the first display interface at a different position from at least one of the 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 number of text lines of the text contained in the first text content;
the second determining module is configured to determine whether the number of lines of the text is larger than a set line number threshold;
the display module is also specifically configured to:
and if the number of lines of the text 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.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 4 is a block diagram of a hardware architecture of a text processing device 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, or the like.
Referring to fig. 4, 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 apparatus 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interactions 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 the apparatus 500, contact data, phonebook data, messages, pictures, videos, and the like. The memory 504 may be implemented by any type or combination of volatile or nonvolatile 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 disk.
The power component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 500.
The multimedia component 508 includes a screen between the device 500 and the user that provides an output interface. 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 input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also 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-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 500 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a Microphone (MIC) configured to receive external audio signals when the device 500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 504 or transmitted via the communication component 516. In some embodiments, the audio component 510 further comprises 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: homepage button, volume button, start button, and lock button.
The sensor assembly 514 includes one or more sensors for providing status assessment of various aspects of the apparatus 500. For example, the sensor assembly 514 may detect the on/off state of the device 500, the relative positioning of the components, such as the display and keypad of the device 500, the sensor assembly 514 may also detect a change in position of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration/deceleration of the device 500, and a change in temperature of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects 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 gyroscopic 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 one exemplary embodiment, the communication component 516 receives broadcast signals 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, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as memory 504, including instructions executable by processor 520 of apparatus 500 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of a text processing device, causes the text processing device to perform a method of text processing, 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 for at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
if a third operation instruction for the first text content and the at least one second text content in the selected state is detected, editing processing is performed on 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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A text processing method, applied to an electronic device, 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 for at least one second text content contained in the text file, wherein the at least one second text content is in a selected state;
if a third operation instruction for 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;
displaying an attribute selection window on a first display interface where the first text content is located;
determining the third operation instruction for the first text content and the at least one second text content in the selected state based on the received gesture information;
Determining the number of text lines of text contained in the first text content;
determining whether the number of lines of the text is larger than a set line number threshold;
the displaying the attribute selection window on the first display interface where the first text content is located includes:
and if the number of the text lines is larger than the set number of line threshold, displaying the attribute selection window on a first display interface where the first text content is located.
2. The method according to claim 1, wherein the method further comprises:
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, wherein the at least one second text content is in a selected state, includes:
and in the multi-selection state, detecting a second operation instruction for 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, 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 steps of:
And updating 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.
4. The method of claim 1, wherein 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 location on the first display interface than the first text content;
the displaying the attribute selection window on the first display interface where the first text content is located includes:
and displaying the attribute selection window on the first display interface at a different position from the at least one second text content and the first text content.
5. A text processing apparatus, characterized by being applied to an electronic device, comprising:
the first detection module is configured to detect a first operation instruction for first text content contained in the text file, wherein the first text content is in a selected state;
a second detection module configured to detect 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;
An editing module 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 a selected state is detected;
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 determine the third operation instruction for the first text content and the at least one second text content in a selected state based on the received gesture information;
the apparatus further comprises:
the first determining module is configured to determine the number of text lines of the text contained in the first text content;
a second determining module configured to determine whether the number of lines of text is greater than a set number of lines threshold;
the display module is further specifically configured to:
and if the number of the text lines is larger than the set number of line threshold, displaying the attribute selection window on a first display interface where the first text content is located.
6. The apparatus of claim 5, wherein 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 contained in the text file in the multi-selection state, where the at least one second text content is in the selected state.
7. The apparatus of claim 5, wherein the at least one second text content is located on a second display interface different from the first display interface; the apparatus 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.
8. The apparatus of claim 5, wherein the at least one second text content is located on the first display interface and the at least one second text content is different from the first text content in location on the first display interface;
the display module is specifically configured to:
and displaying the attribute selection window on the first display interface at a different position from the at least one second text content and the first text content.
9. A text processing apparatus, comprising:
a processor;
a memory configured to store processor-executable instructions;
wherein the processor is configured to: the steps of the text processing method of any of the preceding claims 1 to 4 are implemented when executed.
10. A non-transitory computer readable storage medium, which when executed by a processor of a text processing apparatus, causes the apparatus to perform the text processing method of any of the preceding claims 1 to 4.
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 CN110929484A (en) | 2020-03-27 |
CN110929484B true 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) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486377B (en) * | 2020-12-07 | 2022-07-12 | 网易(杭州)网络有限公司 | Text editing method and device and electronic equipment |
CN116151189A (en) * | 2023-02-27 | 2023-05-23 | 北京字跳网络技术有限公司 | Text format setting method and device and electronic equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9785140B2 (en) * | 2000-02-01 | 2017-10-10 | Peer Intellectual Property Inc. | Multi-protocol multi-client equipment server |
-
2019
- 2019-11-12 CN CN201911098298.3A patent/CN110929484B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
Also Published As
Publication number | Publication date |
---|---|
CN110929484A (en) | 2020-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10296201B2 (en) | Method and apparatus for text selection | |
CN107153541B (en) | Browsing interaction processing method and device | |
US10936798B2 (en) | Text editing method, device, and electronic apparatus | |
CN109683714B (en) | Multimedia resource management method, device and storage medium | |
CN106489129A (en) | The method and device that a kind of content is shared | |
CN106980409B (en) | Input control method and device | |
CN110968364B (en) | Method and device for adding shortcut plugins and intelligent device | |
CN105786944B (en) | Method and device for processing automatic page turning of browser | |
CN105045504A (en) | Image content extraction method and apparatus | |
CN107239351B (en) | Pasting method and device | |
WO2020042468A1 (en) | Data processing method and device, and device for processing data | |
CN110110315B (en) | To-do item management method and device | |
CN107885571B (en) | Display page control method and device | |
JP2017525076A (en) | Character identification method, apparatus, program, and recording medium | |
CN106095236A (en) | The method and device of arranging desktop icons | |
CN104216973A (en) | Data search method and data search device | |
CN110929484B (en) | Text processing method, device and storage medium | |
CN112035031A (en) | Note generation method and device, electronic equipment and storage medium | |
CN115661301A (en) | Method for adding annotations, electronic device, storage medium and program product | |
CN108874758B (en) | Note processing method and device, and device for note processing | |
CN107077269A (en) | Application Hints method and device | |
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 | |
CN113360051A (en) | Search prompting method and device, mobile terminal and storage medium |
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 |