Text processing method, text editor, readable medium, and electronic device

By storing and automatically matching referenced text in the text editor, the problem of inefficiency in users manually modifying multiple identical contents is solved, and efficient and accurate text editing is achieved.

CN114912421BActive Publication Date: 2025-10-17HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110183126.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-09
Publication Date
2025-10-17
Estimated Expiration
2041-02-09

AI Technical Summary

Technical Problem

During the text editing process, users need to manually select and modify multiple identical contents one by one, which is inefficient and prone to omissions or mistakes.

Method used

The text editor stores the content selected by the user as reference text, and automatically searches and modifies the same content in the text by matching the stored reference text, thereby achieving linked modification.

Benefits of technology

It improves text editing efficiency, avoids missed and erroneous changes, and ensures content consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114912421B_ABST
    Figure CN114912421B_ABST
Patent Text Reader

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: a text editor of the electronic device determines first content selected by a user from a text in the text editor as reference text; and in the case that the text editor detects that the 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. The application stores the content selected by the user from the text in the text editor or some content automatically appearing in the text as reference text. When the user modifies the reference text at a certain position of the text, the application automatically finds out the content identical to the modified reference text in the text by matching the stored reference text, and performs the same modification on the found content. The text editing efficiency can be greatly improved, and the occurrence of the missing modification and the wrong modification can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, in particular to a text processing method, a text editor, a readable medium and an electronic device. BACKGROUND

[0002] With the development of terminal technology, mobile terminals (such as smart phones, tablet computers, personal digital assistants (PDA, Personal Digital Assistant) and the like) are becoming more and more intelligent and diversified. In the daily life of users, more and more needs are to be completed by text editing on mobile terminals, such as chatting through chat software installed on mobile terminals, editing office files, academic / research works through office software installed on mobile terminals, and the like.

[0003] In the editing process, the user often encounters the situation that many same contents in the edited file need to be modified. Especially for long literary works, scientific works and the like, there are many same words or same paragraphs, and when the same contents in many places that need to be modified are modified, the user can only manually select the related contents one by one for modification, or first searches the whole text and then modifies or replaces. In this way, the user often misses one or more places that need to be modified, or adds some contents in subsequent editing, and needs to select and modify one by one again, which is low in efficiency and easy to miss. SUMMARY

[0004] The embodiments of the present application provide a text processing method, a text editor, a readable medium and an electronic device. The technical scheme of the present application stores the contents selected by the user from the text or the contents appearing in the text automatically as reference texts by the text editor used by the user in the process of editing the text by the user, and when the user modifies the reference text at a certain place in the text, the text editor can automatically find the same contents in the text as the modified reference text by matching the stored reference texts, and modifies the found contents in the same way, thereby realizing the linkage modification. The technical scheme of the present application greatly improves the text editing efficiency, and can also avoid the occurrence of missing and mis-modification.

[0005] In a first aspect, the embodiments of the present application provide a text processing method, comprising: a text editor of an electronic device determining first contents selected by a user from a text in the text editor as reference texts; in a case where the text editor detects that the user has modified second contents same as the first contents at a first position of the text, the text editor performs the same modification on third contents same as the first contents at a second position of the text.

[0006] In the above first aspect, the "reference text" is only an example of the present application, and the present application is not limited thereto. The term can also be referred to as a "reference text" or the like.

[0007] The text editor can be used by a user to edit a plain text or a rich text, such as a text, a picture, an audio, a video, and the like.

[0008] In some embodiments, the first position and the second position can be the same position in the text of the text editor. In some embodiments, the first position and the second position can also be two different positions.

[0009] In some embodiments, the first content selected by the user from the text in the text editor can be selected by the user through a cursor. In some embodiments, the text editor can automatically prompt the user whether to set the first content as the reference text.

[0010] In a possible implementation of the above first aspect, the first content includes at least one of a character and an image. For example, the first content can be a character or a character set (such as a word, a punctuation, or a sentence), a picture, a video, an audio, and the like.

[0011] In a possible implementation of the above first aspect, the text editor of the electronic device determines the first content selected by the user from the text in the text editor as the reference text, including:

[0012] The text editor prompts the user whether to set the first content as the reference text when detecting that the same content as the first content appears in multiple positions in the text;

[0013] 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.

[0014] In a possible implementation of the above first aspect, the text editor of the electronic device determines the first content selected by the user from the text in the text editor as the reference text, including:

[0015] The text editor of the electronic device receives a trigger event bound to the selection of the first content by the user from the text in the text editor;

[0016] The text editor obtains the first content selected by the user from the text in the text editor;

[0017] The text editor encapsulates the first content according to a preset data encapsulation format to obtain encapsulated data;

[0018] The text editor stores the encapsulated data.

[0019] In a possible implementation of the first aspect, the text editor includes a reference text operation menu, and the trigger event bound to the user selecting the first content from the text in the text editor includes the user clicking the reference text operation menu after selecting the first content by a cursor.

[0020] The reference text operation menu is only an example in the present application, and the present application is not limited thereto. The term can also be another name, such as a reference text operation button.

[0021] In a possible implementation of the first aspect, the storing the encapsulated data includes storing the encapsulated data in at least one of a database and a configuration file.

[0022] In a possible implementation of the first aspect, when the text editor detects that the user modifies the second content identical to the first content at the first position of the text, the text editor performs the same modification on the third content identical to the first content at the second position of the text.

[0023] After the text editor of the electronic device detects the modification of the second content identical to the first content at the first position of the text by the user, the text editor obtains the modified second content.

[0024] The text editor traverses the text to obtain a second position of the text where the third content identical to the first content is located.

[0025] The text editor replaces the third content identical to the first content at the second position of the text with content identical to the modified second content.

[0026] In a possible implementation of the first aspect, the method further includes: when the text editor detects a replacement operation of the reference text of the first content by the user, replacing content identical to the first content at multiple positions in the text with content to be replaced by the user. The text replacement efficiency can be improved.

[0027] In a possible implementation of the first aspect, the first content includes multiple characters, and the method further includes:

