CN116339520A - Language editing method, device, electronic equipment and storage medium - Google Patents

Language editing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116339520A
CN116339520A CN202310147646.1A CN202310147646A CN116339520A CN 116339520 A CN116339520 A CN 116339520A CN 202310147646 A CN202310147646 A CN 202310147646A CN 116339520 A CN116339520 A CN 116339520A
Authority
CN
China
Prior art keywords
language
editor
user account
clipboard
editing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310147646.1A
Other languages
Chinese (zh)
Inventor
王一平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202310147646.1A priority Critical patent/CN116339520A/en
Publication of CN116339520A publication Critical patent/CN116339520A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0483Interaction with page-structured environments, e.g. book metaphor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a language editing method, a language editing device, electronic equipment and a storage medium, and relates to the technical field of computers. The present disclosure is directed to improving efficiency in language editing processes. The method comprises the following steps: starting a language editor and displaying a language editing area; displaying a candidate language interface on the current page in the language editor under the condition that the current page of the user account in the language editing area is detected to execute a first preset operation; the candidate language interface is for displaying a language in the language editor clipboard, the language including at least a portion of the edited language.

Description

Language editing method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a language editing method, a device, an electronic device and a storage medium.
Background
In a computer language editing process, languages in different areas often have some degree of correlation, such as languages in different documents or languages in different locations in the same document. Thus, developers often need to repeatedly review between several languages of the same document or different documents to refer to. This requires frequent page switching operations by the developer, which results in lower language editing efficiency.
Disclosure of Invention
The disclosure provides a language editing method, a device, an electronic device and a storage medium, aiming at improving efficiency in a language editing process. The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a language editing method, including: starting a language editor and displaying a language editing area; displaying a candidate language interface on the current page in the language editor under the condition that the current page of the user account in the language editing area is detected to execute a first preset operation; the candidate language interface is for displaying a language in the language editor clipboard, the language including at least a portion of the edited language.
Optionally, the method further comprises: carrying out keyword recognition on the language in the language editor clipboard to obtain a plurality of keywords; and adding the keywords to the language editing area in response to a preset operation performed by the user account on any one keyword.
Optionally, the language editing area includes a plurality of historical language entries; the candidate language interface comprises a first preset control; the method further comprises the steps of: determining a target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing area; and adding the target historical language to the language editor clipboard in response to a third preset operation of the first preset control by the user.
Optionally, the target history language includes a language fragment, the candidate language interface includes a positioning control, and the method further includes: displaying a positioning control under the condition that the user account selects the language fragment; responding to the operation of the user account on the positioning control, determining an original language segment corresponding to the language segment, and displaying a page where the original language segment is located for reference of the user account; the language fragments are part of the language in the original language fragments.
Optionally, the target history language includes a language segment, the candidate language interface includes a split control, and the method further includes: responding to the operation of the user account on the splitting control, splitting the language segments to obtain a plurality of language segments; in response to an operation of the user account on any one of the plurality of language fragments, the language fragment is added to the language editing area.
Optionally, determining the target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing region includes: under the condition that the second preset operation is a selection operation, determining a history language selected by the user account for executing the selection operation, and determining the history language selected by the user account as a target history language; and under the condition that the second preset operation is the clicking operation, determining a clicking position clicked by the user account executing the clicking operation, and determining a historical language of a row where the clicking position is located as a target historical language.
Optionally, the language in the language editor clipboard includes a target historical language and a language in the system clipboard.
Optionally, the candidate language interface includes a first display panel and a second display panel; the first display plate is used for displaying the language in the system clipboard; the second display plate is used for displaying the target historical language.
Optionally, the candidate language interface further includes a second preset control; each row of languages in the first display plate and the second display plate corresponds to a second preset control; the method further comprises the steps of: and responding to the operation of the user account on a second preset control, and adding the language corresponding to the second preset control into the language editing area.
Optionally, the candidate language interface further includes a third preset control; each row of languages in the first display plate and the second display plate corresponds to a third preset control; the method further comprises the steps of: and responding to the operation of the user account on a third preset control, and deleting the language corresponding to the third preset control in the candidate language interface.
Optionally, the language editor clipboard is configured with a plurality of configuration items; the method further comprises the steps of: after the state of a first configuration item in the plurality of configuration items is set from the first state to the second state, canceling keyword recognition on the language in the language editor clipboard; after the state of the second configuration item in the plurality of configuration items is set from the first state to the second state, canceling reading the language in the system clipboard.
Optionally, the method further comprises: and setting an entry of the target history language allowed to be stored in the language editor clipboard as a preset entry in response to a configuration operation of a third configuration item in the plurality of configuration items by a user.
According to a second aspect of the embodiments of the present disclosure, there is provided a language editing apparatus including a starting unit and a display unit; a starting unit configured to start the language editor and display the language editing area; a display unit configured to display a candidate language interface on a current page in the language editor in case that it is detected that the user account performs a first preset operation on the current page in the language editing area; the candidate language interface is for displaying a language in the language editor clipboard, the language including at least a portion of the edited language.
Optionally, the apparatus further comprises a processing unit; the processing unit is used for recognizing keywords of the language in the language editor clipboard to obtain a plurality of keywords; and adding the keywords to the language editing area in response to a preset operation performed by the user account on any one keyword.
Optionally, the language editing area includes a plurality of historical language entries; the candidate language interface comprises a first preset control; the processing unit is further configured to: determining a target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing area; and adding the target historical language to the language editor clipboard in response to a third preset operation of the first preset control by the user.
Optionally, the target history language includes a language fragment, the candidate language interface includes a positioning control, and the display unit is further configured to: displaying a positioning control under the condition that the user account selects the language fragment; responding to the operation of the user account on the positioning control, determining an original language segment corresponding to the language segment, and displaying a page where the original language segment is located for reference of the user account; the language fragments are part of the language in the original language fragments.
Optionally, the target history language includes a language segment, the candidate language interface includes a split control, and the processing unit is further configured to: responding to the operation of the user account on the splitting control, splitting the language segments to obtain a plurality of language segments; in response to an operation of the user account on any one of the plurality of language fragments, the language fragment is added to the language editing area.
Optionally, the processing unit is specifically configured to: under the condition that the second preset operation is a selection operation, determining a history language selected by the user account for executing the selection operation, and determining the history language selected by the user account as a target history language; and under the condition that the second preset operation is the clicking operation, determining a clicking position clicked by the user account executing the clicking operation, and determining a historical language of a row where the clicking position is located as a target historical language.
Optionally, the language in the language editor clipboard includes a target historical language and a language in the system clipboard.
Optionally, the candidate language interface includes a first display panel and a second display panel; the first display plate is used for displaying the language in the system clipboard; the second display plate is used for displaying the target historical language.
Optionally, the candidate language interface further includes a second preset control; each row of languages in the first display plate and the second display plate corresponds to a second preset control; the processing unit is further configured to: and responding to the operation of the user account on a second preset control, and adding the language corresponding to the second preset control into the language editing area.
Optionally, the candidate language interface further includes a third preset control; each row of languages in the first display plate and the second display plate corresponds to a third preset control; the processing unit is further configured to: and responding to the operation of the user account on a third preset control, and deleting the language corresponding to the third preset control in the candidate language interface.
Optionally, the language editor clipboard is configured with a plurality of configuration items; the processing unit is further configured to: after the state of a first configuration item in the plurality of configuration items is set from the first state to the second state, canceling keyword recognition on the language in the language editor clipboard; after the state of the second configuration item in the plurality of configuration items is set from the first state to the second state, canceling reading the language in the system clipboard.
Optionally, the processing unit is further configured to: and setting an entry of the target history language allowed to be stored in the language editor clipboard as a preset entry in response to a configuration operation of a third configuration item in the plurality of configuration items by a user.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the language editing method of the first aspect described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having instructions stored thereon, which, when executed by a processor of an electronic device, enable the electronic device to perform the language editing method of the first aspect as described above.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the language editing device starts the language editor and displays the language editing area. Further, in the case that the user account is detected to execute the first preset operation in the language editing area, displaying a candidate language interface in the language editor to display the language in the language editor clipboard. Because the language in the language editor clipboard comprises at least part of the edited language, the language in the language editor clipboard can be displayed in the language editing area at any time for a developer to refer at any time, repeated retrieval and reference among different interfaces when the developer edits the language is avoided, and therefore the language editing efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic diagram of a voice editing system, shown in accordance with an exemplary embodiment;
FIG. 2 is one of the flow diagrams of a language editing method shown in accordance with an exemplary embodiment;
FIG. 3 is one of the candidate code interface schematics shown in accordance with an exemplary embodiment;
FIG. 4 is a second flow chart of a language editing method according to an exemplary embodiment;
FIG. 5 is one of the language edit section schematics shown in accordance with an exemplary embodiment;
FIG. 6 is a second schematic diagram of a language editing area shown in accordance with an exemplary embodiment;
FIG. 7 is a third illustration of a language editing region shown in accordance with an exemplary embodiment;
FIG. 8 is a second schematic diagram of a candidate code interface, according to an example embodiment;
FIG. 9 is a third illustrative diagram of a candidate code interface in accordance with an exemplary embodiment;
FIG. 10 is a third flow chart of a language editing method according to an exemplary embodiment;
FIG. 11 is a schematic diagram of a language editing device according to an exemplary embodiment;
fig. 12 is a schematic diagram showing a structure of an electronic device according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In addition, in the description of the embodiments of the present disclosure, "/" means or, unless otherwise indicated, for example, a/B may mean a or B. "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "a plurality" means two or more than two.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, user behavior information, etc.) and the data (including, but not limited to, program code, etc.) related to the present disclosure are information and data authorized by the user or sufficiently authorized by each party.
Before explaining the embodiments of the present disclosure in detail, some related terms and related techniques related to the embodiments of the present disclosure are described.
Computer programming language: is the most important tool of programming, which refers to a language that a computer can accept and process, with certain grammatical rules, typically a set of explicit rules that represent information in discrete form by characters, symbols or signal symbols.
Application development: also known as software development, is the process of building a software system or software part of a system according to user requirements.
Language editor: a language editor is a text editor used by developers to write computer programs. It is typically a stand-alone application, either existing as part of an integrated development environment, or a web page editor running in a browser.
Plug-in: is a program written by an application program interface conforming to a certain specification. It can only run under a program-specified system platform (possibly supporting multiple platforms simultaneously) and cannot run separately from the specified platform.
Front end development: front-end development is a process of creating a front-end interface such as a WEB (WEB) page or an Application (APP) for a user, and user interface interaction of an internet product is realized through HTML, CSS, javaScript, and derived technologies, frameworks, and solutions.
In the computer language editing process, there is often some degree of correlation between codes in different areas, such as codes in different documents or codes at different locations in the same document, etc. Thus, developers often need to frequently and repeatedly review between several codes of the same document or different documents for reference. This requires frequent page switching operations by the developer, which results in lower language editing efficiency.
In view of this, the embodiments of the present disclosure provide a language editing method, which aims to enable a user to save a part of selected codes in a specific structure at any time, and display the selected codes in any other code structure at any time without disturbing a clipboard or an original code structure of the user, and to cancel the selected codes at any time after the user refers to the selected codes, or add another code to a plug-in for referring to call when the next code is developed.
The language editing method provided by the embodiments of the present disclosure is described in detail below with reference to the accompanying drawings.
The language editing method provided by the embodiment of the disclosure can be applied to a language editing system, and fig. 1 shows a schematic structure of the language editing system. As shown in fig. 1, the language editing system 10 includes a language editing apparatus 11 and an electronic device 12. The language editing apparatus 11 is connected to the electronic device 12. The language editing apparatus 11 and the electronic device 12 may be connected by a wired manner or may be connected by a wireless manner, which is not limited in the embodiment of the present disclosure.
The language editing means 11 is for starting the language editor and displaying the language editing area. The language editing apparatus 11 is further configured to display a candidate language interface on a current page in the language editor in case it is detected that the user account performs a first preset operation on the current page in the language editing area.
The language editing apparatus 11 can implement the language editing method of the embodiment of the present disclosure in various electronic devices 12. For example, the electronic device 12 may be a cell phone, tablet computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA), desktop computer, cloud server, etc., and embodiments of the present disclosure are not limited to a particular type of electronic device.
In different application scenarios, the language editing device 11 and the electronic device 12 may be independent devices, or may be integrated in the same device, which is not specifically limited in the embodiments of the present disclosure.
When the language editing apparatus 11 and the electronic device 12 are integrated in the same device, the data transmission between the language editing apparatus 11 and the electronic device 12 is performed by data transmission between internal modules of the device. In this case, the data transfer flow therebetween is the same as "in the case where the language editing apparatus 11 and the electronic device 12 are independent of each other".
In the following embodiments provided in the embodiments of the present disclosure, explanation will be given taking an example in which the language editing apparatus 11 and the electronic device 12 are provided independently of each other.
FIG. 2 is a flow diagram illustrating a language editing method according to some example embodiments. In some embodiments, the language editing method described above may be applied to the language editing apparatus 11, the electronic device 12, and the like as shown in fig. 1.
As shown in fig. 2, the language editing method provided in the embodiment of the present disclosure includes the following S201 to S202.
S201, the language editing device starts a language editor and displays a language editing area.
As one possible implementation, the language editing device starts the language editor in response to an operation of opening the language editor by the user, and displays a language editing area in the language editor.
It should be noted that, the language editing device or the electronic device is provided with a language editor, and the language editor may be any kind of language editor, for example, a Visual Studio Code (VS Code) editor, a webstore editor, etc., and the embodiment of the disclosure is not limited to a specific language editor.
Languages in embodiments of the present disclosure include, but are not limited to, computer languages (also known as code), written languages (such as text), and the like. For ease of understanding, the disclosed embodiments are illustrated with code as an example.
Illustratively, when a developer performs code development, it is necessary to open a language editor in a language editing apparatus or an electronic device. Correspondingly, the language editing device or the electronic equipment responds to the starting operation of the user, starts the language editor, and displays a language editing area in the language editor for a developer to edit the language.
S202, in the case that the user is detected to execute a first preset operation in the language editing area, the language editing device displays a candidate language interface in a language editor.
Wherein the candidate language interface is for displaying a language in the language editor clipboard, the language including at least a portion of the edited language.
As one possible implementation, a developer deploys a pre-editor plug-in a language editor. After the editor plug-in is opened, the language editing device detects an operation performed by the user in the language editing area. In the case where it is detected that the user performs the first preset operation in the language editing region, the language editing device displays the candidate code interface in the language editor.
For example, the first preset operation may be a wake operation performed by the user in the language editing region, and the language editing device displays the candidate code interface in the language editor after detecting that the user performs the wake operation in the language editing region.
As yet another example, the first preset operation may be a cursor moving-in operation performed by the user in the language editing region, and after the user moves the cursor into an arbitrary position in the language editing region, the language editing device displays the candidate code interface below the current cursor position.
As shown in fig. 3, a candidate code interface is shown. After the user moves the cursor into the third row in the language editing region, the language editing device displays a candidate code interface below the current cursor position to reveal the code in the language editor clipboard to the user.
The technical scheme provided by the disclosure at least brings the following beneficial effects: the language editing device starts the language editor and displays the language editing area. Further, in the event that the user account is detected to perform a first preset operation in the language editing area, a candidate code interface is displayed in the language editor to display codes in the language editor clipboard. Because the codes in the language editor clipboard comprise at least part of the languages of the edited codes, the codes in the language editor clipboard can be displayed in a code editing area at any time for a developer to refer at any time, repeated retrieval and reference among different interfaces when the developer edits the languages are avoided, and therefore the language editing efficiency is improved.
In one design, the language editing region includes a plurality of history code entries; the candidate code interface includes a first preset control. In order to add history codes in a language editing area to a language editor clipboard, as shown in fig. 4, the language editing method provided by the embodiment of the present disclosure further includes:
s301, responding to a second preset operation executed by a user in the language editing area, the language editing device determines a target historical language from a plurality of historical language items.
The second preset operation may be a selection operation, a click operation, or other operations with a selection function, and the specific form of the second preset operation is not limited in the embodiments of the present disclosure.
As one possible implementation, in the case where the second preset operation is the selection operation, the language editing device determines the history code selected by the user performing the selection operation, and determines the history code selected by the user as the target history code.
Illustratively, as shown in FIG. 5, the language edit section includes a history code entry 1 (at line number 1), a history code entry 2 (at line number 2). The user selects a part of the codes (codes in the blocks) in the history code entry 2, and the language editing device determines the part of the codes as the target history codes.
As another possible implementation manner, in the case that the second preset operation is a click operation, the language editing device determines a click position clicked by the user performing the click operation, and determines a history code of a line where the click position is located as the target history code.
Illustratively, as shown in FIG. 6, the language edit section includes a history code entry 1 (at line number 1), a history code entry 2 (at line number 2). The user performs a click operation at the end of the history code entry 2, and the language editing device determines all codes of the present line (i.e., line 2) as target history codes.
S302, responding to a third preset operation of the user on the first preset control, and adding the target historical language into a clipboard of the language editor by the language editing device.
Illustratively, as shown in FIG. 7, after opening the editor plug-in, the plug-in interface may be invoked at any location in the language editing area. Wherein the add-in interface is a first preset control (e.g., an "add to clipboard" button). After the user clicks the "Add to clipboard" button, the language editing device may add the target history code (in the case of selected text, the selected text, or else the entire text on which the cursor is located) to the language editor clipboard for subsequent use.
In one design, the target history code includes a language snippet and the candidate code interface includes a positioning control. Displaying the positioning control by a language editing device under the condition that the user account selects the language fragments; responding to the operation of the user account on the positioning control, determining an original code segment corresponding to the language fragment by a language editing device, and displaying a page where the original code segment is located for the user account to refer to; the language fragments are part of the languages in the original code segment.
The positioning control may be a button or a link, and the embodiment of the present disclosure does not limit a specific form of the positioning control.
For example, the language in the language editor clipboard is a language fragment, and the content that the user wants to copy includes the language fragment, at this time, there may be a positioning key or a link key to position to the original code fragment for the user to select and copy.
In one design, the target history code includes a language section and the candidate code interface includes a split control. And responding to the operation of the user account on the splitting control, and splitting the language segments by the language editing device to obtain a plurality of language segments. Further, in response to an operation of the user account on any one of the plurality of language fragments, the language editing device adds the language fragment to the language editing area.
For example, the language in the language editor clipboard is a language fragment (made up of multiple language fragments) with corresponding shortcuts that can be clicked if the user wants to select a portion of the language therein, and the language fragment can be split or copied to select a portion of the language fragment therein. Alternatively, the original code segment may be located for reference by the user.
In one design, code in the language editor clipboard includes target history code as well as code in the system clipboard.
The target history code is the code added to the clipboard of the language editor by the user. The system clipboard is a clipboard of an operating system deployed by a language editing device or an electronic device.
In practical application, a user can copy codes (such as codes in a webpage and codes in a language editor) at any place into a system clipboard through a copying operation of the system. After the editor plug-in is started, the editor plug-in can acquire the content in the system clipboard through a preset system interface.
Alternatively, as shown in FIG. 8, the candidate code interface includes a first display tile and a second display tile; wherein the first display panel is used for displaying codes in the system clipboard; the second display panel is used for displaying the target history codes.
It can be seen that the editor plug-in is compatible with the system's own clipboard, and if text content exists in the system clipboard, it will also be presented in the same manner as the alternate text previously added by the plug-in.
In one design, the candidate code interface further includes a second preset control; each row of codes in the first display plate and the second display plate corresponds to a second preset control.
In some embodiments, in response to a user operation on one of the second preset controls, the language editing device adds a code corresponding to the second preset control to the language editing region.
In one design, the candidate code interface further includes a third preset control; each row of codes in the first display plate and the second display plate corresponds to a third preset control.
In some embodiments, in response to a user operation on a third preset control, the language editing device deletes the code corresponding to the third preset control in the candidate code interface.
Illustratively, the second preset control is an "entire row add" button and the third preset control is a "delete" button. As shown in fig. 9, a plurality of code entries in the candidate code interface are displayed under the "added entries" one by one according to the adding sequence, a button for "adding the whole row" is provided for the user at the end of each code entry, and the user can add the corresponding code entry at the position of the cursor by clicking the button. If the cursor is in a selected text state while hovering over the language editing region, the language editing device replaces the selected text.
In one design, to add the history code in the language editing area to the language editor clipboard, as shown in fig. 10, the language editing method provided by the embodiments of the present disclosure further includes:
s401, the language editing device recognizes keywords of the language in the language editor clipboard to obtain a plurality of keywords.
As a possible implementation manner, the language editing device performs keyword recognition on the codes in the clipboard of the language editor according to the word segmentation algorithm to obtain a plurality of keywords.
Illustratively, a piece of code in the language editor clipboard is "position, token: the language editing device identifies the key words of the code segment to obtain key word 1: position, keyword 2: a token.
S402, the language editing device responds to a preset operation executed by a user on any keyword, and the language editing device adds the keyword into a language editing area.
As a possible implementation manner, after the user clicks on any one keyword, the language editing device adds the keyword to the language editing area in response to the clicking operation of the user on the keyword.
For example, referring to fig. 9, the editor plugin performs keyword analysis for the front end on each piece of candidate content, that is, the word in each item code in fig. 9 is clickable content, and after clicking, the clicked word may be individually inserted into the position of the cursor.
In some embodiments, the editor plug-in pair provides a number of configuration items for the user for different requirements of the front-end development. If the user does not need to read the content in the system clipboard, the user can close the content in the configuration item, if the user has doubt about the performance overhead possibly caused by the automatic keyword fetching function, the user can also close the content in the configuration item, and if the user has further requirements on the system performance, the maximum storage entry (defaults to be unlimited) can be set in the configuration item, so that the language editing device can set the entry of the target history code allowed to be stored in the language editor clipboard as a preset entry.
The foregoing embodiments have mainly described the solutions provided by the embodiments of the present disclosure from the viewpoint of apparatuses (devices). It should be understood that, in order to implement the above method, the apparatus or device includes hardware structures and/or software modules that perform respective method flows, where the hardware structures and/or software modules that perform respective method flows may form an electronic device. Those of skill in the art will readily appreciate that the algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The embodiments of the present disclosure may divide the functional modules of the apparatus or device according to the above method examples, for example, the apparatus or device may divide each functional module corresponding to each function, or may integrate two or more functions into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present disclosure, the division of the modules is merely a logic function division, and other division manners may be implemented in actual practice.
Fig. 11 is a schematic diagram showing the structure of a language editing apparatus according to an exemplary embodiment. Referring to fig. 11, a language editing apparatus 50 provided in an embodiment of the present disclosure includes a starting unit 501 and a display unit 502.
A starting unit 501 configured to start the language editor and display the language editing area; a display unit 502 configured to display a candidate language interface on a current page in the language editor in case it is detected that the user account performs a first preset operation on the current page in the language editing area; the candidate language interface is for displaying a language in the language editor clipboard, the language including at least a portion of the edited language.
Optionally, the language editing device further comprises a processing unit 503; a processing unit 503, configured to identify keywords from the language in the language editor clipboard, so as to obtain a plurality of keywords; and adding the keywords to the language editing area in response to a preset operation performed by the user account on any one keyword.
Optionally, the language editing area includes a plurality of historical language entries; the candidate language interface comprises a first preset control; the processing unit 503 is further configured to: determining a target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing area; and adding the target historical language to the language editor clipboard in response to a third preset operation of the first preset control by the user.
Optionally, the target history language includes a language fragment, the candidate language interface includes a positioning control, and the display unit 502 is further configured to: displaying a positioning control under the condition that the user account selects the language fragment; responding to the operation of the user account on the positioning control, determining an original language segment corresponding to the language segment, and displaying a page where the original language segment is located for reference of the user account; the language fragments are part of the language in the original language fragments.
Optionally, the target history language includes a language segment, the candidate language interface includes a split control, and the processing unit 503 is further configured to: responding to the operation of the user account on the splitting control, splitting the language segments to obtain a plurality of language segments; in response to an operation of the user account on any one of the plurality of language fragments, the language fragment is added to the language editing area.
Optionally, the processing unit 503 is specifically configured to: under the condition that the second preset operation is a selection operation, determining a history language selected by the user account for executing the selection operation, and determining the history language selected by the user account as a target history language; and under the condition that the second preset operation is the clicking operation, determining a clicking position clicked by the user account executing the clicking operation, and determining a historical language of a row where the clicking position is located as a target historical language.
Optionally, the language in the language editor clipboard includes a target historical language and a language in the system clipboard.
Optionally, the candidate language interface includes a first display panel and a second display panel; the first display plate is used for displaying the language in the system clipboard; the second display plate is used for displaying the target historical language.
Optionally, the candidate language interface further includes a second preset control; each row of languages in the first display plate and the second display plate corresponds to a second preset control; the processing unit is further configured to: and responding to the operation of the user account on a second preset control, and adding the language corresponding to the second preset control into the language editing area.
Optionally, the candidate language interface further includes a third preset control; each row of languages in the first display plate and the second display plate corresponds to a third preset control; the processing unit 503 is further configured to: and responding to the operation of the user account on a third preset control, and deleting the language corresponding to the third preset control in the candidate language interface.
Optionally, the language editor clipboard is configured with a plurality of configuration items; the processing unit 503 is further configured to: after the state of a first configuration item in the plurality of configuration items is set from the first state to the second state, canceling keyword recognition on the language in the language editor clipboard; after the state of the second configuration item in the plurality of configuration items is set from the first state to the second state, canceling reading the language in the system clipboard.
Optionally, the processing unit 503 is further configured to: and setting an entry of the target history language allowed to be stored in the language editor clipboard as a preset entry in response to a configuration operation of a third configuration item in the plurality of configuration items by a user.
Fig. 12 is a schematic structural diagram of an electronic device provided in the present disclosure. As shown in fig. 12, the electronic device 60 may include at least one processor 601 and a memory 602 for storing processor executable instructions, wherein the processor 601 is configured to execute the instructions in the memory 602 to implement the language editing method in the above embodiment.
In addition, the electronic device 60 may also include a communication bus 603 and at least one communication interface 604.
The processor 601 may be a processor (central processing units, CPU), micro-processing unit, ASIC, or one or more integrated circuits for controlling the execution of the programs of the present disclosure.
The communication bus 603 may include a path to transfer information between the above components.
The communication interface 604 uses any transceiver-like device for communicating with other devices or communication networks, such as ethernet, radio access network (radio access network, RAN), wireless local area network (wireless local area networks, WLAN), etc.
The memory 602 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), a compact disc read-only memory (compact disc read-only memory) or other optical disk storage, a compact disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store a desired program language in the form of instructions or data structures and that can be accessed by a computer. The memory may be stand alone and coupled to the processor via a bus. The memory may also be integrated with the processor.
The memory 602 is used for storing instructions for executing the disclosed aspects and is controlled by the processor 601 for execution. The processor 601 is configured to execute instructions stored in the memory 602 to implement the functions in the language editing method of the present disclosure.
As an example, in connection with fig. 11, the starting unit 501, the display unit 502, and the processing unit 503 in the language editing apparatus 50 realize the same functions as those of the processor 601 in fig. 12.
In a particular implementation, the processor 601 may include one or more CPUs, such as CPU0 and CPU1 of FIG. 12, as an embodiment.
In a particular implementation, as one embodiment, the electronic device 60 may include multiple processors, such as the processor 601 and the processor 607 in FIG. 12. Each of these processors may be a single-core (single-CPU) processor or may be a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In a particular implementation, as one embodiment, the electronic device 60 may also include an output device 605 and an input device 606. The output device 605 communicates with the processor 601 and may display information in a variety of ways. For example, the output device 605 may be a liquid crystal display (liquid crystal display, LCD), a light emitting diode (light emitting diode, LED) display device, a Cathode Ray Tube (CRT) display device, or a projector (projector), or the like. The input device 606 is in communication with the processor 601 and may accept input of user objects in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
Those skilled in the art will appreciate that the structure shown in fig. 12 is not limiting of the electronic device 60 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In addition, the present disclosure also provides a computer-readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the language editing method as provided in the above embodiments.
In addition, the present disclosure also provides a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the language editing method as provided in the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (15)

