Method, device, terminal and non-transitory storage medium for document editing
By creating interactive and editing content blocks within the document, the limitations of traditional document editing functions are addressed, enabling more flexible and diverse document editing capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-02
- Publication Date
- 2026-03-17
AI Technical Summary
Traditional document editing functions are limited and cannot meet the diverse needs of users.
This document editing method allows users to edit and compile documents by creating content blocks that include interactive and editing areas, supporting various trigger operations and updates to input information.
The document compilation function has been expanded, enhancing the flexibility and adaptability of document editing to meet diverse user needs.
Smart Images

Figure CN114997117B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and more particularly, to a document editing method and device, terminal and non-transitory storage medium. BACKGROUND
[0002] The information that can be expressed by a traditional document is limited, and the content can only be edited according to the functions provided by the document. However, the needs of users are changing, and it is difficult to meet the diverse needs through limited functions. SUMMARY
[0003] This summary is provided to introduce a selection of concepts that are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
[0004] To solve the above problems, the present disclosure provides a document editing method, device, terminal and non-transitory storage medium.
[0005] According to an embodiment of the present disclosure, a document editing method is provided, comprising:
[0006] In response to receiving a first creation operation in the document, a first content block is created; wherein the first content block comprises an interactive area, and the first content block is of a first type;
[0007] In response to a first trigger operation on the first content block, a first editing area is generated, and the first editing area is used for editing the first content block;
[0008] Based on the input information received in the first editing area, the display content of the interactive area of the first content block in the document is updated.
[0009] According to an embodiment of the present disclosure, a document editing method is provided, comprising:
[0010] In response to receiving a second creation operation in the document, a second content block is created; wherein the second content block is of a second type, and the second content block comprises a second editing area, and the second editing area is used for editing the document;
[0011] In response to a third trigger operation on the second content block, a third editing area is generated, and the third editing area is used for compiling the second content block;
[0012] Based on the input information received in the third editing area, the block type and / or display content of the second content block in the document are updated.
[0013] According to an embodiment of the present disclosure, a document editing apparatus is provided, comprising:
[0014] a creating module configured to create a first content block in response to receiving a first creating operation in a document, wherein the first content block comprises an interactive area, and the first content block is of a first type; or create a second content block in response to receiving a second creating operation in the document, wherein the second content block is of a second type, and the second content block comprises a second editing area for editing the document;
[0015] a generating module configured to generate a first editing area in response to a first triggering operation on the first content block, wherein the first editing area is used for editing the first content block; or generate a third editing area in response to a third triggering operation on the second content block, wherein the third editing area is used for editing the second content block; and
[0016] an updating module configured to update display content of the interactive area of the first content block in the document based on input information received in the first editing area; or update the block type and / or display content of the second content block in the document based on input information received in the third editing area.
[0017] According to an embodiment of the present disclosure, a terminal is provided, comprising at least one memory and at least one processor; wherein the memory is configured to store program code, and the processor is configured to invoke the program code stored in the memory to execute the above method.
[0018] According to an embodiment of the present disclosure, a non-transitory storage medium is provided, which stores program code for executing the above method.
[0019] The document editing scheme of the present disclosure can provide an extended compiling function. BRIEF DESCRIPTION OF DRAWINGS
[0020] The above and other features, advantages, and aspects of the present disclosure will become more apparent by describing in detail the embodiments thereof with reference to the attached drawings. Throughout the drawings, the same or similar reference numerals refer to the same or similar elements. It should be understood that the drawings are schematic and elements and features are not necessarily to scale.
[0021] Figure 1 A flowchart of a document editing method according to an embodiment of the present disclosure is shown.
[0022] Figure 2 A schematic diagram of a callout operation panel according to an embodiment of the present disclosure is shown.
[0023] Figure 3 A schematic diagram of a first editing area of an embodiment of the present disclosure is shown.
[0024] Figure 4 A flow chart of a document editing method of another embodiment of the present disclosure is shown.
[0025] Figure 5 A structural schematic diagram of a document editing apparatus of an embodiment of the present disclosure is shown.
[0026] Figure 6 A structural schematic diagram of a terminal suitable for implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Embodiments of the present disclosure will be described in more detail with reference to the drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein, but rather the embodiments are provided so that the present disclosure can be more thoroughly and completely understood. It should be understood that the drawings and embodiments of the present disclosure are for exemplary purposes only and are not intended to limit the scope of protection of the present disclosure.
[0028] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be executed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the execution of the steps shown. The scope of the present disclosure is not limited in this respect.
[0029] The term "comprising" and variations thereof as used in the present disclosure are open-ended, that is, "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related definitions are given below in the description of the terms.
[0030] It should be noted that the terms "first", "second", and the like mentioned in the present disclosure are only used to distinguish different apparatuses, modules or units, and are not intended to limit the order or interdependence of the functions performed by these apparatuses, modules or units.
[0031] It should be noted that the terms "one", "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly indicated in the context.
[0032] The terminal in the present disclosure can include, but is not limited to, mobile terminal devices such as mobile phones, smart phones, notebook computers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Multimedia Players), navigation devices, vehicle-mounted terminal devices, vehicle-mounted display terminals, vehicle-mounted electronic rearview mirrors, and the like, and fixed terminal devices such as digital TVs, desktop computers, and the like.
[0033] As shown in Figure 1 The present disclosure provides a flowchart of a document editing method of an embodiment, including the following steps.
[0034] S100, in response to receiving a first creation operation in a document, creating a first content block; wherein the first content block includes an interactive area, and the first content block is of a first type.
[0035] Specifically, the interactive area of the embodiment of the present disclosure can be used to display an editing result, and the first type can include a playground type, wherein playground is only a temporary named name of a content block, and can also be named with other arbitrary names, which is not limited here. More specifically, the content of the document of the embodiment of the present disclosure can be composed of various content blocks, and the document can be composed of content blocks or divided into content block storage. By organizing the document into the form of multiple independent content blocks, the document part content corresponding to each content block can be individually referenced, collected, and collaboratively edited, etc. The user can customize the content block according to his own needs, so as to expand the expression ability of the document. The interactive area is used to receive the input instruction of the user, and the display content is updated based on the input instruction. Optionally, the interactive area provides a component or a control, receives the input instruction of the user on the component or the control, and updates the display content of the component or the control; optionally, the component or the control provided by the interactive area displays predetermined content, and the user can input an instruction based on the predetermined content, and update the display content of the interactive area under the predetermined content framework of the component or the control in response to the input instruction.
[0036] S200, in response to a first trigger operation on the first content block, generating a first editing area; wherein the first editing area is used for editing the first content block.
[0037] Specifically, the embodiment of the present disclosure can include replacing the interactive area by the first editing area; or generating the first editing area in the associated area of the interactive area, wherein the interactive area and the first editing area are displayed simultaneously. Optionally, the interactive area can be connected to the first editing area through a boundary. Optionally, the component or the control of the interactive area can be edited through the first editing area, and the component or the control is generated based on the editing result.
[0038] The embodiments of the present disclosure can generate the first editing area through various triggering manners, for example Figure 2 As shown, the operation panel is invoked by inputting a preset symbol such as " / " in the document, and the first editing area is expanded by selecting Playground. The first editing area can be seen in Figure 3 After the first editing area is expanded, the compiling operation can be performed. During the compiling, the editing can be performed by triggering the icon in the upper right corner to enter the full-screen mode, and a custom content block is created.
[0039] In the embodiments of the present disclosure, in addition to the custom compiling, the content of the third-party database can be introduced during the compiling. The embodiments of the present disclosure can include creating a connection file, retrieving a target module in the database through the connection file, obtaining a dependency tree of the target module, and recursively parsing the target module according to the dependency tree to obtain a target file. More specifically, creating a connection file includes obtaining a calling instruction, replacing the calling instruction with a target instruction, and taking the target instruction as the connection file. The target module includes an asynchronous module, a global variable export module, and a cascading style sheet module. That is, since the third-party database can have a format incompatibility problem, the embodiments of the present disclosure propose an addressing manner, which can address according to a preset path or a class library name. For example, when an asynchronous module needs to be retrieved, a connection file is created, the asynchronous module is retrieved in the database through the connection file, and a dependency tree is obtained. The connection file can include a target instruction generated by converting a calling instruction, and the asynchronous module is recursively parsed according to the dependency tree. In addition to the asynchronous module, the target module of the embodiments of the present disclosure can also be a global variable export module, a cascading style sheet module, or other modules.
[0040] In addition, the embodiments of the present disclosure can also include hiding the first editing area or adjusting, for example, reducing the display ratio of the first editing area. Hiding the editing area or reducing the display ratio, for example, the height, of the editing area can display the running result of the compiled content block.
[0041] S300, based on the input information received in the first editing area, updating the display content of the interactive area of the first content block in the document.
[0042] Specifically, the embodiments of the present disclosure can include updating the display content of the interactive area in real time in response to the input information received in the first editing area. When the interactive area and the first editing area are displayed at the same time, the embodiments of the present disclosure can also receive a second triggering operation in the interface where the first editing area is located; and in response to the second triggering operation, update the display content of the interactive area of the first content block in the document.
[0043] The embodiment of the present disclosure can obtain instruction information for re-editing the content block; re-edit the content block according to the instruction information to obtain an editing result. Specifically, a port for compiling the block is defined as a host end; a sending port of the instruction information is judged; if the sending port is not the host end, the instruction information is sent to the host end, and the instruction information is executed through the host end; and the re-compiled result is returned to the sending port. More specifically, the instruction information can include replacement operations, insertion operations, and removal operations.
[0044] In the embodiment of the present disclosure, the created content block can be recompiled, and the compiling party is not limited to the creator, that is, the host end, but can also include other ends. Specifically, when the other end initiates recompilation, the host end can execute the modification operation. For example, a custom block can inherit from a virtual block. Inheritance can make the child class have the attributes and methods of the parent class or redefine, add attributes and methods, etc., and the virtual block can read and modify data. The virtual block will start rendering only after receiving the data of the host end, and the data content can include all data that the current content block can access and modify. By modifying the data, the embodiment of the present disclosure can perform a plurality of operations, including but not limited to replacement, insertion, and removal, etc. The above operations can be sent to the host end in the form of a message, and the host end processes the message by parsing. After modifying the data, the embodiment of the present disclosure can drive the virtual block to render the modified data. The data of the content block can include the written block code, the data generated when the block is running, and the height of the content block, etc. After the other end sends the modification message to the host end for modification, the host end returns to the other end for rendering, which can avoid the refresh operation. The embodiment of the present disclosure can read and write the persistent data through the port, for example, the application programming interface. The data can be coordinated based on the operation conversion mode. The operation conversion of the embodiment of the present disclosure can be a method used to keep different data copies consistent in the coordination technology, for example, adjusting the operation according to the operation sequence to keep the data consistency in different terminals.
[0045] As Figure 4 shown, Figure 4 A flowchart of a document editing method according to another embodiment of the present disclosure is shown, including the following steps.
[0046] S100’, in response to receiving a second creation operation in a document, creating a second content block; wherein the second content block is of a second type, and the second content block includes a second editing area for editing the document. The second type can include a non-playground type. The second editing area is used to receive an editing operation of a user, and record corresponding content in the editing area based on the editing operation.
[0047] S200', in response to a third trigger operation on the second content block, generates a third editing region, the third editing region being used to compile the second content block.
[0048] S300', based on the input information received in the third editing area, update the block type and / or display content of the second content block in the document. Optionally, based on the input information received in the third editing area, the type and display content of the second content block can be modified simultaneously, or only the type or display content of the second content block can be modified; wherein, when only the display content of the second content block is modified, it has the same operational effect as receiving an editing operation in the second editing area.
[0049] Unlike step S300, in step S300', the second type of content block can be converted into the first type of content block. The rest can be referred to the description of the foregoing embodiment, and will not be repeated here.
[0050] Optionally, generating a third editing region includes replacing the second editing region with the third editing region.
[0051] Optionally, before updating the block type and / or display content of the second content block in the document, the method further includes:
[0052] The interface containing the third editing area receives a fourth trigger operation; in response to the fourth trigger operation, the block type and / or display content of the second content block are updated in the document.
[0053] Optionally, generating the third editing area includes: generating the third editing area in the associated area of the second editing area, wherein the second editing area and the third editing area are displayed simultaneously.
[0054] Optionally, based on the input information received in the third editing area, updating the block type and / or display content of the second content block in the document includes: updating the block type and / or display content of the second content block in real time in response to the input information received in the third editing area.
[0055] Optionally, the third editing area can be hidden; or the display ratio of the third editing area can be adjusted.
[0056] Optionally, a connection file is created; the target module is retrieved from the database using the connection file; the dependency tree of the target module is obtained; and the target module is recursively parsed according to the dependency tree to obtain the target file.
[0057] Optionally, creating the connection file includes: obtaining a calling instruction; replacing the calling instruction with a target instruction; and using the target instruction as the connection file; wherein the target module includes an asynchronous module, a global variable export module, and a cascading style sheet module.
[0058] Optionally, obtain instruction information for re-editing the content block; re-edit the content block according to the instruction information to obtain the editing result.
[0059] Optionally, the creation port of the content block is defined as the host end; the issuing port of the instruction information is determined; if the issuing port is not the host end, the instruction information is sent to the host end, and the instruction information is executed through the host end; and the editing result is returned to the issuing port; wherein, the instruction information includes: replacement operation, insertion operation and removal operation.
[0060] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of a document editing apparatus according to an embodiment of the present disclosure is shown. Figure 5 In the device 10, a creation module 11, a generation module 13, and an update module 15 may be included. The creation module 11 may be used to create a first content block in response to receiving a first creation operation in a document; wherein the first content block includes an interactive area and is of a first type; or, in response to receiving a second creation operation in a document, create a second content block; wherein the second content block is of a second type and includes a second editing area for editing the document; the generation module 13 may be used to generate a first editing area in response to a first trigger operation on the first content block; wherein the first editing area is used for editing the first content block; or, in response to a third trigger operation on the second content block, generate a third editing area for compiling the second content block; the update module 15 may be used to update the display content of the interactive area of the first content block in the document based on input information received in the first editing area; or, based on input information received in the third editing area, update the block type and / or display content of the second content block in the document. Furthermore, the apparatus 10 of this embodiment may also include a definition module that defines the port for compiling the block as the host end, an acquisition module that acquires instruction information for recompiling the block, and a determination module that determines the issuing port of the instruction information.
[0061] For embodiments of the apparatus, since they basically correspond to the method embodiments, relevant details can be found in the descriptions of the method embodiments. The apparatus embodiments described above are merely illustrative, and the modules described as separate modules may or may not be separate. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0062] Furthermore, this disclosure also provides a terminal, comprising: at least one memory and at least one processor; wherein the memory is used to store program code, and the processor is used to call the program code stored in the memory to execute the above-described method.
[0063] In addition, this disclosure also provides a non-transitory storage medium storing program code for performing the above-described methods.
[0064] The following is for reference. Figure 6 The diagram illustrates a structural schematic suitable for implementing a terminal 800 according to embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The terminal shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0065] like Figure 6 As shown, terminal 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 802 or a program loaded from storage device 808 into random access memory (RAM) 803. RAM 803 also stores various programs and data required for the operation of terminal 800. The processing device 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0066] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows terminal 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 A terminal 800 with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have instead.
[0067] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure.
[0068] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0069] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0070] The aforementioned computer-readable medium may be included in the aforementioned terminal; or it may exist independently and not assembled into the terminal.
[0071] The aforementioned computer-readable medium carries one or more programs that, when executed by the terminal, cause the terminal to: display at least two Internet Protocol (IP) addresses; send a node evaluation request including the at least two IP addresses to a node evaluation device, wherein the node evaluation device selects an IP address from the at least two IP addresses and returns it; and receive the IP address returned by the node evaluation device; wherein the displayed IP address indicates an edge node in a content delivery network.
[0072] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the terminal, cause the terminal to: receive a node evaluation request including at least two Internet Protocol (IP) addresses; select an IP address from the at least two IP addresses; and return the selected IP address; wherein the received IP address indicates an edge node in a content delivery network.
[0073] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed 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 remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0074] 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 this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated 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, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0075] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the units are not necessarily limiting in certain circumstances; for example, the first display unit can also be described as "a unit that displays at least two Internet Protocol addresses".
[0076] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0077] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0078] According to one or more embodiments of this disclosure, a method for editing a document is provided, comprising:
[0079] In response to receiving a first creation operation in the document, a first content block is created; wherein the first content block includes an interactive area and the first content block is of a first type;
[0080] In response to a first trigger operation on the first content block, a first editing area is generated, the first editing area being used to edit the first content block;
[0081] Based on the input information received in the first editing area, the display content of the interactive area of the first content block in the document is updated.
[0082] According to one or more embodiments of this disclosure, generating the first editing region includes:
[0083] Replace the interactive area with the first editing area.
[0084] According to one or more embodiments of this disclosure, before updating the display content of the interactive area of the first content block in the document, the method further includes:
[0085] Receive the second trigger operation on the interface where the first editing area is located;
[0086] In response to the second triggering operation, the display content of the interactive area of the first content block in the document is updated.
[0087] According to one or more embodiments of this disclosure, generating the first editing region includes:
[0088] The first editing area is generated in the associated area of the interactive area; wherein the interactive area and the first editing area are displayed simultaneously.
[0089] According to one or more embodiments of this disclosure, updating the display content of the interactive area of the first content block in the document based on input information received in the first editing area includes:
[0090] In response to input information received in the first editing area, the display content of the interactive area is updated in real time.
[0091] According to one or more embodiments of this disclosure, the method further includes:
[0092] Hide the first editing area; or
[0093] Adjust the display scale of the first editing area.
[0094] According to one or more embodiments of this disclosure, the method further includes:
[0095] Create a linker file;
[0096] The target module is retrieved from the database using the connection file;
[0097] Obtain the dependency tree of the target module; and
[0098] The target module is recursively parsed based on the dependency tree to obtain the target file.
[0099] According to one or more embodiments of this disclosure, creating the connection file includes:
[0100] Obtain the invocation instruction;
[0101] Replace the invocation instruction with the target instruction; and
[0102] Use the target instruction as the link file;
[0103] The target module includes an asynchronous module, a global variable export module, and a cascading style sheet module.
[0104] According to one or more embodiments of this disclosure, the method further includes:
[0105] Obtain instruction information for re-editing the content block;
[0106] The content block is further edited according to the instruction information to obtain the editing result.
[0107] According to one or more embodiments of this disclosure, the method further includes:
[0108] Define the creation port of the content block as the host port;
[0109] Determine the port from which the instruction information was sent;
[0110] If the issuing port is not the host terminal, the instruction information is sent to the host terminal, and the instruction information is executed through the host terminal; and
[0111] Return the edited result to the sending port;
[0112] The instruction information includes: replacement operation, insertion operation, and removal operation.
[0113] According to one or more embodiments of this disclosure, a method for editing a document is provided, comprising:
[0114] In response to receiving a second creation operation in the document, a second content block is created; wherein the second content block is of a second type, the second content block includes a second editing area, the second editing area being used for editing the document;
[0115] In response to a third trigger operation on the second content block, a third editing region is generated, the third editing region being used to compile the second content block;
[0116] Based on the input information received in the third editing area, the block type and / or display content of the second content block are updated in the document.
[0117] According to one or more embodiments of this disclosure, a document editing apparatus is provided, comprising:
[0118] A creation module is configured to create a first content block in response to receiving a first creation operation in a document; wherein the first content block includes an interactive area and is of a first type; or, in response to receiving a second creation operation in a document, create a second content block; wherein the second content block is of a second type and includes a second editing area for editing the document;
[0119] A generation module is configured to generate a first editing region in response to a first trigger operation on the first content block; wherein the first editing region is used to edit the first content block; or, in response to a third trigger operation on the second content block, generate a third editing region, wherein the third editing region is used to compile the second content block; and
[0120] An update module is configured to update the display content of the interactive area of the first content block in the document based on input information received in the first editing area; or, based on input information received in the third editing area, update the block type and / or display content of the second content block in the document.
[0121] According to one or more embodiments of this disclosure, a terminal is provided, the terminal comprising: at least one memory and at least one processor; wherein the memory is used to store program code, and the processor is used to invoke the program code stored in the memory to execute the above-described method.
[0122] According to one or more embodiments of this disclosure, a non-transitory storage medium is provided, the non-transitory storage medium storing program code for performing the above-described method.
[0123] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0124] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0125] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for document editing, comprising: creating a first content block in response to receiving a first creation operation in a document, wherein the first content block comprises an interactive area, and the first content block is of a first type; generating a first editing area for editing the first content block in response to a first trigger operation on the first content block, wherein the first editing area is configured to receive inputted codes; updating display content of the interactive area of the first content block in the document based on inputted information received in the first editing area.
2. The method of claim 1, wherein, The generating of the first editing area comprises: replacing the interactive area with the first editing area.
3. The method of claim 2, wherein, Before the updating of the display content of the interactive area of the first content block in the document, the method further comprises: receiving a second trigger operation in an interface where the first editing area is located; updating the display content of the interactive area of the first content block in the document in response to the second trigger operation.
4. The method of claim 1, wherein, The generating of the first editing area comprises: generating the first editing area in an associated area of the interactive area, wherein the interactive area and the first editing area are displayed simultaneously.
5. The method of claim 4, wherein, The updating of the display content of the interactive area of the first content block in the document based on inputted information received in the first editing area comprises: updating the display content of the interactive area in real time in response to the inputted information received in the first editing area.
6. The method of claim 1, wherein, The method further comprises: hiding the first editing area; or adjusting a display scale of the first editing area.
7. The method of claim 1, wherein, The method further comprises: creating a connection file; retrieving a target module in a database through the connection file; obtaining a dependency tree of the target module; and recursively parsing the target module according to the dependency tree to obtain a target file.
8. The method of claim 7, wherein, The creating of the connection file comprises: obtaining a calling instruction; replacing the calling instruction with a target instruction; and taking the target instruction as the connection file. The target module comprises an asynchronous module, a global variable export module, and a cascading style sheet module.
9. The method of claim 1, wherein, The method further comprises: obtaining instruction information for re-editing the content block; re-editing the content block according to the instruction information to obtain an editing result.
10. The method of claim 9, wherein, The method further comprises: defining a creation port of the content block as a host port; judging an issuing port of the instruction information; if the issuing port is not the host port, sending the instruction information to the host port and executing the instruction information through the host port; and returning the editing result to the issuing port. The instruction information comprises a replacement operation, an insertion operation, and a removal operation. 11.A method for document editing, comprising: creating a second content block in response to receiving a second creation operation in a document, wherein the second content block is of a second type, and the second content block comprises a second editing area configured to edit the document; generating a third editing area for compiling the second content block in response to a third trigger operation on the second content block. update, in the document, a display content of the interactive area of the first content block based on input information received at the first editing area; or update, in the document, a block type and / or a display content of the second content block based on input information received at the third editing area.
12. An apparatus for document editing, comprising: a creating module configured to create a first content block in response to receiving a first creating operation in a document, wherein the first content block comprises an interactive area, and the first content block is of a first type; or create a second content block in response to receiving a second creating operation in the document, wherein the second content block is of a second type, and the second content block comprises a second editing area for editing the document; a generating module configured to generate a first editing area in response to a first triggering operation on the first content block, wherein the first editing area is for editing the first content block, and the first editing area is for receiving inputted code; or generate a third editing area in response to a third triggering operation on the second content block, wherein the third editing area is for compiling the second content block; and an updating module configured to update, in the document, a display content of the interactive area of the first content block based on input information received at the first editing area; or update, in the document, a block type and / or a display content of the second content block based on input information received at the third editing area.
13. A terminal, comprising: at least one memory and at least one processor; wherein the at least one memory is configured to store program code, and the at least one processor is configured to invoke the program code stored in the at least one memory to execute the method in any one of claims 1 to 11.
14. A non-transitory storage medium, storing program code, which when executed by a processor, implements the method in any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for compiling pictures in browser
CN104239317A
Realtime Synchronized Document Editing By Multiple Users For Blogging
CN106202021A
Document processing method, document processing device and electronic equipment
CN111985203A