[0028] When the text editor detects that the user inputs part of the characters of the first content at the third position, the text editor displays all the characters of the first content to the user.

[0029] When the text editor detects that the user clicks all the characters of the first content displayed, the text editor adds all the characters of the first content at the third position.

[0030] For example, the text editor detects that the user inputs "SM" at the current cursor position, the text editor automatically associates the words starting with "SM" such as "SMTP protocol", "SMT forum" and so on for the user to select, the user clicks to select "SMTP protocol", and the text editor inserts "SMTP protocol" into the position of the current cursor. The function of the association input is realized, and the editing efficiency is improved.

[0031] In a possible implementation of the first aspect, the method further includes that the text editor of the electronic device is created based on a WebView control loading an Html template.

[0032] In a possible implementation of the first aspect, the method that the text editor of the electronic device determines the first content selected by the user from the text in the text editor as the reference text includes that:

[0033] The WebView control of the electronic device calls a Javascript script code to determine the first content selected by the user from the text in the text editor as the reference text.

[0034] In a possible implementation of the first aspect, the text editor, in the case that the text editor detects that the user modifies the second content same as the first content at the first position of the text, modifies the third content same as the first content at the second position of the text includes that:

[0035] The WebView control of the electronic device calls a Javascript script code to, in the case that the user modifies the second content same as the first content at the first position of the text, modify the third content same as the first content at the second position of the text.

[0036] In a second aspect, the application provides a text editor, including a text input box, a reference text operation menu, a reference text determination unit and a linkage modification unit.

[0037] The text input box is used to provide an interface for the user to edit the text in the text editor.

[0038] The reference text determination unit is used to, in the case that the user selects the first content from the text in the text editor and clicks the reference text operation menu, determine the first content selected by the user from the text in the text editor as the reference text.

[0039] The linkage modification unit is used to, in the case that the user modifies the second content same as the first content at the first position of the text, modify the third content same as the first content at the second position of the text.

[0040] In a possible implementation of the second aspect, the first content includes at least one of a character and an image.

[0041] In a possible implementation of the second aspect, the reference text determination unit determines the first content selected by the user from the text in the text editor as the reference text in the following manner:

[0042] The reference text determination unit prompts the user whether to set the first content as the reference text when detecting that the same content as the first content appears at multiple positions in the text.

[0043] 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.

[0044] In a possible implementation of the second aspect, the reference text determination unit determines the first content selected by the user from the text in the text editor as the reference text in the following manner:

[0045] The reference text determination unit receives a trigger event bound to the selection of the first content by the user from the text in the text editor.

[0046] The reference text determination unit obtains the first content selected by the user from the text in the text editor.

[0047] The reference text determination unit encapsulates the first content according to a preset data encapsulation format to obtain encapsulated data.

[0048] The reference text determination unit stores the encapsulated data.

[0049] In a possible implementation of the second aspect, the linkage modification unit modifies the third content identical to the first content at a second position of the text in the following manner in a case where it is detected that the second content identical to the first content at a first position of the text is modified by the user:

[0050] The linkage modification unit obtains the modified second content after listening to the modification of the second content identical to the first content at the first position of the text by the user.

[0051] The linkage modification unit traverses the text to obtain the second position of the third content identical to the first content in the text.

[0052] The linkage modification unit replaces the third content identical to the first content at the second position of the text with content identical to the modified second content.

[0053] In a possible implementation of the second aspect, the text editor further includes: a uniform replacement unit, configured to replace the content identical to the first content at the multiple positions in the text with the content to be replaced by the user, if it is detected that the user performs a replacement operation on the reference text of the first content.

[0054] In a possible implementation of the second aspect, the first content includes multiple characters, and the text editor further includes:

[0055] an association input unit, configured to display all the characters of the first content to the user, if it is detected that the user inputs part of the characters of the first content at the third position; and add all the characters of the first content at the third position, if it is detected that the user clicks the displayed all the characters of the first content.

[0056] In a possible implementation of the second aspect, the text editor further includes: a reference text display unit, configured to display the determined reference text, if it is detected that the user clicks the reference text operation menu.

[0057] In a third aspect, an embodiment of the present application provides a readable medium, and the readable medium stores instructions. The instructions are executed on an electronic device to cause the electronic device to perform the text processing method in the first aspect and any one of the possible implementations of the first aspect.

[0058] In a fourth aspect, an embodiment of the present application provides an electronic device, including:

[0059] a memory, configured to store instructions executed by one or more processors of the electronic device, and

[0060] a processor, which is one of the processors of the electronic device, configured to execute the text processing method in the first aspect and any one of the possible implementations of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0061] FIG. 1(a) is a schematic diagram of a user interface in which a user clicks an editor icon of a mobile phone, according to some embodiments of the present application;

[0062] FIG. 1(b) is a schematic diagram of an initial interface after a user opens an editor installed on a mobile phone, according to some embodiments of the present application;

[0063] FIG. 1(c) is a schematic diagram of an interface in which a user inputs text editing in a content input box of the editor, according to some embodiments of the present application;

[0064] FIG. 1(d) is a schematic diagram of an interface in which a user clicks a reference text menu to select an SMTP protocol to insert at a current cursor position, according to some embodiments of the present application.

[0065] Figure 1 (e) shows an interface schematic diagram of automatically associating multiple candidate reference texts after the user inputs "SM" according to some embodiments of the present application;

[0066] Figure 1 (f) shows an interface schematic diagram of the user selecting "SMTP protocol" from the multiple candidate reference texts automatically associated and inserting it into the current cursor position according to some embodiments of the present application;

[0067] Figure 1 (g) shows an interface schematic diagram of clicking the reference text to directly modify "smtp protocol" to "SMTP protocol" from the popped-up list of application texts according to some embodiments of the present application;

[0068] Figure 1 (h) shows an interface schematic diagram of the user directly modifying one "smtp protocol" to "SMTP protocol" in the content input box of the editor and modifying another "smtp protocol" to "SMTP protocol" by linkage according to some embodiments of the present application;

[0069] Figure 2 Figure 2 shows a schematic diagram of the hardware structure of a mobile phone according to some embodiments of the present application;