1. A method of language editing, the method comprising:
starting a language editor and displaying a language editing area;
displaying a candidate language interface on the current page in the language editor under the condition that the current page of the user account in the language editing area is detected to execute a first preset operation; the candidate language interface is for displaying a language in a language editor clipboard, the language including at least a portion of the edited language.
2. The method according to claim 1, wherein the method further comprises:
carrying out keyword recognition on the language in the language editor clipboard to obtain a plurality of keywords;
and responding to preset operation of the user account on any keyword, and adding the keyword into the language editing area.
3. The method of claim 1, wherein the language editing area comprises a plurality of historical language entries; the candidate language interface comprises a first preset control; the method further comprises the steps of:
determining a target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing area;
And responding to a third preset operation of the user on the first preset control, and adding the target historical language into the language editor clipboard.
4. The method of claim 3, wherein the target history language comprises a language snippet and the candidate language interface comprises a positioning control, the method further comprising:
displaying the positioning control under the condition that the user account selects the language fragment;
responding to the operation of the user account on the positioning control, determining an original language segment corresponding to the language segment, and displaying a page where the original language segment is located for the user account to refer to; the language fragments are part of the languages in the original language segments.
5. The method of claim 3, wherein the target history language comprises a language segment and the candidate language interface comprises a split control, the method further comprising:
responding to the operation of the user account on the splitting control, splitting the language segments to obtain a plurality of language segments;
and responding to the operation of the user account on any one of the language fragments, and adding the language fragment into the language editing area.
6. The method of claim 3, wherein the determining a target historical language from the plurality of historical language entries in response to a second preset operation performed by the user account in the language editing region comprises:
under the condition that the second preset operation is a selection operation, determining a history language selected by the user account for executing the selection operation, and determining the history language selected by the user account as the target history language;
and under the condition that the second preset operation is a clicking operation, determining a clicking position clicked by the user account executing the clicking operation, and determining a history language of a row where the clicking position is located as the target history language.
7. The method of claim 3, wherein the language in the language editor clipboard comprises the target historical language and a language in a system clipboard.
8. The method of claim 7, wherein the candidate language interface comprises a first display tile and a second display tile; the first display plate is used for displaying the language in the system clipboard; the second display plate is used for displaying the target historical language.
9. The method of claim 8, wherein the candidate language interface further comprises a second preset control; each row of languages in the first display plate and the second display plate corresponds to one second preset control; the method further comprises the steps of:
and responding to the operation of the user account on one second preset control, and adding the language corresponding to the second preset control into the language editing area.
10. The method of claim 8, wherein the candidate language interface further comprises a third preset control; each row of languages in the first display plate and the second display plate corresponds to one third preset control; the method further comprises the steps of:
and responding to the operation of the user account on one third preset control, and deleting the language corresponding to the third preset control in the candidate language interface.
11. The method of claim 2, wherein the language editor clipboard is configured with a plurality of configuration items; the method further comprises the steps of:
after the state of a first configuration item in the plurality of configuration items is set from a first state to a second state, canceling keyword recognition on the language in the language editor clipboard;
After the state of the second configuration item in the plurality of configuration items is set from the first state to the second state, canceling reading the language in the system clipboard.
12. A method according to claim 3, characterized in that the method further comprises:
and setting an entry of the target history language allowed to be stored in the language editor clipboard as a preset entry in response to a configuration operation of the user on a third configuration item in the plurality of configuration items.
13. A language editing device, characterized in that the device comprises a starting unit and a display unit;
the starting unit is configured to start the language editor and display a language editing area;
the display unit is configured to display a candidate language interface on a current page in the language editor when detecting that a user account performs a first preset operation on the current page in the language editing area; the candidate language interface is for displaying a language in a language editor clipboard, the language including at least a portion of the edited language.
14. An electronic device, comprising: a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the language editing method of any of claims 1 to 12.
15. A computer readable storage medium having instructions stored thereon, which when executed by a processor of an electronic device, cause the electronic device to perform the language editing method of any of claims 1-12.
CN202310147646.1A 2023-02-20 2023-02-20 Language editing method, device, electronic equipment and storage medium Pending CN116339520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310147646.1A CN116339520A (en) 2023-02-20 2023-02-20 Language editing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310147646.1A CN116339520A (en) 2023-02-20 2023-02-20 Language editing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116339520A true CN116339520A (en) 2023-06-27

