CN114912421A - Text processing method, text editor, readable medium and electronic device - Google Patents
Text processing method, text editor, readable medium and electronic device Download PDFInfo
- Publication number
- CN114912421A CN114912421A CN202110183126.7A CN202110183126A CN114912421A CN 114912421 A CN114912421 A CN 114912421A CN 202110183126 A CN202110183126 A CN 202110183126A CN 114912421 A CN114912421 A CN 114912421A
- Authority
- CN
- China
- Prior art keywords
- text
- content
- user
- editor
- text editor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
Abstract
The application relates to a text processing method, a text editor, a readable medium and an electronic device. The method comprises the following steps: determining first content selected by a user from texts in a text editor as reference texts by the text editor of the electronic equipment; in the case where the text editor detects that the user has modified second content identical to the first content at the first position of the text, the text editor performs the same modification on third content identical to the first content at the second position of the text. The method and the device store the content selected by the user from the text of the text editor or automatically store some content appearing in the text as the reference text. When a user modifies a reference text at a certain position in the text, the same content in the text as the modified reference text is automatically found out by matching the stored reference text, and the found content is modified similarly. The method can greatly improve the text editing efficiency and can also avoid the situations of missed modification and false modification.
Description
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a text processing method, a text editor, a readable medium, and an electronic device.
Background
With the development of terminal technologies, mobile terminals (such as smart phones, tablet computers, Personal Digital Assistants (PDAs), etc.) are becoming more intelligent and diversified. In the daily life of users, more and more needs are needed to be fulfilled by editing texts in a mobile terminal, for example, chatting through chatting software installed on the mobile terminal, editing office files, academic/scientific works, and the like through office software installed on the mobile terminal.
During editing, users often encounter situations that require many of the same contents in the edited file to be modified. Especially for large-space literature works, scientific works and the like, wherein the same words or the same paragraphs are more, when a plurality of same contents needing to be modified are modified, the related contents can be manually selected one by one for modification, or full-text search is firstly carried out and then modification or replacement is carried out. Therefore, one or more contents needing to be modified are often missed, or some contents are added again in the subsequent editing process, and need to be selected one by one again for modification, so that the efficiency is low, and the omission of the content is easy.
Disclosure of Invention
The embodiment of the application provides a text processing method, a text editor, a readable medium and electronic equipment. According to the technical scheme, in the process of editing the text by the user, the text editor used by the user can store the content selected by the user from the text or some content appearing in the text as the reference text, when the user modifies the reference text at a certain position in the text, the text editor can automatically find out the content in the text, which is the same as the modified reference text, by matching the stored reference text, and also modify the found content in a same manner, so that linkage modification is realized. According to the technical scheme, the text editing efficiency is greatly improved, and meanwhile the situations of missed modification and false modification can be avoided.
In a first aspect, an embodiment of the present application provides a text processing method, including: determining first content selected by a user from texts in a text editor as reference texts by the text editor of the electronic equipment; in the case where the text editor detects that the user has modified second content identical to the first content at the first position of the text, the text editor performs the same modification on third content identical to the first content at the second position of the text.
Here, the "cited text" is only an exemplary description of the present application, and the present application is not limited thereto, and the term may be other names such as "reference text" and the like.
The text editor may be used by a user to edit plain text, or may be used by a user to edit rich text, such as text, pictures, audio, video, and the like.
In some embodiments, the first location and the second location may be the same location in the text of the text editor. In some embodiments, the first position and the second position may also be two different positions.
In some embodiments, the first content selected by the user from the text in the text editor may be user-selected by a cursor. In some embodiments, the text editor may automatically prompt the user whether to set the first content as reference text.
In one possible implementation of the first aspect, the first content includes at least one of a character and an image. For example, the first content may be a character or a character set (e.g., a word, a punctuation, or a sentence), a picture, video, audio, or the like.
In a possible implementation of the first aspect, determining, by a text editor of the electronic device, first content selected by a user from text in the text editor as reference text includes:
when detecting that a plurality of positions in the text have the same content as the first content, the text editor prompts a user whether to set the first content as a reference text;
in a case where the user determines to set the first content as the reference text, the text editor determines the first content as the reference text.
In a possible implementation of the first aspect, determining, by a text editor of the electronic device, first content selected by a user from text in the text editor as reference text includes:
receiving a trigger event bound to a user selecting first content from text in a text editor by a text editor of an electronic device;
the method comprises the steps that a text editor obtains first content selected by a user from a text in the text editor;
the text editor packages the first content according to a preset data packaging format to obtain packaged data;
the text editor stores the encapsulated data.
In one possible implementation of the first aspect, the text editor includes a reference text operation menu, and the triggering event bound to the user selecting the first content from the text in the text editor includes: and clicking the reference text operation menu after the user selects the first content through the cursor.
Here, the reference text operation menu is only an exemplary illustration of the present application, and the present application is not limited thereto, and the term may be other names, such as "reference text operation button" and the like.
In a possible implementation of the first aspect, the storing the encapsulated data includes: and storing the packaged data in at least one of a database and a setting file.
In a possible implementation of the first aspect, in the case that the text editor detects that the user modifies second content, which is identical to the first content, at the first position of the text, the text editor performs the same modification on third content, which is identical to the first content, at the second position of the text, including:
a text editor of the electronic equipment monitors that a user modifies second content which is the same as first content at a first position of a text, and then modified second content is obtained;
traversing the text by the text editor to obtain a second position where third content identical to the first content is located in the text;
the text editor replaces third content identical to the first content at the second position of the text with the same content as the modified second content.
In one possible implementation of the first aspect, the method further includes: when the replacement operation of the reference text of the first content by the user is detected, the text editor replaces the same content as the first content appearing at a plurality of positions in the text with the content to be replaced by the user. The text replacement efficiency can be improved.
In one possible implementation of the first aspect, the first content includes a plurality of characters, and the method further includes:
in the case where the text editor detects that the user has entered a partial character of the first content at the third location, displaying all characters of the first content to the user;
in a case where it is detected that the user has clicked on all the characters of the displayed first content, all the characters of the first content are added at the third position.
For example, the text editor detects that the user inputs "SM" at the current cursor position, the text editor automatically associates "SMTP protocol", "SMT forum", and the like beginning with "SM" for the user to select, and after the user clicks to select "SMTP protocol", the text editor inserts "SMTP protocol" at the current cursor position. The function of associative input is realized, and the editing efficiency can be improved.
In a possible implementation of the first aspect, the method further includes: a text editor of the electronic device is created based on a WebView control loading Html template.
In one possible implementation of the foregoing first aspect, the determining, by a text editor of the electronic device of the foregoing method, first content selected by a user from text in the text editor as reference text includes:
and calling Javascript script codes by the WebView control of the electronic equipment, and determining first content selected by a user from the text in the text editor as reference text.
In a possible implementation of the first aspect, in the case that the text editor detects that the user modifies second content, which is identical to the first content, at the first position of the text, the text editor performs the same modification on third content, which is identical to the first content, at the second position of the text, including:
and the WebView control of the electronic equipment calls the Javascript codes, and under the condition that the user is detected to modify second content, identical to the first content, at the first position of the text, the third content, identical to the first content, at the second position of the text is modified in the same way.
In a second aspect, the present application provides a text editor, including a text input box, a reference text operation menu, a reference text determining unit, and a linkage modifying unit;
a text input box for providing an interface for a user to edit text in a text editor;
a reference text determining unit, configured to determine, as a reference text, a first content selected by a user from a text in a text editor in a case where it is detected that the user selects the first content in the text editor and clicks a reference text operation menu;
and the linkage modification unit is used for modifying third content which is identical to the first content at the second position of the text in the same way under the condition that the user is detected to modify the second content which is identical to the first content at the first position of the text.
In one possible implementation of the second aspect, the first content includes at least one of a character and an image.
In one possible implementation of the second aspect, the reference text determining unit determines the first content selected by the user from the text in the text editor as the reference text by:
when detecting that a plurality of positions in the text have the same content as the first content, the reference text determining unit prompts a user whether to set the first content as the reference text;
in a case where the user determines to set the first content as the reference text, the reference text determining unit determines the first content as the reference text.
In one possible implementation of the second aspect, the reference text determining unit determines the first content selected by the user from the text in the text editor as the reference text by:
a reference text determining unit receives a trigger event bound to a user selecting a first content from a text in a text editor;
a reference text determining unit acquires first content selected by a user from a text in a text editor;
the reference text determining unit packages the first content according to a preset data packaging format to obtain packaged data;
the reference text determining unit stores the encapsulated data.
In one possible implementation of the second aspect, the linkage modification unit performs the same modification on a third content identical to the first content at the second position of the text in the case that the user is detected to modify the second content identical to the first content at the first position of the text by:
the linkage modification unit monitors that a user modifies second content which is the same as the first content at a first position of a text, and then modified second content is obtained;
the linkage modification unit traverses the text to obtain a second position where a third content identical to the first content is located in the text;
the linkage modification unit replaces third content, which is the same as the first content, at a second position of the text with content that is the same as the modified second content.
In one possible implementation of the second aspect, the text editor further includes: and the unified replacing unit is used for replacing the content which appears at a plurality of positions in the text and is the same as the first content with the content to be replaced by the user under the condition that the replacing operation of the reference text of the first content by the user is detected.
In one possible implementation of the second aspect, the first content includes a plurality of characters, and the text editor further includes:
an association input unit for displaying all characters of the first content to the user in a case where it is detected that the user inputs a partial character of the first content at the third position; in a case where it is detected that the user has clicked on all the characters of the displayed first content, all the characters of the first content are added at the third position.
In a possible implementation of the second aspect, the text editor further includes: and the reference text display unit is used for displaying the determined reference text under the condition that the user clicks the reference text operation menu.
In a third aspect, an embodiment of the present application provides a readable medium, where instructions are stored on the readable medium, and when executed on an electronic device, the instructions cause the electronic device to perform the first aspect and any one of various possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing instructions for execution by one or more processors of the electronic device, an
The processor, which is one of the processors of the electronic device, is configured to execute any one of the text processing methods of the first aspect and various possible implementations of the first aspect.
Drawings
FIG. 1(a) shows a user interface schematic of a user clicking on an editor icon of a cell phone, according to some embodiments of the present application;
FIG. 1(b) shows a schematic view of an initial interface after a user opens an editor installed on a cell phone, according to some embodiments of the present application;
FIG. 1(c) is a schematic diagram illustrating an interface for a user to enter text in an editing content entry box according to some embodiments of the present application;
FIG. 1(d) is a schematic diagram illustrating an interface where a user clicks on a reference text menu selection "SMTP protocol" to insert a current cursor location, according to some embodiments of the present application;
FIG. 1(e) is a schematic interface diagram illustrating automatic association of multiple candidate reference texts after a user input of "SM", according to some embodiments of the present application;
FIG. 1(f) is a schematic interface diagram illustrating a user selecting "SMTP protocol" from a plurality of automatically associated candidate reference texts to insert a current cursor position, according to some embodiments of the present application;
FIG. 1(g) illustrates an interface diagram of clicking on a reference text to directly modify the "SMTP protocol" to the "SMTP protocol" from a popped up list of application texts, according to some embodiments of the present application;
FIG. 1(h) illustrates an interface diagram where a user modifies one place of the "SMTP protocol" to the "SMTP protocol" and another place of the "SMTP protocol" to the "SMTP protocol" in conjunction, directly in the content input box of the editor, according to some embodiments of the present application;
FIG. 2 illustrates a hardware architecture diagram of a handset, according to some embodiments of the present application;
FIG. 3 illustrates a flow diagram for creating a citation text, according to some embodiments of the present application;
FIG. 4(a) is an interface diagram showing a user clicking on a reference text menu after selecting "SMTP protocol", according to some embodiments of the present application;
FIG. 4(b) is a schematic diagram illustrating an interface for a handset to add a user-selected "SMTP protocol" to a pop-up list of reference texts, according to some embodiments of the present application;
FIG. 5 illustrates a flow diagram for a user using the added reference text, according to some embodiments of the application;
FIG. 6(a) illustrates a user input "SM" with the handset automatically associating a plurality of interface diagrams of reference text beginning with "SM", in accordance with some embodiments of the present application;
FIG. 6(b) is a schematic interface diagram illustrating a user selecting "SMTP protocol" from a plurality of candidate reference texts and inserting a current cursor location, according to some embodiments of the application;
FIG. 6(c) is a schematic diagram illustrating an interface where a user clicks on a reference text menu, selects "SMTP protocol" from a pop-up list of reference texts, and inserts the current cursor location, according to some embodiments of the present application;
FIG. 7 illustrates a flow diagram for a user modifying added reference text, according to some embodiments of the present application;
fig. 8(a) shows a total of 5 "SMTP protocols" occurring in user-edited text, according to some embodiments of the present application;
FIG. 8(b) is an interface diagram illustrating a user directly modifying a "SMTP protocol" to "SMTP protocol" in a content input box, according to some embodiments of the present application;
FIG. 8(c) is an interface diagram illustrating the cell phone modifying the additional 4 "SMTP protocol" linkages previously edited in the content input box to "SMTP protocol", in accordance with some embodiments of the present application;
FIG. 9(a) is a schematic interface diagram illustrating a user clicking on a reference text menu to directly modify the "SMTP protocol" linkage in the popped-up reference text list to the "SMTP protocol", according to some embodiments of the present application;
fig. 9(b) shows an interface schematic diagram of the mobile phone directly modifying the "SMTP protocol" at 5 points in the content edited by the user into the "SMTP protocol" after the user modifies the "SMTP protocol" linkage in the reference text list into the "SMTP protocol", according to some embodiments of the present application.
FIG. 10 illustrates a schematic block diagram of a text editor, in accordance with some embodiments of the present application.
Detailed Description
Illustrative embodiments of the present application include, but are not limited to, text processing methods, text editors, readable media, and electronic devices.
In the text processing method, in the process of editing the text by the user, the text editor used by the user can store the content selected by the user from the text or automatically store some characters or character sets (such as characters, words, punctuations or sentences) appearing in the text as the reference text. Then, when the user modifies the reference text at a certain position in the document, the text editor can automatically find out the characters or character sets in the text which are the same as the modified reference text by matching the stored reference text, and perform the same modification on the found characters or character sets, for example, the text editor obtains the modified reference text by monitoring the change of the input content of the user, and then replaces all the same characters or character sets found from the text with the modified reference text, thereby realizing the linkage modification. For example, the user selects to set "Web server" appearing in the text as the reference text, and as the user inputs, reference text of "Web server" appears in the text in a plurality of places, and when the user modifies "Web server" in a certain place in the text to "Web server", the "Web server" in the other places in the text will be automatically modified to "Web server" by the text editor. Therefore, the user can replace all the same characters or character sets searched from the text by the modified reference text by modifying the reference text, and linkage modification is realized. The text editing efficiency is greatly improved, and meanwhile the situations of missed alteration and wrong alteration can be avoided.
To facilitate understanding of the present solution, the following explains key terms used in the present solution.
A Rich Text Editor (RTE for short) is a Text Editor that can be embedded in a browser, which is known as a wysiwyg Editor. For convenience of explanation, the following describes the technical solution of the present application by taking a rich text editor as an example. It can be understood that the technical solution of the present application can be applied to any text editor, and is not limited to a rich text editor, for example, a text editor that can edit plain text, and the like.
WebView, a "web view," is a built-in high-performance kernel browser in an electronic device, and is a component encapsulated in a Software Development Kit (SDK). Is a view control that may be used to present web page content.
JavaScript is an transliterated scripting language, and is widely used for clients.
Html (HyperText Markup Language), a structure includes a "header" part that provides information about a web page and a "body" part that provides specific contents of the web page.
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1(a) illustrates a desktop view of an electronic device 10 having a rich text editor icon 11 on the desktop as shown, according to some embodiments of the present application. The user may click on the rich text editor icon 11 to open a user interface diagram for the rich text editor for text editing. As shown in fig. 1(b), when the user clicks an icon 11 of the rich text editor by a finger, the electronic device 10 opens the rich text editor for the user to edit the text. The user can perform text editing in the blank content entry box of the rich text editor shown in fig. 1(b) by clicking on the keyboard shown in fig. 1 (b). For example, the user logs in a diary, a movie review, a book review, makes a note, records a memo item, and the like through the editor. It should be noted that, besides inputting characters in the rich text editor, the user can add any contents supported by Html, such as pictures.
In particular, when a user edits papers, patents, scientific works, etc. through a rich text editor, there are many nouns, sentences, paragraphs that are used repeatedly due to the length of the book. For example, in the embodiment shown in fig. 1(c), the user is currently editing the relevant content about "email protocol", and the words "SMTP protocol", "POP 3", "TCP/IP protocol" are used multiple times therein. In order to improve editing efficiency, the user may select the words such as "SMTP protocol", "POP 3", "TCP/IP protocol", etc. respectively, click the reference text operation menu of the rich text editor interface of the electronic device 10, and the electronic device 10 adds the words such as "SMTP protocol", "POP 3", "TCP/IP protocol", etc. selected by the user to the reference text database by executing the text editing method provided in the embodiment of the present application, that is, newly creates the reference text. It is to be understood that the above "cited text" is only an exemplary illustration of the present application, and the present application is not limited thereto, and the term may be other names, such as "reference text" and the like.
In some embodiments, when the user pre-inputs again a word appearing repeatedly a plurality of times, such as "SMTP protocol", "POP 3", "TCP/IP protocol", etc., the list of reference texts in the embodiment shown in fig. 1(d) may POP up by clicking the reference text operation menu. The user selects a reference text from the pop-up list, for example, selecting "SMTP protocol", and inserts the selected reference text into the current cursor position. In addition, when the user uses the words such as the "SMTP protocol", "POP 3", "TCP/IP protocol" repeatedly appearing many times again, only part of the words in the complete words to be edited needs to be input, and the electronic device 10 can automatically associate the complete words corresponding to the part of the words currently input by the user by executing the text editing method provided by the embodiment of the present application. For example, in the embodiment shown in fig. 1(e), the user inputs "SM", the electronic device 10 automatically associates "SMTP protocol" and "SMT process" by executing the text editing method provided in the embodiment of the present application, and the user clicks and selects "SMTP protocol", so that the "SMTP protocol" can be inserted into the position where the current cursor is located in the user interface shown in fig. 1(f), and displayed. Therefore, the user does not need to input characters one by one, and the editing efficiency of the user can be improved.
In some embodiments, when a user checks text that has already been edited, partial terms are found to be non-uniform. For example, in the embodiment shown in fig. 1(g), two places "SMTP protocol" and two places "SMTP protocol" appear in the text edited by the user. The user wants to modify the two places "SMTP protocol" to ensure that the terms are uniform. The reference text operation menu of the rich text editor interface of the electronic device 10 may be clicked to modify the "SMTP protocol" that has been added to the reference text database into the "SMTP protocol", and the electronic device 10 modifies all the "SMTP protocols" that appear in the text that the user has edited into the "SMTP protocol" by executing the text editing method provided by the embodiment of the present application. In addition, the user may also make content modifications directly at the locations where modifications are needed. For example, in the embodiment shown in fig. 1(h), the user selects one "SMTP protocol" in the content input box, and modifies it directly to "SMTP protocol", and the electronic device 10 may implement that another "SMTP protocol" is also modified to "SMTP protocol" correspondingly by executing the text editing method provided in the embodiment of the present application. And realizing linkage modification. The modification efficiency is greatly improved, and the condition of missing modification and wrong modification can be avoided.
Where the electronic device 10 includes, but is not limited to, a tablet, a smart phone, a laptop computer, a desktop computer, a wearable electronic device, a head-mounted display, a mobile email device, a portable game console, a portable music player, a reader device, and the like, where the wearable electronic device includes, but is not limited to, a smart watch, a smart band or smart glasses, a smart helmet, a smart headband, and the like.
For convenience of explanation, the electronic device 10 is taken as a mobile phone, and the embodiments of the present application are described in detail with reference to fig. 2 to 10.
Fig. 2 shows a hardware structure diagram of the mobile phone 10 according to an embodiment of the present application. The mobile phone 10 can execute the text processing method provided in the embodiment of the present application. In fig. 2, similar components have the same reference numerals. As shown in fig. 2, the mobile phone 10 may include a processor 110, a power module 140, a memory 180, a camera 170, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, an interface module 160, and a touch display screen 102, etc.
It is to be understood that the illustrated structure of the embodiment of the present invention is not intended to limit the handset 10. In other embodiments of the present application, the handset 10 may include more or fewer components than shown, or some components may be combined, some components may be separated, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more Processing units, for example, Processing modules or Processing circuits that may include a central Processing Unit (cpu), (central Processing Unit), an image Processing Unit (gpu), (graphics Processing Unit), a Digital Signal Processor (DSP), a Micro-programmed Control Unit (MCU), an Artificial Intelligence (AI) processor, or a Programmable logic device (fpga), (field Programmable Gate array), etc. The different processing units may be separate devices or may be integrated into one or more processors. For example, in some examples of the present application, the processor 110 may be configured to obtain content input by a user in text editing, perform data encapsulation on the content input by the user according to a specific format, and perform persistent storage. And acquiring the change of the content input by the user, realizing linkage modification and the like.
The memory 180 may store an operating system and an application program (for example, an application program that may be used by a user for text editing) required by at least one function, and the memory 180 may also store reference text data that a user clicks a reference text operation menu to trigger the WebView control of the mobile phone 10 to call JavaScript for addition, and the like.
The power module 140 may include a power supply, power management components, and the like. The power source may be a battery. The power management component is used for managing the charging of the power supply and the power supply of the power supply to other modules. The charging management module is used for receiving charging input from the charger; the power management module is used for connecting a power supply, the charging management module and the processor 110.
The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, a Low Noise Amplifier (LNA), and the like. The mobile communication module 130 may provide a solution including wireless communication of 2G/3G/4G/5G and the like applied to the handset 10. The mobile communication module 130 may receive electromagnetic waves from the antenna, filter, amplify, etc. the received electromagnetic waves, and transmit the electromagnetic waves to the modem processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be disposed in the same device as at least some of the modules of the processor 110.
The wireless communication module 120 may include an antenna, and implement transceiving of electromagnetic waves via the antenna. The wireless communication module 120 may provide a solution for wireless communication applied to the mobile phone 10, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (blue tooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The handset 10 may communicate with a network and other devices via wireless communication techniques.
In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the handset 10 may also be located in the same module.
The camera 170 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The light receiving element converts an optical Signal into an electrical Signal, and then transmits the electrical Signal to an ISP (Image Signal Processing) to convert the electrical Signal into a digital Image Signal. The mobile phone 10 may implement a shooting function through an ISP, a camera 170, a video codec, a GPU (graphics Processing Unit), the touch screen 102, an application processor, and the like.
The touch display screen 102 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-OLED, a quantum dot light-emitting diode (QLED), or the like. For example, the display screen 102 is used to display an interface of a text editor of the handset 10, or the like.
The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
The audio module 150 may convert digital audio information into an analog audio signal output or convert an analog audio input into a digital audio signal. The audio module 150 may also be used to encode and decode audio signals. In some embodiments, the audio module 150 may be disposed in the processor 110, or some functional modules of the audio module 150 may be disposed in the processor 110. In some embodiments, audio module 150 may include speakers, earphones, a microphone, and a headphone interface.
The interface module 160 includes an external memory interface, a Universal Serial Bus (USB) interface, a Subscriber Identity Module (SIM) card interface, and the like. The external memory interface may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the mobile phone 10. The external memory card communicates with the processor 110 through an external memory interface to implement a data storage function. The usb interface is used for the handset 10 to communicate with other handsets. The SIM card interface is used to communicate with a SIM card mounted to the handset 10, for example to read a telephone number stored in the SIM card, or to write a telephone number into the SIM card.
In some embodiments, the handset 10 also includes keys, motors, indicators, and the like. The keys may include a volume key, an on/off key, and the like. The motor is used to cause a vibration effect to the handset 10, for example when the user's handset 10 is being called, to prompt the user to answer an incoming call to the handset 10. The indicators may include laser indicators, radio frequency indicators, LED indicators, and the like.
With reference to fig. 1, fig. 3, and fig. 4, a detailed description will be given of a process of creating, by the mobile phone 10 through the text editing method provided in the embodiment of the present application, content in a text selected by a user as a reference text when the user edits a rich text through the mobile phone 10.
As shown in fig. 3, the specific process of creating the reference text includes:
step 300: the user opens the rich text editor installed on the handset 10.
For example, in the embodiment shown in fig. 1(a), after the user clicks the icon 11 of the rich text editor by a finger, the mobile phone 10 opens the rich text editor. The user can edit text in the blank content entry box of the rich text editor shown in fig. 1(b) by clicking on the keyboard shown in fig. 1 (b). For example, in the embodiment shown in FIG. 1(c), the user is currently editing the relevant content for "email protocol".
In some embodiments, the rich text editor may be a rich text editor that may bear a web page view created by a developer loading a formatted standard Html template through a WebView control on an android platform. And then mounted to the handset 10. The rich text editor may include, among other things, an operating menu and a content entry box. The user may enter text, pictures, audio, video, forms, etc. in the content input box. And the content input in the content input box can be operated by clicking the operation menu, for example, the font, color, background, etc. of the text in the content input box can be set by clicking the operation menu, and pictures, formulas, etc. can be inserted.
For example, in the embodiment shown in FIG. 4, a user interface is shown for a user to perform text editing via a rich text editor installed on the handset 10. Wherein, the menu of 'undo', 'restore', 'font', 'add picture' and 'quote text' is set under the content input box. The user can input characters and insert pictures in the content input box. The user can cancel any operation in the content input box before clicking cancel, such as canceling input characters, canceling inserted pictures and the like, by clicking the cancel menu. The user may resume any action that the user entered into the box for the content before clicking "resume" by clicking the "resume" menu, such as resuming deleted text, etc. The user can set the font of the characters in the content input box by clicking the 'font' menu, for example, the font is set to be a song style, a black style, a regular style, and the like. The user may add a picture at the location of the current cursor in the content input box by clicking the "add picture" menu. The user may pop up a list of added reference texts by clicking on the reference text menu.
It is understood that, in the specific implementation, the number and content of the operation menus can be customized by the developer, and the application is not limited thereto.
Step 302: the handset 10 retrieves the content selected by the user in the rich text editor.
It should be noted that in some embodiments, the content selected by the user in the rich text editor of the handset 10 may be: the user selects content in the rich text editor by a cursor. In some embodiments, the content selected by the user in the rich text editor of the handset 10 may also be: when the user edits some characters or character sets while using the rich text editor of the handset 10, the rich text editor reminds the user whether to select some or all of the edited content, and after confirmation by the user, the rich text editor determines it as the content selected by the user.
In addition, the content selected by the user can be any teletext content supported by Html, such as text, pictures and the like. In particular, for a frequently occurring scenario of text editing, such as a user editing a paper, a patent, a scientific work, and the like, the same term may frequently occur repeatedly. The user can select a word, a sentence, a segment of text, etc. in the content input box of the rich text editor, and then act on the operation menu set in the rich text editor to trigger the editable WebView control of the mobile phone 10 to call the logic written based on the JavaScript script to obtain the content selected by the user in the rich text editor. It should be noted that the mobile phone 10 may implement interaction with JavaScript through WebView, and call a JavaScript code in a WebView program, which only needs to set a JavaScript supporting attribute of the WebView control to true.
For example, in the embodiment shown in fig. 4(a), the user edits multiple pieces of text for the email protocol in a rich text editor on the handset 10, where the "SMTP protocol" appears multiple times. The content currently selected by the user cursor is the "SMTP protocol". After the user selects the "SMTP protocol", the user acts on the touch display screen of the mobile phone 10, clicks the reference text operation menu, and then triggers the editable WebView control to load the logic written based on the JavaScript script, calls an event method of the JavaScript script itself for acquiring the content selected by the cursor, acquires the starting position and the ending position of the text area selected by the user, and returns the content corresponding to the text area, namely the "SMTP protocol".
Step 304: the mobile phone 10 encapsulates the content selected by the user according to a preset data encapsulation format to obtain encapsulated data.
The encapsulated data includes a unique data identifier corresponding to the content selected by the user, for example, the data identifier includes: data type and order of arrangement, etc. Therefore, when the content selected by the user is searched in a database or a related file, the quick search can be quickly realized according to the encapsulated data identification.
For example: in the embodiment shown in fig. 4, after the user selects "SMTP protocol" and clicks the reference text operation menu, the mobile phone 10 acquires that the content selected by the current user cursor is "SMTP protocol". Then, the encapsulation of the SMTP protocol is realized by using JavaScript script. For example, in some embodiments, the "SMTP protocol" is encapsulated as < div class ═ Reference Text "seqNum ═ number 1" >/div. I.e. the user selected part of the content is added as a separate element by the < div > tag. Wherein, class represents the type of the Text content selected by the user as the Reference Text; the seqNum ═ number 1' indicates that the order of the text content selected by the user in the reference text is the first order. That is, the "SMTP protocol" is defined as a reference text type by JavaScript, and its ordering in the reference text is the first order. For example, in the embodiment shown in fig. 4(b), the user selects "SMTP protocol", clicks on the reference text operation menu, and pops up the reference text list, where "SMTP protocol" is in the first line of the reference text list.
It should be noted that, in a specific implementation process, a developer may package content selected by a user according to various custom Html data packaging formats (for example, a < p > </p > paragraph tag, a Textarea tag, and the like), which is not limited in this application.
Step 306: the handset 10 stores the encapsulated data.
For example, in some embodiments, the wrapped reference text data is stored in a database, or saved to a file (e.g., the. sml file) for JavaScript calls. When the user clicks the reference text operation menu of the rich text editor, the mobile phone 10 may display the searched reference text in the list by querying the database. For example, when the mobile phone 10 encapsulates the "SMTP protocol" and stores the "SMTP protocol" in the reference text database, the user clicks the reference text button of the rich text editor, and the popped content includes the "SMTP protocol".
It should be noted that, in the specific implementation process, a path developer for storing encapsulated data may define itself according to the actual situation, and this application is not limited to this.
The following describes in detail the text editing method provided by the embodiment of the present application, with reference to fig. 5 and 6, by taking the added reference text as an example when the user uses the mobile phone 10 to edit rich text.
Specifically, as shown in fig. 5, the specific process of using the reference text includes:
step 500: the handset 10 listens in real time to the content entered by the user in the rich text editor.
For example, in some embodiments, a user may monitor the characters entered by the user in the content input box of the rich text editor in real time by entering a small number of characters (e.g., two to three characters) in the content input box of the rich text editor, and then a change viewer (Mutation Observer) in Html serves as an interface to monitor changes in the Document Object Model (DOM). Each time a user inputs new content, namely, each time the DOM changes, a change observer event is triggered, a callback function of the change observer is called, and a change record is generated. This change record contains all information related to the change. For example, in the embodiment shown in fig. 6(a), the user may return "SM" to Html by entering "SM" in the content entry box of the rich text editor, and the callback function of the change viewer.
Step 502: the mobile phone 10 traverses the storage path of the reference text, screens out a plurality of reference texts to be selected, which are matched with the content input by the user, and displays the reference texts for the user to select. In which a plurality of reference text data packaged in a specific format are stored in a storage path (e.g., a database, a set file sml file, etc.) of the reference text.
For example, in the embodiment shown in fig. 6(a), after the handset 10 listens to the content "SM" entered by the user in the content entry box of the rich text editor, it calls JavaScript code to traverse the reference text database. A plurality of candidate reference texts (such as "SMTP protocol", "SMT process", "SMT forum", etc.) matching "SM" are screened out and displayed on the display screen in the form of pop-up boxes as shown in fig. 6(a) for selection by the user.
Step 504: the handset 10 acquires the entire data of the reference text selected by the user.
For example, after the user enters "SM" in the content input box of the rich text editor, the entry "SMTP protocol" is selected from the pop-up reference text dialog to be selected. The mobile phone 10 searches in a saving path (for example, a reference text database) of the de-reference text according to the selected entry, and acquires the whole data of the reference text corresponding to the selected entry. For example, if the selected entry "SMTP protocol" is the first order, the corresponding sequence in the data identifier encapsulated in the storage path is "number 1", and data of which the category is the reference text and which corresponds to the "number 1" identifier is searched for, the complete content below the entry can be obtained: "SMTP protocol".
Step 506: the mobile phone 10 uses JavaScript script to insert the whole data of the reference text selected by the user into the position where the user's current cursor is located, and displays the whole data on the user interface.
For example, in the embodiment shown in fig. 6(b), after the user clicks and selects "SMTP protocol" in the pop-up box of the reference text, the editable of the handset 10 inserts "SMTP protocol" into the currently edited position of the user through the JavaScript script.
When the user edits the characters in the content input box of the rich text editor of the mobile phone 10, the contents to be edited do not need to be edited one by one through the input method of the mobile phone, and the mobile phone 10 can automatically associate a plurality of candidate reference texts for the user to directly select by inputting a small number of characters. And selecting the reference text required by the user, and inserting the node where the current cursor is located. The editing efficiency can be greatly improved, and the condition of error input during manual editing can be avoided.
In some embodiments, the user may also select a reference text entry directly from a pop-up list of reference texts already saved by clicking on a reference text menu. Then, the editable WebView control of the mobile phone 10 obtains the corresponding reference text complete data according to the selected reference text entry by calling the JavaScript script logic, and inserts the reference text complete data into the position where the current cursor is located. For example, in the embodiment shown in fig. 6(c), after the user clicks the reference text menu, the POP-up reference text list includes "SMTP protocol", "POP protocol", and "IMAP" protocol, and the user selects "SMTP protocol", that is, the selected "SMTP protocol" can be inserted into the position of the current cursor.
The following will describe in detail the text editing method provided in the embodiment of the present application, taking as an example that a user modifies an existing cited text when editing a rich text using the mobile phone 10, with reference to fig. 7 and 8.
As shown in fig. 7, the specific process of modifying the reference text includes:
step 700: the handset 10 listens in real time for changes in the content of the reference text entered by the user in the content entry box of the rich text editor.
For example, in the embodiment shown in fig. 8(a), the user edits the "SMTP protocol" before a total of 5 in the content input box of the rich text editor of the handset 10. As shown in fig. 8(b), the user directly modifies the "SMTP protocol" to the "SMTP protocol" at the position where the current cursor is located. The change viewer in the Html template loaded by the editable WebView control of the mobile phone 10 monitors that the "SMTP protocol" is modified to the "SMTP protocol", and returns a modification record.
Step 702: the handset 10 obtains the modified content.
For example, in the embodiment shown in fig. 8(b), the change observer in Html listens after the "SMTP protocol" is modified to the "SMTP protocol". The editable WebView control of the mobile phone 10 calls a program written based on the JavaScript script to obtain the modified content, i.e., the smtp protocol, in the modification record returned by the change viewer.
Step 704: the handset 10 obtains all locations in the rich text editor's content input box where the reference text before modification by the user appears.
For example, in the embodiment shown in fig. 8(a), the editable WebView control of the mobile phone 10 calls a program written based on JavaScript to traverse all contents in the content input box of the rich text editor, and acquires that there are 5 places of the Html contents edited by the user in the content input box of the rich text editor, where the "SMTP protocol" appears in total.
Step 706: the handset 10 inserts the content of the modified reference text into all nodes where the reference text was located before modification. The effect of simultaneously modifying a plurality of same contents is achieved by modifying one content, namely, linkage modification is achieved. Therefore, when a user edits a text, especially when multiple identical words, sentences and paragraphs repeatedly appear in long contents, the time for modifying certain identical content is greatly shortened, and the editing efficiency of the user is improved.
Specifically, for example, in the embodiment shown in fig. 8(c), the editable WebView control of the handset 10 calls JavaScript-based script code to retrieve the encapsulated data of the "SMTP protocol" in the storage path originally storing the reference text data encapsulated in a specific format, and modifies the "SMTP protocol" into the "SMTP protocol". The "SMTP protocol" at originally other 4 in the rich text editor's content input box is then modified by JavaScript to "SMTP protocol".
In addition, in some embodiments, the user may select the reference text that the user wants to modify from a pop-up reference text dialog box to modify by directly clicking on a reference text operation menu in the rich text editor of the handset 10.
For example, in the embodiment shown in fig. 9(a), the user operates the menu by clicking the reference text, and the mobile phone 10 POPs the reference texts "SMTP protocol", "POP protocol", and "IMAP protocol" through the dialog box by querying the database. The user directly selects the "SMTP protocol" to modify it into the "SMTP protocol", the editable WebView control of the mobile phone 10 invokes a logic based on JavaScript script writing, and a method similar to step 704 is used to obtain all positions of the reference text before the user modifies in the content input box of the rich text editor. For example, in the embodiment shown in fig. 9(b), in the storage path in which the reference text data encapsulated in a specific format is originally stored, encapsulated data of "SMTP protocol" is retrieved, in which the "SMTP protocol" is modified to "SMTP protocol". Then 5 "SMTP protocols" that the user has edited in the content input box of the rich text editor are directly modified by JavaScript to "SMTP protocol". Namely, the user directly modifies the reference text to be modified by clicking the reference text operation menu, so that the contents of all nodes where the reference text to be modified appears in the input box can be directly modified into the modified reference text at one time, the text modification efficiency is greatly improved, and the situations of missed modification and wrong modification are avoided.
A text editor 1000 provided by an embodiment of the present application will be described below with reference to fig. 10.
As shown in fig. 10, the text editor 1000 includes a text input box 1001, a reference text operation menu 1002, a reference text determination unit 1003, and a linkage modification unit 1004. A text input box 1001 is used to provide an interface for a user to edit text in the text editor 1000.
A reference text determining unit 1003, configured to determine, as the reference text, the first content selected by the user from the text in the text editor 1000 in a case where it is detected that the user selects the first content in the text editor 1000 and clicks the reference text operation menu 1002.
And an interlocking modification unit 1004 for performing the same modification on a third content identical to the first content at the second position of the text when detecting that the user modifies a second content identical to the first content at the first position of the text.
It can be understood that the text editor 1000 shown in fig. 10 corresponds to the text processing method provided in the present application, and the technical details in the above specific description about the text processing method provided in the present application are still applicable to the text editor 1000 shown in fig. 10, and the specific description refers to the above, and is not repeated here.
Embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementations. Embodiments of the application may be implemented as computer programs or program code executing on programmable systems comprising at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this Application, a Processing system includes any system having a processor such as, for example, a Digital Signal Processing (DSP), a microcontroller (Application Specific Integrated Circuit, ASIC), or a microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described in this application are not limited in scope to any particular programming language. In any case, the language may be a compiled or interpreted language.
In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or via other computer readable media. Thus, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy diskettes, optical disks, Read-Only memories (CD-ROMs), magneto-optical disks, Read-Only memories (ROMs), Random Access Memories (RAMs), Erasable Programmable Read-Only memories (EPROMs), Electrically Erasable Programmable Read-Only memories (EEPROMs), magnetic or optical cards, flash Memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet to transmit information in an electrical, optical, acoustical or other form of propagated signals. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
In the drawings, some features of structures or methods may be shown in a particular arrangement and/or order. However, it is to be understood that such specific arrangement and/or ordering may not be required. Rather, in some embodiments, the features may be arranged in a manner and/or order different from that shown in the illustrative figures. In addition, the inclusion of a structural or methodical feature in a particular figure is not meant to imply that such feature is required in all embodiments, and in some embodiments, may not be included or may be combined with other features.
It should be noted that, in the embodiments of the apparatuses in the present application, each unit/module is a logical unit/module, and physically, one logical unit/module may be one physical unit/module, or may be a part of one physical unit/module, and may also be implemented by a combination of multiple physical units/modules, where the physical implementation manner of the logical unit/module itself is not the most important, and the combination of the functions implemented by the logical unit/module is the key to solve the technical problem provided by the present application. Furthermore, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules which are not so closely related to solve the technical problems presented in the present application, which does not indicate that no other units/modules exist in the above-mentioned device embodiments.
It is noted that, in the examples and descriptions of this patent, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
While the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims (22)
1. A method of text processing, comprising:
the method comprises the steps that a text editor of the electronic equipment determines first content selected by a user from text in the text editor as reference text;
in the case where the text editor detects that a user has modified second content identical to the first content at a first position of the text, the text editor performs the same modification on third content identical to the first content at a second position of the text.
2. The method of claim 1, wherein the first content comprises at least one of a character and an image.
3. The method of claim 1, wherein determining, by a text editor of the electronic device, the first content selected by the user from the text in the text editor as the reference text comprises:
when detecting that the same content as the first content appears at a plurality of positions in the text, the text editor prompts a user whether to set the first content as a reference text;
in a case where the user determines to set the first content as reference text, the text editor determines the first content as reference text.
4. The method of claim 1 or 3, wherein determining, by a text editor of the electronic device, the first content selected by the user from text in the text editor as the reference text comprises:
a text editor of the electronic device receives a trigger event bound to a user selecting first content from text in the text editor;
the text editor acquires the first content selected by a user from the text in the text editor;
the text editor packages the first content according to a preset data packaging format to obtain packaged data;
and the text editor stores the packaged data.
5. The method of claim 4, wherein the text editor includes a reference text operations menu, and wherein the triggering event bound to the user selecting the first content from the text in the text editor comprises: and clicking the reference text operation menu after the user selects the first content through a cursor.
6. The method of claim 4, wherein storing the encapsulated data comprises:
and storing the packaged data in at least one of a database and a setting file.
7. The method of claim 1, wherein, in the case that the text editor detects that a user modifies second content identical to the first content at the first position of the text, the same modification of third content identical to the first content at the second position of the text by the text editor comprises:
a text editor of the electronic equipment monitors that a user modifies second content which is the same as the first content at a first position of the text, and then obtains the modified second content;
the text editor traverses the text to obtain a second position where third content identical to the first content in the text is located;
the text editor replaces third content identical to the first content at the second position of the text with content identical to the modified second content.
8. The method of claim 1, further comprising:
and the text editor replaces the content which appears at a plurality of positions in the text and is the same as the first content with the content to be replaced by the user when detecting the replacement operation of the reference text of the first content by the user.
9. The method of claim 1, wherein the first content comprises a plurality of characters, and wherein the method further comprises:
in the event that the text editor detects that a user has entered a partial character of the first content at a third location, displaying all characters of the first content to the user;
in a case where it is detected that the user has clicked on all the characters of the first content displayed, adding all the characters of the first content at the third position.
10. The method of claim 1, wherein a text editor of the electronic device is created based on a WebView control loading Html template.
11. The method of claim 10, wherein determining, by a text editor of the electronic device, the first content selected by the user from the text in the text editor as the reference text comprises:
and the WebView control of the electronic equipment calls the Javascript code, and determines first content selected by a user from the text in the text editor as a reference text.
12. The method of claim 10, wherein, in the case that the text editor detects that a user modifies second content identical to the first content at the first position of the text, the same modification of third content identical to the first content at the second position of the text by the text editor comprises:
and the WebView control of the electronic equipment calls Javascript codes, and under the condition that the second content which is the same as the first content and is positioned at the first position of the text is detected to be modified by a user, the third content which is the same as the first content and is positioned at the second position of the text is modified in the same way.
13. A text editor, comprising: the system comprises a text input box, a reference text operation menu, a reference text determining unit and a linkage modifying unit;
the text input box is used for providing an interface for editing the text in the text editor for a user;
the reference text determining unit is used for determining the first content selected by the user from the text in the text editor as the reference text under the condition that the first content selected by the user from the text in the text editor is detected and the reference text operation menu is clicked;
the linkage modification unit is used for modifying third content which is the same as the first content at the second position of the text under the condition that the user is detected to modify the second content which is the same as the first content at the first position of the text.
14. The text editor of claim 13 wherein the first content comprises at least one of a character and an image.
15. The text editor of claim 13, wherein the reference text determining unit determines the first content selected by the user from the text in the text editor as the reference text by:
the reference text determining unit prompts a user whether to set the first content as a reference text when detecting that the same content as the first content appears at a plurality of positions in the text;
in a case where the user determines to set the first content as the reference text, the reference text determination unit determines the first content as the reference text.
16. The text editor of claim 13 or 15, wherein the reference text determining unit determines the first content selected by the user from the text in the text editor as the reference text by:
the reference text determination unit receives a trigger event bound to a user selecting a first content from a text in a text editor;
the reference text determining unit acquires the first content selected by a user from the text in the text editor;
the reference text determining unit packages the first content according to a preset data packaging format to obtain packaged data;
the reference text determination unit stores the packaged data.
17. The text editor of claim 13 wherein the linkage modification unit modifies a third content at the second location of the text that is identical to the first content by detecting that a user modified a second content at the first location of the text that is identical to the first content by:
the linkage modification unit monitors that a second content which is the same as the first content and is positioned at the first position of the text of the user is modified, and then the modified second content is obtained;
the linkage modification unit traverses the text to obtain a second position where a third content identical to the first content in the text is located;
the linkage modification unit replaces third content, which is the same as the first content, at a second position of the text with content, which is the same as the modified second content.
18. The text editor of claim 13 further comprising:
and the unified replacing unit is used for replacing the content which appears at a plurality of positions in the text and is the same as the first content with the content to be replaced by the user under the condition that the replacing operation of the reference text of the first content by the user is detected.
19. The text editor of claim 13 wherein the first content comprises a plurality of characters and wherein the first content comprises a plurality of characters
The text editor further comprises:
an association input unit for displaying all characters of the first content to a user in a case where it is detected that the user inputs a part of characters of the first content at a third position; adding all characters of the first content at the third position in case that it is detected that the user clicks all characters of the first content displayed.
20. The text editor of claim 13 further comprising:
and the reference text display unit is used for displaying the determined reference text under the condition that the user is detected to click the reference text operation menu.
21. A readable medium having stored thereon instructions that, when executed on an electronic device, cause the electronic device to perform the text processing method of any one of claims 1-12.
22. An electronic device, comprising:
a memory for storing instructions for execution by one or more processors of the electronic device, an
A processor, being one of processors of an electronic device, for performing the text processing method of any one of claims 1-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110183126.7A CN114912421A (en) | 2021-02-09 | 2021-02-09 | Text processing method, text editor, readable medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110183126.7A CN114912421A (en) | 2021-02-09 | 2021-02-09 | Text processing method, text editor, readable medium and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114912421A true CN114912421A (en) | 2022-08-16 |
Family
ID=82761279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110183126.7A Pending CN114912421A (en) | 2021-02-09 | 2021-02-09 | Text processing method, text editor, readable medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114912421A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024152742A1 (en) * | 2023-01-17 | 2024-07-25 | 天翼数字生活科技有限公司 | Rich text editing method and apparatus, storage medium and computer device |
-
2021
- 2021-02-09 CN CN202110183126.7A patent/CN114912421A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024152742A1 (en) * | 2023-01-17 | 2024-07-25 | 天翼数字生活科技有限公司 | Rich text editing method and apparatus, storage medium and computer device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110196675B (en) | Method for adding annotations and electronic equipment | |
JP5956725B2 (en) | Method, device, and computer program product for providing context-aware help content | |
CN101441567B (en) | Method and system for supporting multiple-language user interface in mobile terminal | |
US20170249934A1 (en) | Electronic device and method for operating the same | |
CN110309006B (en) | Function calling method and device, terminal equipment and storage medium | |
US20090150574A1 (en) | Method and apparatus for organizing and consolidating portable device functionality | |
KR102039553B1 (en) | Method and apparatus for providing intelligent service using inputted character in a user device | |
US20080301581A1 (en) | Method and system for providing additional information service onto e-mail | |
US20150254518A1 (en) | Text recognition through images and video | |
CN108287918A (en) | Method for playing music, device, storage medium based on five application page and electronic equipment | |
CN103702297A (en) | Short message enhancement method, device and system | |
US20130012245A1 (en) | Apparatus and method for transmitting message in mobile terminal | |
US11907316B2 (en) | Processor-implemented method, computing system and computer program for invoking a search | |
CN110865837B (en) | Method and terminal for system upgrade | |
CN112328140B (en) | Image input method, device, equipment and medium thereof | |
CN105243407A (en) | Method and device for reading and writing smart card | |
US9424364B2 (en) | Integrated context-driven information search and interaction | |
CN114912421A (en) | Text processing method, text editor, readable medium and electronic device | |
CN111443903B (en) | Method and device for acquiring software development file, electronic equipment and storage medium | |
US9426277B2 (en) | Method and apparatus for operating message function in connection with note function | |
WO2023082817A1 (en) | Application program recommendation method | |
EP3163475B1 (en) | Electronic device and method of searching data records | |
CN115081423A (en) | Document editing method and device, electronic equipment and storage medium | |
KR102222481B1 (en) | Method and apparatus for processing information of terminal | |
CN114580361A (en) | Document processing method and device, electronic equipment 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 |