[0070] Figure 3 Figure 3 shows a flowchart of creating a reference text according to some embodiments of the present application;

[0071] Figure 4(a) shows an interface schematic diagram of the user selecting "SMTP protocol" and clicking the reference text menu according to some embodiments of the present application;

[0072] Figure 4(b) shows an interface schematic diagram of the mobile phone adding the user-selected "SMTP protocol" to the popped-up list of reference texts according to some embodiments of the present application;

[0073] Figure 5 Figure 5 shows a flowchart of the user using the added reference text according to some embodiments of the present application;

[0074] Figure 6(a) shows an interface schematic diagram of the user inputting "SM" and the mobile phone automatically associating multiple reference texts starting with "SM" according to some embodiments of the present application;

[0075] Figure 6(b) shows an interface schematic diagram of the user selecting "SMTP protocol" from the multiple candidate reference texts and inserting it into the current cursor position according to some embodiments of the present application;

[0076] Figure 6(c) shows an interface schematic diagram of the user clicking the reference text menu and selecting "SMTP protocol" from the popped-up list of reference texts and inserting it into the current cursor position according to some embodiments of the present application;

[0077] Figure 7 According to some embodiments of the present application, a flow chart of user modifying added quoted text is shown.

[0078] Figure 8(a) shows that there are 5 "SMTP protocol" in the text edited by the user according to some embodiments of the present application.

[0079] Figure 8(b) shows the interface of the user directly modifying one "SMTP protocol" to "smtp protocol" in the content input box according to some embodiments of the present application.

[0080] Figure 8(c) shows the interface of the mobile phone modifying the other 4 "SMTP protocol" in the content input box to "smtp protocol" according to some embodiments of the present application.

[0081] Figure 9(a) shows the interface of the user clicking the quoted text menu and directly modifying "SMTP protocol" in the pop-up quoted text list to "smtp protocol" according to some embodiments of the present application.

[0082] Figure 9(b) shows the interface of the mobile phone directly modifying the 5 "SMTP protocol" in the content edited by the user to "smtp protocol" after the user modifies "SMTP protocol" in the quoted text list to "smtp protocol" according to some embodiments of the present application.

[0083] Figure 10 According to some embodiments of the present application, a schematic block diagram of a text editor is shown. DETAILED DESCRIPTION

[0084] The illustrative embodiments of the present application include, but are not limited to, text processing methods, text editors, readable media, and electronic devices.

[0085] The technical solution of the present application provides a text processing method. In the process of user editing a text, a text editor used by the user can store content selected by the user from the text or some characters or character sets (such as words, phrases, punctuation marks or sentences) appearing in the text as reference text. Then, when the user modifies the reference text at a certain place in the document, the text editor can automatically find the same characters or character sets in the text as the modified reference text by matching the stored reference text, and make the same modification to the found characters or character sets. For example, the text editor can listen to the change of the user input content, obtain the modified reference text, and then replace all the same characters or character sets found in the text with the modified reference text, to realize the linkage modification. For example, the user selects to set "Web server" appearing in the text as reference text, and as the user inputs, "Web server" appears in multiple places in the text. When the user modifies "Web server" at a certain place in the text to "web server", "Web server" in other places in the text will be automatically modified to "web server" by the text editor. In this way, the user can replace all the same characters or character sets found in the text with the modified reference text by modifying the reference text at one place, to realize the linkage modification. The text editing efficiency is greatly improved, and the situation of missing modification or incorrect modification can be avoided.

[0086] In order to facilitate understanding of the present solution, the key terms used in the present solution are explained as follows.

[0087] A rich text editor (RTE for short) is a WYSIWYG (What You See Is What You Get) text editor that can be embedded in a browser. In order to facilitate the description, the present application is described by taking the 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 the rich text editor, such as a text editor that can edit pure text.

[0088] WebView is a high-performance kernel browser built in an electronic device, and is a component encapsulated in a software development kit (SDK). It is a view control that can be used to present web page content.

[0089] JavaScript is a direct interpretation script language, which is widely used in the client side.

[0090] Html(HyperText Markup Language, HyperText Markup Language), the structure includes "head" and "body" part, wherein the "head" provides information about the web page, the "body" part provides the specific content of the web page.

[0091] The embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0092] Fig. 1(a) shows the desktop of an electronic device 10 according to some embodiments of the present application, as shown in the figure, the desktop of the electronic device has a rich text editor icon 11. The user can click the rich text editor icon 11 to open the user interface of the rich text editor for text editing. As shown in Fig. 1(b), when the user clicks the icon 11 of the rich text editor by finger, the electronic device 10 opens the user interface of the rich text editor for the user to edit text. The user can edit text in the blank content input box of the rich text editor shown in Fig. 1(b) by clicking the keyboard shown in Fig. 1(b). For example, the user writes a diary, writes a review, writes a book review, makes a note, records a reminder, etc. through the editor. It should be noted that in addition to inputting characters in the rich text editor, the user can also add pictures and any other content supported by Html.

[0093] In particular, when the user edits a paper, a patent, a scientific work, etc. through the rich text editor, there are many long articles, repeated use of terms, sentences, paragraphs, etc. For example, in the embodiment shown in Fig. 1(c), the user is currently editing the content related to "email protocol", and the terms "SMTP protocol", "POP3", "TCP / IP protocol" are used multiple times. In order to improve the editing efficiency, the user can select "SMTP protocol", "POP3", "TCP / IP protocol" and other terms 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 user-selected "SMTP protocol", "POP3", "TCP / IP protocol" and other terms to the reference text database, i.e. creates a new reference text, by executing the text editing method provided by the embodiments of the present application. It can be understood that the above "reference text" is only an exemplary description of the present application, and the present application is not limited thereto. The term can also be other names, such as "reference text", etc.

