Method, electronic device and computer readable medium for inserting elements in an editor

By detecting cursor movement and displaying the insert menu, the issue of reliance on shortcut keys in document editors is resolved, improving the user experience for novice users and the ease of inserting elements.

CN115270735BActive Publication Date: 2026-02-03DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210977480.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2026-02-03
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

In existing document editors, the fixed toolbar is hidden or the insertion menu is displayed by relying on shortcut keys, which makes the operation unfriendly for novice users and causes shortcut key usage issues.

Method used

The Insert menu is displayed by detecting the movement of the pointing cursor on the pointing device, avoiding the need to use keyboard shortcuts to wake up the menu, and displaying the appropriate Insert menu based on the cursor position.

Benefits of technology

It improves the user experience for novice users, reduces the use of keyboard shortcuts, and enhances the convenience and usability of inserting elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115270735B_ABST
    Figure CN115270735B_ABST
Patent Text Reader

Abstract

Embodiments of the disclosure relate to a method of inserting an element in a document editor, an electronic device, and a computer readable medium. In the method provided by the embodiments of the disclosure, in response to detecting that entry of content into a current interface of a document editor is stopped, movement of a pointing cursor corresponding to a pointing device is detected in the current interface of the document editor; in response to detecting the movement of the pointing cursor, an insertion menu is displayed; and an element selected from the insertion menu is inserted at a position cursor, the position cursor indicating an insertion position of the element. In this way, the menu can be easily awakened even if a novice user does not know a shortcut key for awakening the menu. Thus, user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of this disclosure relate to the field of user interfaces, and more specifically, to methods for inserting elements in a document editor, electronic devices, and computer-readable media. Background Technology

[0002] A document editor, also known as a word processor, is used for text input, output, storage, editing, and formatting. The toolbar functions of a document editor can be divided into two categories: style settings and element insertion. Style settings include text options such as "bold," "italic," and "underline." Element insertion includes options such as "insert image," "insert formula," and "insert chart." Element insertion can be further divided into inline elements and independent paragraph elements. Inline elements include code blocks and links, which can be mixed with regular text paragraphs. Independent paragraph elements include tables and images, which need to be placed on a separate line from the main text paragraph. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for inserting an element in a document editor is provided. The method includes detecting movement of a pointing cursor corresponding to a pointing device in the current interface of the document editor in response to detecting a stop in inputting content to the current interface of the document editor. The method also includes displaying an insert menu in response to detecting movement of the pointing cursor. The method further includes inserting an element selected from the insert menu at a position cursor. The position cursor indicates the insertion position of the element.

[0004] In a second aspect of this disclosure, an electronic device is provided. The electronic device includes a processor and a memory coupled to the processor, the memory having instructions stored therein, the instructions causing the device to perform actions when executed by the processor. The actions include detecting movement of a pointing cursor corresponding to a pointing device in the current interface of the document editor in response to detecting a stop in inputting content to the current interface of the document editor. The actions also include displaying an insert menu in response to detecting movement of the pointing cursor. The actions further include inserting an element selected from the insert menu at a position cursor. The position cursor indicates the insertion position of the element.

[0005] In a third aspect of this disclosure, a computer-readable medium is provided, including machine-executable instructions that, when executed, cause a machine to perform the method according to the first aspect.

[0006] The summary section is provided to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of this disclosure, nor is it intended to limit the scope of this disclosure. Attached Figure Description

[0007] The above and other objects, features, and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts. In the drawings:

[0008] Figure 1 A schematic diagram of an example environment in which embodiments of the present disclosure may be implemented is shown;

[0009] Figure 2 An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0010] Figure 3A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0011] Figure 3B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0012] Figure 4A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0013] Figure 4B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0014] Figure 5 An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0015] Figure 6 An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0016] Figure 7A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0017] Figure 7B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0018] Figure 8A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0019] Figure 8B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0020] Figure 9 An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0021] Figure 10A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0022] Figure 10B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0023] Figure 11A An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0024] Figure 11B An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0025] Figure 12 An exemplary user interface of a document editor according to some embodiments of the present disclosure is shown;