Family

ID=86881386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310147646.1A Pending CN116339520A (en) 2023-02-20 2023-02-20 Language editing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116339520A (en)

Similar Documents

Publication Publication Date Title
WO2018095306A1 (en) Method and device for processing application program page, and storage medium
US8031943B2 (en) Automatic natural language translation of embedded text regions in images during information transfer
US20230259691A9 (en) Method, apparatus, device and storage medium for determining page theme
US20110289407A1 (en) Font recommendation engine
CN101661498A (en) Information search method and device
US20140089772A1 (en) Automatically Creating Tables of Content for Web Pages
US20080263518A1 (en) Software documentation manager
US11526575B2 (en) Web browser with enhanced history classification
CN113051514B (en) Element positioning method and device, electronic equipment and storage medium
EP3522004A2 (en) Code execution and data processing pipeline
CN104424205A (en) Context menu implementing method and device of page-embedded client
CN111507074B (en) Data processing method and device, processor, electronic equipment and storage medium
US8060455B2 (en) Hot term prediction for contextual shortcuts
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
CN111078228A (en) Method and device for converting webpage into small program, server and storage medium
KR101681851B1 (en) A web browser operation method and system
US20090249256A1 (en) Dynamic contextual shortcuts
US7568153B2 (en) Methods and computer systems for document authoring
EP3642727B1 (en) Resource pre-fetch using age threshold
CN112384940A (en) Mechanism for WEB crawling of electronic business resource page
CN116339520A (en) Language editing method, device, electronic equipment and storage medium
EP3852032A1 (en) Machine first approach for identifying accessibility, non-compliances, remediation techniques and fixing at run-time
CN112988255B (en) Data processing method, device and computer readable storage medium
US20170024405A1 (en) Method for automatically generating dynamic index for content displayed on electronic device
CN112667218A (en) Processing method, device, 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