[0094] In some embodiments, when the user inputs the repeatedly appearing words such as "SMTP protocol", "POP3", "TCP / IP protocol" again, the user can pop up the list of cited texts as shown in Fig. 1(d) by clicking the cited text operation menu, and select a cited text, for example, "SMTP protocol", from the popped-up list to insert the selected cited text into the current cursor position. In addition, when the user inputs the repeatedly appearing words such as "SMTP protocol", "POP3", "TCP / IP protocol" again, the user can input part of the complete word to be edited, and the electronic device 10 can automatically associate the complete word corresponding to the part of the word input by the user by executing the text editing method provided in the embodiments of the present application. For example, as shown in Fig. 1(e), the user inputs "SM", and the electronic device 10 automatically associates "SMTP protocol" and "SMT process" by executing the text editing method provided in the embodiments of the present application. The user clicks to select "SMTP protocol", and the "SMTP protocol" is inserted into the current cursor position in the user interface as shown in Fig. 1(f) and displayed. In this way, the user does not need to input the characters one by one, and the editing efficiency of the user can be improved.

[0095] In some embodiments, when the user checks the edited text, the user finds that some terms are not uniform. For example, as shown in Fig. 1(g), the user edits the text to have two "smtp protocol" and two "SMTP protocol". The user wants to modify the two "smtp protocol" to "SMTP protocol" to ensure the uniformity of the terms. The user can click the cited text operation menu of the rich text editor interface of the electronic device 10 to modify the "smtp protocol" added to the cited text database to "SMTP protocol", and the electronic device 10 can modify all the "smtp protocol" in the text edited by the user to "SMTP protocol" by executing the text editing method provided in the embodiments of the present application. In addition, the user can directly modify the content at the position to be modified. For example, as shown in Fig. 1(h), the user selects one "smtp protocol" in the content input box and directly modifies it to "SMTP protocol", and the electronic device 10 can modify the other "smtp protocol" to "SMTP protocol" by executing the text editing method provided in the embodiments of the present application. The modification is realized in linkage. The modification efficiency is greatly improved, and the situation of missing modification or wrong modification can be avoided.

[0096] The electronic device 10 includes, but is not limited to, a tablet computer, 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. The wearable electronic device includes, but is not limited to, a smart watch, a smart bracelet, or smart glasses, a smart helmet, a smart headband, and the like.

[0097] For ease of illustration, the electronic device 10 is taken as a mobile phone in the following description, and reference is made to the accompanying drawings. Figures 2 to 10 The application is described in detail.

[0098] Figure 2 According to an embodiment of the application, a hardware structure diagram of a mobile phone 10 is shown. The mobile phone 10 can execute the text processing method provided by the embodiments of the application. Figure 2 In the drawings, similar components have the same reference numerals. As shown in the drawings, Figure 2 The mobile phone 10 can 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, and the like.

[0099] It can be understood that the structure shown in the embodiments of the application does not constitute a specific limitation on the mobile phone 10. In other embodiments of the application, the mobile phone 10 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0100] The processor 110 can include one or more processing units, for example, can include a processing module or processing circuit of a central processing unit CPU, a graphics processing unit GPU, a digital signal processor DSP, a micro-programmed control unit MCU, an artificial intelligence AI processor, or a field programmable gate array FPGA, and the like. Different processing units can be independent devices or can be integrated into one or more processors. For example, in some examples of the application, the processor 110 can be used to obtain the content input by the user in the text editing, to encapsulate the content input by the user according to a specific format, and to persistently store it. And obtain the change of the content input by the user, realize the linkage modification, etc.

[0101] The memory 180 can be used to store data, software programs and modules, and can be a volatile memory (Volatile Memory), such as a random-access memory (RAM), or a non-volatile memory (Non-Volatile Memory), such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), or a combination of the above types of memories, or can also be a removable storage medium, such as a secure digital (SD) memory card. Specifically, the memory 180 can include a program storage area 1801 and a data storage area 1802. The program storage area 1801 can store program codes, which are used to cause the processor 110 to execute the text processing method provided by the embodiments of the present application by executing the program codes. In the embodiments of the present application, the data storage area 1802 can be used to store the created reference text data and the like.

[0102] The memory 180 can store an operating system and at least one application program required by a function (such as an application program for allowing a user to edit text and the like), and can also store reference text data added by the user through the invocation of the WebView control of the mobile phone 10 by clicking the reference text operation menu and invoking JavaScript.

[0103] The power module 140 can include a power supply, a power management component and the like. The power supply can be a battery. The power management component is used to manage the charging of the power supply and the power supply to other modules. The charging management module is used to receive charging input from a charger; the power management module is used to connect the power supply, and the charging management module is connected to the processor 110.

[0104] The mobile communication module 130 can 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 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the mobile phone 10. The mobile communication module 130 can receive electromagnetic waves by the antenna, and perform filtering, amplification and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 130 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves to be radiated by the antenna. In some embodiments, at least part of the functional modules of the mobile communication module 130 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 130 and at least part of the modules of the processor 110 can be arranged in the same device.

[0105] The wireless communication module 120 can include an antenna and implement the transceiving of electromagnetic waves via the antenna. The wireless communication module 120 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc., which are applied to the mobile phone 10. The mobile phone 10 can communicate with a network and other devices through the wireless communication technology.

[0106] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the mobile phone 10 can also be located in the same module.

[0107] The camera 170 is used to capture still images or videos. An object projects an optical image through a lens to a photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to an ISP (Image Signal Processing) to convert it into a digital image signal. The mobile phone 10 can implement the photographing function through the ISP, the camera 170, a video codec, a GPU (Graphic Processing Unit), the touch display 102, and an application processor, etc.

[0108] The touch display 102 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oled, a quantum dot light emitting diode (QLED), etc. For example, the display 102 is used to display the interface of a text editor of the mobile phone 10, etc.

[0109] The sensor module 190 can include a proximity light sensor, a pressure sensor, a gyro sensor, a barometric 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, etc.

[0110] The audio module 150 can 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 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 can be disposed in the processor 110, or some functional modules of the audio module 150 can be disposed in the processor 110. In some embodiments, the audio module 150 can include a speaker, a receiver, a microphone, and a headset jack.