[0026] Figure 13 A flowchart illustrating an example method for inserting an element in a text editor according to an embodiment of the present disclosure is shown;

[0027] Figure 14 A block diagram of an example device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0028] The principles of this disclosure will now be described with reference to several exemplary embodiments illustrated in the accompanying drawings. While preferred embodiments of this disclosure are shown in the drawings, it should be understood that these embodiments are described only to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0029] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0030] In document editors where the toolbar is fixed by default, inserting an element is as simple as clicking the corresponding item on the toolbar. However, in some document editors, the fixed toolbar is hidden. In such editors, users need to enter a keyboard shortcut (e.g., " / ") to trigger the display of the corresponding menu item. The problem with this approach is that it relies on keyboard shortcuts, making it less discoverable and unfriendly to novice users. Furthermore, the reliance on keyboard shortcuts can easily prevent other operations that require those shortcuts from being performed.

[0031] Embodiments of this disclosure propose a scheme for inserting elements in a document editor by detecting movement of the pointing cursor corresponding to the pointing device to display an insert menu.

[0032] According to various embodiments of this disclosure, when a stop in inputting content to the current interface of the document editor is detected, movement of the pointing cursor corresponding to the pointing device is detected in the current interface. If movement of the pointing cursor is detected, an insert menu is displayed. The element selected from the insert menu can then be inserted into the content.

[0033] According to the embodiments described herein, even novice users who do not know the keyboard shortcut for activating the menu can easily access it, thus improving the user experience. Furthermore, since a keyboard shortcut is not required to activate the menu, keyboard shortcut usage is reduced.