[0111] The interface module 160 includes an external memory interface, a universal serial bus (USB) interface, and a subscriber identification module (SIM) card interface, etc. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to realize the expansion of the storage capacity of the mobile phone 10. The external memory card communicates with the processor 110 through the external memory interface to realize the data storage function. The universal serial bus interface is used for communication between the mobile phone 10 and other mobile phones. The subscriber identification module card interface is used to communicate with the SIM card installed in the mobile phone 10, such as reading the phone number stored in the SIM card, or writing the phone number into the SIM card.

[0112] In some embodiments, the mobile phone 10 also includes keys, a motor, and an indicator, etc. The keys can include volume keys, on / off keys, etc. The motor is used to generate a vibration effect of the mobile phone 10, such as generating a vibration when the mobile phone 10 of the user is called, to prompt the user to answer the mobile phone 10 call. The indicator can include a laser indicator, a radio frequency indicator, an LED indicator, etc.

[0113] The following will refer to FIG. 1, Figure 3 and FIG. 4, to describe in detail the process that the mobile phone 10 creates the content in the text selected by the user as a reference text through the text editing method provided by the embodiments of the present application when the user edits the rich text through the mobile phone 10.

[0114] As Figure 3 shown, the specific process of creating the reference text includes:

[0115] Step 300: The user opens the rich text editor installed on the mobile phone 10.

[0116] For example, in the embodiment shown in FIG. 1(a), the user clicks the icon 11 of the rich text editor by finger, and the mobile phone 10 opens the rich text editor. The user can edit the text in the blank content input box of the rich text editor shown in FIG. 1(b) by clicking the keyboard shown in FIG. 1(b). For example, in the embodiment shown in FIG. 1(c), the user is currently editing the content related to "Email Protocol".

[0117] In some embodiments, the rich text editor can be created by the developer on the Android platform through the WebView control to load the formatted standard Html template, which can carry the web view. Then it is installed on the mobile phone 10. The rich text editor can include an operation menu and a content input box. The user can input text, pictures, audio, video, tables, etc. in the content input box. And the user can operate the content input in the content input box by clicking the operation menu, for example, setting the font, color, background, etc. of the text in the content input box, and inserting pictures, formulas, etc. by clicking the operation menu.

[0118] For example, in the embodiment shown in FIG. 4, the user interface for the user to edit the text through the rich text editor installed on the mobile phone 10 is shown. The "undo", "restore", "font", "add picture" and "reference text" menus are set below the content input box. The user can input text and insert pictures in the content input box. The user can undo any operation on the content input box before clicking the "undo" menu, such as undoing the input text and undoing the inserted pictures. The user can restore any operation on the content input box before clicking the "restore" menu, such as restoring the deleted text. The user can set the font of the text in the content input box by clicking the "font" menu, such as setting the font to Song, Bold, Kai Ti, etc. The user can add pictures at the current cursor position in the content input box by clicking the "add picture" menu. The user can pop up the list of added reference texts by clicking the reference text menu.

[0119] It can be understood that in the specific implementation, the number and content of the operation menu can be customized by the developer, which is not limited in the present application.

[0120] Step 302: The mobile phone 10 obtains the content selected by the user in the rich text editor.

[0121] It should be noted that in some embodiments, the content selected by the user in the rich text editor of the mobile phone 10 can be: the content selected by the user in the rich text editor by the cursor. In some embodiments, the content selected by the user in the rich text editor of the mobile phone 10 can also be: when the user is editing text using the rich text editor of the mobile phone 10, after the user edits some characters or character sets, the rich text editor prompts the user whether to select the edited part or all content, and after the user confirms, the rich text editor determines it as the content selected by the user.

[0122] In addition, the content selected by the user can be any Html supported content of WYSIWYG, such as text, pictures, etc. In particular, for the scene of frequent text editing, for example, the user edits a paper, a patent, a scientific work, etc., the same term will often appear repeatedly. The user can select a word, a sentence, a paragraph 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 can interact with JavaScript through WebView, and calling JavaScript code in the WebView program only needs to set the property of the WebView control supporting JavaScript to true.

[0123] For example, in the embodiment shown in FIG. 4(a), the user edits multiple paragraphs of text about the email protocol in the rich text editor on the mobile phone 10, in which the term "SMTP protocol" appears multiple times. The content currently selected by the user's cursor is "SMTP protocol". After the user selects "SMTP protocol", the user acts on the touch display screen of the mobile phone 10 and clicks the reference text operation menu, which can trigger the editable WebView control to load the logic written based on the JavaScript script, call the event method about obtaining the selected content provided by the JavaScript script, and obtain the start position and end position of the text area selected by the user. The content corresponding to the text area, i.e. "SMTP protocol", is returned.

[0124] Step 304: The mobile phone 10 encapsulates the content selected by the user according to the preset data encapsulation format to obtain encapsulated data.

[0125] The encapsulated data includes a unique data identifier corresponding to the content selected by the user, such as data type and arrangement order, etc. so that the content selected by the user can be quickly found according to the encapsulated data identifier when searching in the database or related files.

[0126] For example, in the embodiment shown in FIG. 4, the user selects "SMTP protocol", and after clicking the reference text operation menu, the mobile phone 10 obtains that the content selected by the current user cursor is "SMTP protocol". Then, the JavaScript script is used to encapsulate "SMTP protocol". For example, in some embodiments, "SMTP protocol" is encapsulated as <div class=”referencetext”seqnum=”number 1”> . That is, by The tag adds the selected content of the user as an independent element. In this case, class="Reference Text" indicates that the selected text content of the user is of the type of reference text; and seqNum="number1" indicates that the selected text content of the user is in the first order in the reference text. That is, the "SMTP protocol" is defined as the type of reference text by JavaScript, and the order of the "SMTP protocol" in the reference text is the first order. For example, in the embodiment shown in Fig. 4(b), the user selects the "SMTP protocol", clicks the reference text operation menu, and the reference text list is popped up, in which the "SMTP protocol" is in the first line of the reference text list.

[0127] It should be noted that in the specific implementation process, the developer can encapsulate the selected content of the user according to various self-defined Html data encapsulation formats (for example, paragraph tags, Textarea tags, etc.), and the present application does not limit this. It should be noted that in the specific implementation process, the developer can encapsulate the selected content of the user according to various self-defined Html data encapsulation formats (for example, paragraph tags, Textarea tags, etc.), and the present application does not limit this.

[0128] Step 306: The mobile phone 10 stores the encapsulated data.

[0129] For example, in some embodiments, the encapsulated reference text data is stored in a database, or the encapsulated reference text data is saved in a certain file (for example, a.sml file) for JavaScript to call. When the user clicks the reference text operation menu of the rich text editor, the mobile phone 10 can display the queried reference text in the list by querying the database. For example, when the mobile phone 10 encapsulates and saves the "SMTP protocol" in the reference text database, the content popped up when the user clicks the reference text button of the rich text editor includes the "SMTP protocol".

[0130] It should be noted that in the specific implementation process, the developer can define the path of the saved encapsulated data according to the actual situation, and the present application does not limit this.

[0131] The following reference Figure 5 and 6 further describe in detail the text editing method provided by the embodiments of the present application by taking the use of the added reference text by the user when using the mobile phone 10 to edit the rich text as an example.

[0132] Specifically, as shown in Figure 5 the specific process of using the reference text includes:

[0133] Step 500: The mobile phone 10 listens to the content input by the user in the rich text editor in real time.

[0134] For example, in some embodiments, the user inputs a few characters (e.g. two or three characters) in the content input box of the rich text editor, and the Mutation Observer in the Html monitors the characters input by the user in the content input box of the rich text editor in real time as an interface for monitoring the changes of the Document Object Model (DOM). Each time the user inputs new content, i.e. each time the DOM changes, a Mutation Observer event is triggered, a callback function of the Mutation Observer is invoked, and a change record is generated. The change record contains all information related to the change. For example, in the embodiment shown in Fig. 6(a), the user inputs "SM" in the content input box of the rich text editor, and the callback function of the Mutation Observer returns "SM" to the Html.

[0135] Step 502: The mobile phone 10 traverses the storage path of the reference text, filters out a plurality of candidate reference texts matching the content input by the user from the storage path, and displays the plurality of candidate reference texts for the user to select. The storage path of the reference text (e.g. a database, a set file.sml file, etc.) stores a plurality of reference text data encapsulated in a specific format.

[0136] For example, in the embodiment shown in Fig. 6(a), after the mobile phone 10 listens to the content "SM" input by the user in the content input box of the rich text editor, the JavaScript code is invoked to traverse the reference text database. A plurality of candidate reference texts (e.g. "SMTP protocol", "SMT process", "SMT forum", etc.) matching "SM" are filtered out, and are displayed on the display screen in the form of a pop-up box as shown in Fig. 6(a) for the user to select.

[0137] Step 504: The mobile phone 10 obtains the overall data of the reference text selected by the user.

[0138] For example, after the user inputs "SM" in the content input box of the rich text editor, the user selects the entry "SMTP protocol" from the pop-up candidate reference text dialog box. The mobile phone 10 searches the storage path (e.g. the reference text database) of the reference text according to the selected entry, and obtains the overall data of the reference text corresponding to the selected entry. For example, the selected entry "SMTP protocol" is in the first order, and the order of the identifier of the encapsulated data in the storage path corresponding to the selected entry is "number 1". The data of the category of the reference text corresponding to the identifier "number 1" is searched, and the complete content under the entry "SMTP protocol" is obtained.

[0139] Step 506: The mobile phone 10 uses JavaScript to insert the entire data of the reference text selected by the user into the current cursor position of the user and displays it on the user interface.

[0140] For example, in the embodiment shown in FIG6(b), when the user clicks to select "SMTP protocol" in the pop-up box of the referenced text, the editor of the mobile phone 10 inserts "SMTP protocol" into the position currently being edited by the user through a JavaScript script.

[0141] When editing text in the content input box of the mobile phone 10's rich text editor, users no longer need to edit the content they want to edit one by one through the mobile phone's input method. Instead, they only need to enter a few characters, and the mobile phone 10 will automatically associate multiple alternative reference texts for the user to choose from. The user selects the reference text they want and inserts it into the node where the cursor is currently located. This greatly improves editing efficiency and avoids input errors during manual editing.

[0142] In some embodiments, the user can also directly select a reference text entry from a pop-up list of saved reference texts by clicking on a reference text menu. The editable WebView control of the mobile phone 10 then calls JavaScript script logic to obtain the corresponding complete reference text data based on the selected reference text entry and insert it into the current cursor position. For example, in the embodiment shown in FIG6(c), after the user clicks on the reference text menu, a pop-up reference text list includes "SMTP Protocol", "POP Protocol" and "IMAP" protocols. The user selects "SMTP Protocol", and the selected "SMTP Protocol" is inserted into the current cursor position.

[0143] The following will refer to Figure 7 and 8, taking the case where a user modifies an existing quoted text while using a mobile phone 10 for rich text editing as an example, the text editing method provided in the embodiment of the present application is described in detail.

[0144] like Figure 7 As shown in the figure, the specific process of modifying the quoted text includes:

[0145] Step 700: The mobile phone 10 monitors in real time the content changes of the quoted text input by the user in the content input box of the rich text editor.

[0146] For example, in the embodiment shown in Fig. 8(a), the user edits "SMTP protocol" before the user edits the content in the content input box of the mobile phone 10 rich text editor for a total of 5 times. As shown in Fig. 8(b), the user directly modifies "SMTP protocol" to "smtp protocol" at the position where the current cursor is located. Then the change observer in the Html template loaded by the editable WebView control of the mobile phone 10 listens to the modification of "SMTP protocol" to "smtp protocol" and returns the modification record.

[0147] Step 702: The mobile phone 10 acquires the modified content.

[0148] For example, in the embodiment shown in Fig. 8(b), after the change observer in the Html listens to the modification of "SMTP protocol" to "smtp protocol", the editable WebView control of the mobile phone 10 calls the program written based on the JavaScript script to acquire the modified content "smtp protocol" in the modification record returned by the change observer.