[0034] The basic principles and several exemplary implementations of this disclosure will be described below with reference to the accompanying drawings. It should be understood that these exemplary embodiments are given only to enable those skilled in the art to better understand and implement the embodiments of this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0035] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure may be implemented is shown. (See diagram for reference.) Figure 1 As shown, environment 100 may include display 110, pointing device 120, and computing device 130. Display 110, pointing device 120, and computing device 130 may be implemented as a single unit or separately (e.g., Figure 1 (As shown). The computing device 130 can receive input from the pointing device 120 and can send display information to the display 110.

[0036] The computing device 130 can be implemented as an electronic device, either alone or together with the display 110 and the pointing device 120. The document editor can be installed as software on the electronic device, such as a desktop computer, laptop computer, tablet computer, portable electronic device, smartphone, etc. (not shown). The document editor can be installed on a remote computing device (not shown) that communicates with the computing device 130. When editing using the document editor, the user interface of the document editor can be displayed on the display 110 of the electronic device.

[0037] The pointing device 120 can be any device that allows the user to move the cursor on the display 110. For example, the pointing device 120 can be a touchpad, joystick, mouse, trackball, etc. In some embodiments, the user can select a specific pointing device according to preference. A pointing cursor (e.g., a pointer to a cursor) corresponds to the pointing device 120. Figure 2 The 230 shown can be displayed on the monitor 110.

[0038] Display 110 can be implemented using liquid crystal display (LCD) technology, organic light-emitting diode (OLED) technology, or miniLED technology, but in other embodiments it can also be implemented using other display technologies. Display 110 can receive display information from the processor of an electronic device, and provide visual output to the user based on the received display information. Visual output can include graphics, text, icons, video, and any combination thereof. For example, a portion of the visual output in the user interface can correspond to user interface elements, such as buttons, icons, cursors, etc. In some embodiments, display 110 can be implemented as a touch-sensitive display, which provides an input and output interface between the electronic device and the user. Sometimes, for convenience, a touch-sensitive display can be referred to as a "touchscreen."

[0039] It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure. For example, embodiments of this disclosure can also be applied to environments different from environment 100. Although Figure 1 The image shows only one display 110, one pointing device 120, and one computing device 130, but it is not limited to these and may include other devices (such as a keyboard).

[0040] Figure 2 An exemplary user interface of a document editor 200 according to some embodiments of the present disclosure is shown. The document editor 200 can be displayed as... Figure 1 As shown on the display 110. The document editor 200 can be implemented as standalone software, networked software, and / or a document editing module of software.

[0041] In document editor 200, the toolbar is hidden. Document editor 200 can include user-entered content 210. Figure 2 The user interface shown may also include a position cursor 220 and a pointing cursor 230. The position cursor 220 can indicate the insertion position of the element to be inserted into the content 210. The pointing cursor 230 is the corresponding display of the pointing device 120 on the display 110.

[0042] Next, combine Figure 13 The embodiments of this disclosure are described in detail. Figure 13 A flowchart illustrating an example method 1300 for inserting elements in a document editor 200 according to an embodiment of the present disclosure is shown. Method 1300 can be implemented, for example, in... Figure 1 The method is executed in the computing device 130 shown. It should be understood that the method 1300 may also include additional actions not shown and / or the actions shown may be omitted, and the scope of this disclosure is not limited in this respect.

[0043] At box 1310, in response to detecting a stop in inputting content 210 to the current interface of the document editor 200, the computing device 130 detects movement of the pointing cursor 230 corresponding to the pointing device 120 in the current interface of the document editor 200. For example, in response to detecting that content 210 is being entered into the current interface of the document editor 200... Figure 2 The cursor at position 220 indicated the input was stopped, and the computing device 130 was... Figure 2 The interface shown detects whether the pointer 230 has moved. In some embodiments, the movement of the pointer 230 can be determined by monitoring the MouseMove event of the Document Object Model (DOM). In some embodiments, the computing device 130 detects the movement of the pointer 230 immediately after the content 210 has stopped being entered. In some embodiments, the computing device 130 detects the movement of the pointer 230 after a period of time has passed since the content 210 has stopped being entered.

[0044] At box 1320, in response to detecting movement of the pointing cursor 230, the Insert menu is displayed. For example, the pointing cursor 230 is in... Figure 2 The movement shown occurs within the interface. The insert menu can be as follows: Figure 3B , Figure 4B , Figure 10B , Figure 11B 320-1 and Figure 7B , Figure 8B The Insert menu is shown in 320-2. Insert menus 320-1 and 320-2 can be collectively referred to as "Insert Menu 320" or simply referred to as "Insert Menu 320". In some embodiments, the Insert Menu 320 is hidden in response to the detection that content 210 is being entered. In this way, it can be ensured that the Insert Menu is not obscured when content is being entered. Therefore, a good user experience can be guaranteed.

[0045] At box 1330, computer 130 inserts the element selected from the insert menu 320 at position cursor 220. For example... Figure 5 and Figure 12 element 321-1 and Figure 9 Element 321-2. Elements 321-1 and 321-2 can be collectively referred to as "element 321" or simply as "element 321". The insertion position can be confirmed by monitoring changes in the user's selection area (e.g., through the onSelectChange event). When the user's selection area changes, it is determined whether the current selection area is empty. If it is empty (e.g., by checking if the string converted to a string using the browser application programming interface API, window.getSelection().getRangeAt(0) is empty), the current position is recorded as the insertion position for the subsequent menu. For example, the position can be obtained using the selection area range.getBoundingClientRect().

[0046] In this way, even novice users who don't know the keyboard shortcut for activating the menu can easily access it, thus improving the user experience.

[0047] Next, combine Figures 2 to 12 The present disclosure describes in detail some embodiments. In some embodiments, the position cursor 220 is positioned at a first position where content 210 stops being entered. In some embodiments, content 210 is positioned as follows: Figure 2 and Figure 6 Input was stopped at the indicated position 220. Computer device 130 detected that the pointing cursor 230 had moved on the current interface. (The following is a list of steps / actions, not part of the main text.) Figure 3A and Figure 7A As shown, at the first position where content 210 stops being entered (i.e., the position indicated by the position cursor 220), a prompt button 310 can be displayed. Then, in response to the computer device 130 receiving a click on the prompt button 310, insert menus 320-1 and 320-2 are displayed at that position, as shown below. Figure 3B and Figure 7B As shown. After the user selects the elements to be inserted, the computer device 130 inserts the selected elements 321-1 and 321-2 at the position cursor 220, as shown respectively. Figure 5 and Figure 9 As shown. In some other embodiments, the steps can also be skipped. Figure 3A and Figure 7A The interface directly displays Insert menu 320-1 and Insert menu 320-2 at the position indicated by cursor 220, as shown below. Figure 3B and Figure 7B As shown.

[0048] In this way, the insertion menu can be displayed near the location where the element is to be inserted, thus allowing the area to be operated on to be displayed centrally for convenient operation.

[0049] In some embodiments, content 210 is as follows: Figure 2 and Figure 6 Input was stopped at the indicated position 220. Computer device 130 detected that the pointing cursor 230 had moved in the current interface, and its positions after stopping were as follows: Figure 4A and Figure 8A As shown. A prompt button 310 can be displayed at the pointing position where the cursor 230 stops moving, as shown. Figure 4A and Figure 8A As shown. Then, in response to the computer device 130 receiving a click on the prompt button 310, insert menus 320-1 and 320-2 are displayed at the indicated location, as shown. Figure 4B and Figure 8B As shown. After the user selects the elements to be inserted, the computer device 130 inserts the selected elements 321-1 and 321-2 at the position cursor 220, as shown respectively. Figure 5 and Figure 9 As shown. In some other embodiments, this step can also be skipped. Figure 4A and Figure 8A The interface directly displays Insert menus 320-1 and 320-2 at the pointing position where the pointer 230 stops moving, as shown below. Figure 4B and Figure 8B As shown.

[0050] In this way, the user can move the corresponding cursor 230 of the pointing device 120 to a blank area on the interface, thereby displaying the insert menu 320 in the blank area. This can alleviate the crowding of elements and content in the user interface and prevent obscuring elements and content that the user is interested in.

[0051] In some embodiments, in response to computer device 130 detecting position cursor 220 (e.g., ... Figure 2 and Figure 6 The inline insertion menu can be displayed at the first position where the content 210 shown is stopped (before a newline character). The inline insertion menu includes at least a code block element and a link element. For example, as shown... Figure 2 As shown, when content 210 is stopped from being entered, the newline character has not yet been entered. Therefore, it can be assumed that the first position indicated by the position cursor 220 is before the newline character. Thus, it can be displayed as shown... Figure 3B and Figure 4B The inline insertion menu 320-1 is shown. In the insertion menu 320-1, options such as... Figure 3Band Figure 4B The options shown are "Data," "References," "Audio," and "Links." "Data," "References," and "Audio" indicate code block elements, while "Links" indicates link elements. The Insert menu 320-1 can also include other options to indicate other elements suitable for inline insertion. For example, code block elements can also include formulas, etc.

[0052] In some embodiments, in response to computer device 130 detecting position cursor 220 (e.g., ... Figure 2 and Figure 6 The content shown in image 210 (at the first position where input stops) can display a paragraph insertion menu after a line break. The paragraph insertion menu includes at least table and image elements. For example, as shown... Figure 6 As shown, when content 210 is stopped being entered, line break 910 has already been entered. The first position indicated by the position cursor 220 is after line break 910, at the beginning of a new paragraph. Therefore, it can be displayed as follows: Figure 7B and Figure 8B The inline insertion menu 320-2 is shown below. In the insertion menu 320-2, options such as... Figure 7B and Figure 8B The options shown are "Picture" and "Table". "Picture" indicates a picture element, and "Table" indicates a table element. The Insert menu 320-2 may also include other options to indicate other elements suitable for insertion between paragraphs.

[0053] In this way, the appropriate content to be inserted can be displayed based on whether the element to be inserted is within a paragraph or between paragraphs. This reduces redundant information in the Insert menu and makes the Insert menu display more targeted.

[0054] In some embodiments, the computing device 130 detects whether the position cursor 220 has moved from a first position where content 210 is stopped from being entered to a second position on the content 210. For example, using a keyboard or pointing device 120, the position cursor 220 may move from such a position as... Figure 6 The positions between paragraphs shown are positioned as follows: Figure 10A The position shown is within the line; the position cursor 220 may be located from, for example... Figure 2 The inline position shown is positioned as follows: Figure 10A The inline position shown, etc. In some embodiments, in response to detecting that the position cursor 220 has been repositioned from a first position to a second position of the content 210, the computing device 130 may re-detect the movement of the pointer cursor 230. In response to the re-detection of the movement of the pointer cursor 230, the computing device 130 may display the insert menu 320.

[0055] In this way, by detecting whether the position of the position cursor 220 has changed, it can be determined whether the position of the element 321 subsequently inserted into the content 210 needs to be changed. Therefore, it is convenient for users to change the position of the inserted element.

[0056] In some embodiments, in response to the computing device 130 detecting that the second position is before a newline character, an inline insertion menu is displayed. For example, the position cursor 220 is repositioned to, for example, ... Figure 10A The second position shown. This position is before the newline character 910, so the inline insertion menu can be displayed, as shown. Figure 10B and Figure 11B As shown. At this time, Insert menu 320 is the inline insert menu 320-1.

[0057] In some embodiments, the position cursor 220 may already be at the first position (e.g., before it is repositioned to the second position) Figure 7A The position indicated by cursor 220) or the position after cursor 230 has moved (e.g., as shown by cursor 220) Figure 8A The cursor (pointing to the location indicated by 230) displays a prompt button 310 (as shown in the image). Figure 7A and Figure 8A (as shown) or Insert menu 320 (for example, as shown) Figure 7B and Figure 8B The inter-segment insertion menu 320-2 is shown. The position cursor 220 is repositioned to the second position (e.g., ...). Figure 10A and Figure 11A (As shown) After that, the prompt button 310 or the insert menu 320 can be canceled from the first position. The computing device 130 re-detects whether the pointing cursor 230 has moved. If it has moved, the prompt button 310 or the insert menu 320 is displayed in the second position.

[0058] In some other embodiments, the first position is located between paragraphs, and the paragraph insertion menu 320-2 is displayed at the pointing cursor 230, such as... Figure 8B As shown. The position cursor 220 is repositioned to a second position (e.g., Figure 10A and Figure 11A (As shown) After that, the computing device 130 detects that the second position is before the newline character 910. Therefore, the display of the paragraph insertion menu 320-2 at the pointer cursor 230 can be canceled. The computing device 130 re-detects whether the pointer cursor 230 has moved. If it has moved, the inline insertion menu 320-1 is displayed at the position where the pointer cursor 230 stops moving, as shown. Figure 11B As shown.

[0059] Similarly, in some embodiments, in response to the computing device 130 detecting that the second position is after a newline character, an inter-paragraph insertion menu is displayed. In this case, the insertion menu is an inter-paragraph insertion menu. Further details will not be provided here.

[0060] In some embodiments, a prompt button 310 may be displayed at a second location, such as... Figure 10A As shown. In response to the computing device 130 receiving a click on the prompt button 310, the insert menu 320-1 is displayed at the second location, as shown. Figure 10B As shown. After the user selects the element to be inserted, the computer device 130 inserts the selected element 321-1 at the second position, as shown. Figure 12 As shown. In some other embodiments, this step can also be skipped. Figure 10A The interface directly displays the Insert menu 320-1 in the second position, such as... Figure 10B As shown.

[0061] Figure 14 A schematic block diagram of an example device 1400 that can be used to implement embodiments of the present disclosure is shown. For example, such as Figure 1 The environment 100 shown can be implemented by device 1400. For example... Figure 14 As shown, device 1400 includes a central processing unit (CPU) 1401, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 1402 or loaded from storage unit 1408 into random access memory (RAM) 1403. The RAM 1403 may also store various programs and data required for the operation of device 1400. The CPU 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. Input / output (I / O) interface 1405 is also connected to bus 1404.

[0062] Multiple components in device 1400 are connected to I / O interface 1405, including: input unit 1406, such as a keyboard, mouse, etc.; output unit 1407, such as various types of displays, speakers, etc.; storage unit 1408, such as a disk, optical disk, etc.; and communication unit 1409, such as a network card, modem, wireless transceiver, etc. Communication unit 1409 allows device 1400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0063] The various processes and handling described above, such as method 1300, can be executed by processing unit 1401. For example, in some embodiments, method 1300 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1408. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1400 via ROM 1402 and / or communication unit 1409. When the computer program is loaded into RAM 1403 and executed by CPU 1401, one or more actions of method 1300 described above can be performed.

[0064] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0065] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0066] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0067] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0068] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0069] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0070] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0071] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0072] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for inserting elements in a document editor, comprising: In response to detecting a halt in inputting content to the current interface of the document editor, the movement of the pointing cursor corresponding to the pointing device is detected in the current interface of the document editor. In response to detecting movement of the pointing cursor, an insert menu is displayed, which includes an inline insert menu and an inter-paragraph insert menu; In response to detecting that the position cursor is before a newline character, an inline insertion menu is displayed, the inline insertion menu including code block elements and link elements; In response to detecting that the cursor position is after a newline character, a paragraph insertion menu is displayed, which includes table elements and image elements; Insert an element selected from the Insert menu at the position cursor, the position cursor indicating the insertion position of the element, the insertion position being determined based on monitoring changes in the user's selection area; and In response to detecting that content is being entered into the current interface of the document editor, the insert menu is hidden.