[0149] Step 704: The mobile phone 10 acquires all positions of the reference text before the user modification in the content input box of the rich text editor.

[0150] For example, in the embodiment shown in Fig. 8(a), the editable WebView control of the mobile phone 10 calls the program written based on the JavaScript script to traverse all the content in the content input box of the rich text editor and acquires that the user edits "SMTP protocol" in the Html content in the content input box of the rich text editor for a total of 5 times.

[0151] Step 706: The mobile phone 10 inserts the content of the modified reference text into all the nodes where the reference text before the modification is located. Thus, the effect of modifying multiple same contents at the same time is achieved by modifying one content, that is, the effect of linkage modification is achieved. Thus, when the user edits the text, especially when the same words, sentences or paragraphs appear multiple times in a long content, the time for modifying the same content is greatly shortened and the user editing efficiency is improved.

[0152] Specifically, for example, in the embodiment shown in Fig. 8(c), the editable WebView control of the mobile phone 10 calls the program written based on the JavaScript script code to retrieve the encapsulated data of "SMTP protocol" in the storage path where the reference text data encapsulated in a specific format is originally stored, and modify "SMTP protocol" to "smtp protocol" therein. Then the JavaScript modifies "SMTP protocol" to "smtp protocol" in the other 4 places in the content input box of the rich text editor.

[0153] In addition, in some embodiments, the user can also modify the quoted text that the user wants to modify by directly clicking the quoted text operation menu in the rich text editor of the mobile phone 10 and selecting the quoted text that the user wants to modify from the pop-up quoted text dialog box.

[0154] For example, in the embodiment shown in FIG9(a), the user clicks the reference text operation menu, and the mobile phone 10 queries the database and displays the retrieved reference texts "SMTP Protocol," "POP Protocol," and "IMAP Protocol" in a pop-up dialog box. The user directly selects "SMTP Protocol" and modifies it to "smtp Protocol." The editable WebView control of the mobile phone 10 invokes logic written in JavaScript, using a method similar to step 704 to retrieve all locations in the rich text editor's content input box where the reference text appeared before the user modified it. For example, in the embodiment shown in FIG9(b), the encapsulated data for "SMTP Protocol" is retrieved from the storage path originally storing the reference text data encapsulated in a specific format, and "SMTP Protocol" is modified to "smtp Protocol." Then, JavaScript is used to directly modify the five "SMTP Protocol" instances that the user had already edited in the rich text editor's content input box to "smtp Protocol." That is, the user can directly modify the reference text to be modified by clicking the reference text operation menu, and the content of all nodes where the reference text to be modified appears in the input box can be directly modified to the modified reference text at one time, which greatly improves the efficiency of text modification and avoids omissions and wrong modifications.

[0155] The following will refer to Figure 10 The text editor 1000 provided in an embodiment of the present application is introduced.

[0156] like Figure 10 As shown, 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. The text input box 1001 is used to provide a user with an interface for editing text in the text editor 1000.

[0157] The quoted text determining unit 1003 is configured to determine the first content selected by the user from the text in the text editor 1000 as quoted text when detecting that the user selects the first content from the text in the text editor 1000 and clicks the quoted text operation menu 1002 .

[0158] The linkage modification unit 1004 is configured to modify the third content at the second position of the text that is the same as the first content in the case where it is detected that the user has modified the second content at the first position of the text that is the same as the first content.

[0159] It can be understood that, Figure 10 The text editor 1000 shown corresponds to the text processing method provided by the present application, and the technical details in the above specific description of the text processing method provided by the present application are still applicable to the text editor 1000 shown. For specific description, please refer to the above, which will not be repeated here. Figure 10 The text editor 1000 shown corresponds to the text processing method provided by the present application, and the technical details in the above specific description of the text processing method provided by the present application are still applicable to the text editor 1000 shown. For specific description, please refer to the above, which will not be repeated here.

[0160] Embodiments of the mechanisms disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. Embodiments of the application can 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.

[0161] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices, in known fashion. For purposes of this application, a processing system includes any system that has a processor, such as for example a digital signal processor (DSP), a microcontroller, an (application specific integrated circuit (ASIC), or a microprocessor.

[0162] The program code can be implemented in a high level procedural or object oriented programming language to communicate with a processing system. The program code can be implemented in assembly or machine language, if desired. In fact, the mechanisms described herein are not limited in scope to any particular programming language. In any case, the language can be a compiled or interpreted language.

[0163] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or by other computer readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation, floppy diskettes, optical disks, optical fiber, Read Only Memory (ROM), Random Access Memory (RAM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), magnetic or optical cards, flash memory, or any other suitable device. Accordingly, a machine-readable medium includes any medium that is capable of storing or transmitting electronic instructions or information that can be used to program a computer to perform any of the methods described above.

[0164] In the drawings, some of the structural or methodological features can be shown in particular arrangements and / or orders. However, it should be understood that such particular arrangements and / or orders can not be required. Instead, these features can be arranged in a different manner and / or order than shown in the illustrative figures, in some embodiments. Additionally, inclusion of a structural or methodological feature in a particular figure is not meant to imply that such feature is required in all embodiments, and in some embodiments, these features can not be included or can be combined with other features.

[0165] It should be noted that each unit / module mentioned in the device embodiments of the present application is a logical unit / module, in the physical world, one logical unit / module can be one physical unit / module, also can be a part of one physical unit / module, also can be realized in combination of multiple physical unit / modules, the physical realization of these logical units / modules is not the most important, the combination of the functions realized by these logical units / modules is the key to solve the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules which are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.

[0166] It has to be noted that, in the description of the application, the terms "first", "second", etc. are used only for distinguishing between similar elements, and do not connote any order, sequence or priority. Moreover, 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 can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0167] While the application has been illustrated and described in detail in the drawings and foregoing description, the same is to be considered as illustrative and not restrictive in character, since the scope of the application is indicated by the appended claims.

Claims