2. The method according to claim 1, wherein the position cursor is positioned at the location where the content entry stops.

3. The method of claim 1, wherein displaying the insert menu comprises: A prompt button is displayed at the specified location cursor position; as well as In response to receiving a click on the prompt button, the insert menu is displayed at the cursor position.

4. The method of claim 1, wherein displaying the insert menu comprises: A prompt button is displayed at the pointing position where the pointing cursor stops moving; as well as In response to receiving a click on the prompt button, the insert menu is displayed at the pointed-out location.

5. The method according to claim 2, further comprising: In response to detecting that the position cursor has been repositioned from the position to another position of the content, the movement of the pointing cursor is re-detected; as well as In response to the re-detection of movement of the pointing cursor, the Insert menu is displayed.

6. The method according to claim 1, further comprising: In response to the detection that the content is being entered, the insert menu is hidden.

7. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, the instructions causing the device to perform actions when executed by the processor, the actions including: In response to detecting a halt in inputting content to the current interface of the document editor, the movement of the pointing cursor corresponding to the pointing device is detected in the current interface of the document editor. In response to detecting movement of the pointing cursor, an insert menu is displayed, which includes an inline insert menu and an inter-paragraph insert menu; In response to detecting that the position cursor is before a newline character, an inline insertion menu is displayed, the inline insertion menu including at least a code block element and a link element; In response to detecting that the cursor position is after a newline character, a paragraph insertion menu is displayed, which includes at least table elements and image elements; Insert an element selected from the Insert menu at the position cursor, the position cursor indicating the insertion position of the element, the insertion position being determined based on monitoring changes in the user's selection area; and In response to detecting that content is being entered into the current interface of the document editor, the insert menu is hidden.

8. The device according to claim 7, wherein the position cursor is positioned at the location where the content entry stops.

9. The device of claim 7, wherein displaying the insert menu comprises: A prompt button is displayed at the specified location cursor position; as well as In response to receiving a click on the prompt button, the insert menu is displayed at the cursor position.

10. The device of claim 7, wherein displaying the insert menu comprises: A prompt button is displayed at the pointing position where the pointing cursor stops moving; as well as In response to receiving a click on the prompt button, the insert menu is displayed at the pointed-out location.

11. The device of claim 7, wherein the position cursor is positioned at a location different from where the content entry stops.

12. The device according to claim 7, further comprising: In response to the detection that the content is being entered, the insert menu is hidden.

13. A computer-readable medium comprising machine-executable instructions that, when executed, cause a machine to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Object insertion

    CN110622119A

  • String inserter for pen-based computer systems and method for providing same

    US5778404A