1. A text processing method, characterized in that: include: The text editor of the electronic device determines the first content selected by the user from the text in the text editor as the quoted text; When the text editor detects that the user has modified a second content at a first position of the text that is identical to the first content, the text editor performs the same modification on a third content at a second position of the text that is identical to the first content; When the text editor detects that the user has modified the second content that is identical to the first content at the first position of the text, the text editor performs the same modification on the third content that is identical to the first content at the second position of the text, including: After monitoring the modification made by the user to the second content identical to the first content at the first position of the text by the text editor of the electronic device, the text editor acquires the modified second content; The text editor traverses the text to obtain a second position in the text where a third content identical to the first content is located; The text editor replaces third content identical to the first content at a second position of the text with content identical to the modified second content.

2. The method according to claim 1, characterized in that The first content includes at least one of characters and images.

3. The method according to claim 1, characterized in that The text editor of the electronic device determines the first content selected by the user from the text in the text editor as the quoted text, including: When the text editor detects that the same content as the first content appears in multiple locations in the text, prompting the user whether to set the first content as a quoted text; In a case where the user determines to set the first content as quoted text, the text editor determines the first content as quoted text.

4. The method according to claim 1 or 3, characterized in that The text editor of the electronic device determines the first content selected by the user from the text in the text editor as the quoted text, including: The text editor of the electronic device receives a trigger event bound to a user selecting a first content from text in the text editor; The text editor obtains the first content selected by the user from the text in the text editor; The text editor encapsulates the first content according to a preset data encapsulation format to obtain encapsulated data; The text editor stores the packaged data.

5. The method according to claim 4, characterized in that The text editor includes a reference text operation menu, and the trigger event bound to the user selecting the first content from the text in the text editor includes: the user selects the first content with a cursor and then clicks the reference text operation menu.

6. The method according to claim 4, characterized in that Storing the packaged data includes: The packaged data is stored in at least one of a database and a setting file.

7. The method according to claim 1, characterized in that Also includes: When the text editor detects a user's replacement operation on the referenced text of the first content, the text editor replaces the content identical to the first content that appears at multiple locations in the text with the content to be replaced by the user.

8. The method according to claim 1, characterized in that The first content includes a plurality of characters, and the method further includes: When the text editor detects that the user has input partial characters of the first content at a third position, displaying all characters of the first content to the user; When it is detected that the user clicks all the characters of the displayed first content, all the characters of the first content are added at the third position.

9. The method according to claim 1, characterized in that The text editor of the electronic device is created based on the WebView control loading the Html template.

10. The method according to claim 9, characterized in that The text editor of the electronic device determines the first content selected by the user from the text in the text editor as the quoted text, including: The WebView control of the electronic device calls the Javascript script code to determine the first content selected by the user from the text in the text editor as the quoted text.

11. The method according to claim 9, characterized in that When the text editor detects that the user has modified the second content that is identical to the first content at the first position of the text, the text editor performing the same modification on the third content that is identical to the first content at the second position of the text includes: The WebView control of the electronic device calls the Javascript script code, and when it is detected that the user has modified the second content at the first position of the text that is identical to the first content, the third content at the second position of the text that is identical to the first content is modified in the same manner.

12. A text editor, characterized in that include: Text input box, quoted text operation menu, quoted text confirmation unit and linkage modification unit; The text input box is used to provide a user with an interface for editing text in the text editor; The quoted text determining unit is configured to, upon detecting that a user selects a first content from the text in the text editor and clicks the quoted text operation menu, determine the first content selected by the user from the text in the text editor as the quoted text; The linkage modification unit is configured to, upon detecting that a user has modified a second content identical to the first content at a first position of the text, modify a third content identical to the first content at a second position of the text in the same manner; The linkage modification unit modifies the third content at the second position of the text that is identical to the first content in the following manner when detecting that the user has modified the second content at the first position of the text that is identical to the first content: After monitoring the modification performed by the user on the second content identical to the first content at the first position of the text, the linkage modification unit obtains the modified second content; The linkage modification unit traverses the text to obtain a second position in the text where a third content identical to the first content is located; The linkage modification unit replaces third content identical to the first content at a second position of the text with content identical to the modified second content.

13. The text editor according to claim 12, wherein: The first content includes at least one of characters and images.

14. The text editor according to claim 12, wherein: The quoted text determining unit determines the first content selected by the user from the text in the text editor as the quoted text in the following manner: When the quoted text determining unit detects that the content identical to the first content appears in multiple locations in the text, the user is prompted whether to set the first content as a quoted text; In a case where the user determines to set the first content as a quoted text, the quoted text determination unit determines the first content as a quoted text.

15. The text editor according to claim 12 or 14, characterized in that The quoted text determining unit determines the first content selected by the user from the text in the text editor as the quoted text in the following manner: The reference text determination unit receives a trigger event bound to a user selecting a first content from text in a text editor; The quoted text determination unit obtains the first content selected by the user from the text in the text editor; The reference text determination unit encapsulates the first content according to a preset data encapsulation format to obtain encapsulated data; The quoted text determination unit stores the encapsulated data.

16. The text editor according to claim 12, wherein: Also includes: The unified replacement unit is used to replace the content identical to the first content that appears in multiple locations in the text with the content to be replaced by the user when a user replaces the referenced text of the first content is detected.

17. The text editor according to claim 12, wherein: The first content includes a plurality of characters, and The text editor also includes: The associative input unit is used to display all the characters of the first content to the user when it is detected that the user has input part of the characters of the first content at the third position; and to add all the characters of the first content to the third position when it is detected that the user has clicked on all the characters of the displayed first content.

18. The text editor according to claim 12, wherein: Also includes: The quoted text display unit is used to display the determined quoted text when detecting that the user clicks the quoted text operation menu.

19. A readable medium, characterized in that The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the text processing method according to any one of claims 1 to 11.

20. An electronic device, characterized in that: include: a memory for storing instructions to be executed by one or more processors of the electronic device, and The processor is one of the processors of the electronic device, and is used to execute the text processing method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Input completion method and device, electronic equipment and readable storage medium

    CN107831915A

  • Data transmission method based on multiple Webviews, server and storage medium

    CN111222075A

  • Text data processing method, software, storage medium and equipment

    CN111461933A