Rich text content processing method and device, storage medium, and electronic device

CN112230913BActive Publication Date: 2025-02-21BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910577039.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-28
Publication Date
2025-02-21
Estimated Expiration
2039-06-28

AI Technical Summary

Technical Problem

Existing rich text editors cannot add and transfer custom cards in the editor, and cannot integrate and render HTML5 page content.

Method used

By obtaining the type information of the virtual card in the rich text editor, generating corresponding pop-up windows, obtaining the filled-in content and generating snapshot pictures, and finally generating the virtual card based on the content and pictures and inserting it into the editor.

Benefits of technology

It realizes adding and transferring custom cards in rich text editors, enriching the editor's operation content, improving the user's visual experience and inserting custom cards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112230913B_ABST
    Figure CN112230913B_ABST
Patent Text Reader

Abstract

The present disclosure belongs to the field of computer technology, and relates to a method and device for processing rich text content, a computer-readable storage medium, and an electronic device. The method includes: obtaining the type information of a virtual card in a rich text editor, and generating a pop-up window corresponding to the type information; obtaining the content information filled in the pop-up window, and generating a snapshot image corresponding to the type information according to the link information in the content information; generating a virtual card according to the content information and the snapshot image, and inserting the virtual card into the rich text editor. On the one hand, the present disclosure provides richer operation content in the rich text editor, and can provide users with a way to insert custom cards to facilitate user operation. On the other hand, it can beautify the rendered page and enhance the user's visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method for processing rich text content, a device for processing rich text content, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the rapid development of the Internet, World Wide Web (Web) applications can be seen everywhere in daily life and have become an indispensable part of people in contemporary society. The rich text editor of Web applications has also become a highlight, which can upload media files such as pictures, videos and music, but this cannot meet people's needs.

[0003] Since there is no API for inserting complex HTML, if you want to add some custom cards in the rich text editor, the provided API cannot meet your needs. In addition, the rich text editor can only transmit the normal output HTML. If the rich text editor is configured with an HTML5 (H5) page, data integration is required to facilitate the integration and rendering of the H5 page content.

[0004] In view of this, there is an urgent need in the art to develop a new method and device for processing rich text content.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] The purpose of the present disclosure is to provide a method for processing rich text content, a device for processing rich text content, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problem of being unable to add and transmit custom cards in a rich text editor due to limitations of related technologies.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of an embodiment of the present invention, a method for processing rich text content is provided, the method comprising: obtaining type information of a virtual card in a rich text editor, and generating a pop-up window corresponding to the type information; obtaining content information filled in the pop-up window, and generating a snapshot image corresponding to the type information according to link information in the content information; generating the virtual card according to the content information and the snapshot image, and inserting the virtual card into the rich text editor.

[0009] In an exemplary embodiment of the present invention, the method further includes: obtaining the content information and the snapshot image, and saving the content information and the snapshot image as a target file; determining the sequence information of the target file in the rich text editor, and uploading the target file to the server according to the sequence information.

[0010] In an exemplary embodiment of the present invention, saving the content information and the snapshot image as a target file includes: obtaining a type identifier corresponding to the type information; and saving the type identifier, the content information, and the snapshot image as a target file.

[0011] In an exemplary embodiment of the present invention, the type identification includes a product identification, a crowdfunding product identification, a coupon identification, an article identification and a clothing matching identification.

[0012] In an exemplary embodiment of the present invention, the target file includes a file stored in a JSON format.

[0013] In an exemplary embodiment of the present invention, before obtaining the type information of the virtual card in the rich text editor, the method further includes: responding to a trigger event acting on a preset control, obtaining position information of the trigger event; determining the preset control corresponding to the position information as a target control, so as to determine the type information based on the target control.

[0014] In an exemplary embodiment of the present invention, inserting the virtual card into the rich text editor includes: acquiring form information in the content information based on the type information; and displaying the virtual card in the rich text editor according to the form information.

[0015] In an exemplary embodiment of the present invention, the rich text editor includes a plurality of the virtual cards.

[0016] According to a second aspect of an embodiment of the present invention, a device for processing rich text content is provided, the device comprising: a pop-up display module, configured to obtain type information of a virtual card in a rich text editor, and generate a pop-up window corresponding to the type information; a snapshot generation module, configured to obtain content information filled in the pop-up window, and generate a snapshot image corresponding to the type information according to link information in the content information; a card insertion module, configured to generate the virtual card according to the content information and the snapshot image, and insert the virtual card into the rich text editor.

[0017] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for processing rich text content of any of the above exemplary embodiments is implemented.

[0018] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for processing rich text content in any of the above exemplary embodiments is implemented.

[0019] It can be seen from the above technical solutions that the rich text content processing method, rich text content processing device, computer storage medium and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0020] In the method and device provided by the exemplary embodiments of the present disclosure, a virtual card of a selected type can be filled and a snapshot image can be generated to insert the virtual card into a rich text editor. On the one hand, the operation content in the rich text editor is richer, and a custom card insertion method can be provided for the user to facilitate the user's operation. On the other hand, the rendered page can be beautified, improving the user's visual experience.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0023] Figure 1 A flowchart schematically illustrates a method for processing rich text content in an exemplary embodiment of the present disclosure;

[0024] Figure 2 A flowchart schematically illustrating a method for determining type information of a virtual card in an exemplary embodiment of the present disclosure;

[0025] Figure 3 A flowchart schematically illustrating a method for inserting a virtual card into a rich text editor in an exemplary embodiment of the present disclosure;

[0026] Figure 4 A flowchart schematically illustrates a method for saving a target file in an exemplary embodiment of the present disclosure;

[0027] Figure 5 A schematic diagram schematically illustrates a flow chart of a method for acquiring and saving a type identifier in an exemplary embodiment of the present disclosure;

[0028] Figure 6 A schematic diagram of an application interface of a pop-up window corresponding to a product card in an exemplary embodiment of the present disclosure is schematically shown;

[0029] Figure 7 A schematic diagram of an application interface for inserting a product card into a rich text editor in an exemplary embodiment of the present disclosure is schematically shown;

[0030] Figure 8 A schematic diagram of an application interface for displaying a virtual card on a client in an exemplary embodiment of the present disclosure is schematically shown;

[0031] Fig. 9 A schematic diagram of the content processing flow of a rich text editor in an exemplary embodiment of the present disclosure is schematically shown;

[0032] Fig.10 A flowchart schematically illustrating a method for inserting a virtual card into a rich text editor in an exemplary embodiment of the present disclosure;

[0033] Fig.11 A flowchart schematically illustrates a method for converting content in a rich text editor into JSON format in an exemplary embodiment of the present disclosure;

[0034] Fig.12 A schematic diagram schematically shows a structure of a device for processing rich text content in an exemplary embodiment of the present disclosure;

[0035] Fig.13 An electronic device for implementing a method for processing rich text content in an exemplary embodiment of the present disclosure is schematically shown;

[0036] Fig.14 A computer-readable storage medium for implementing a method for processing rich text content in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0038] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0039] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0040] In view of the problems existing in the related art, the present disclosure proposes a method for processing rich text content. Figure 1 A flowchart of a method for processing rich text content is shown, such as Figure 1 As shown, the method for processing rich text content includes at least the following steps:

[0041] Step S101. Obtain type information of a virtual card in a rich text editor, and generate a pop-up window corresponding to the type information.

[0042] Step S102: Obtain the content information filled in the pop-up window, and generate a snapshot image corresponding to the type information according to the link information in the content information.

[0043] Step S103: Generate a virtual card according to the content information and the snapshot image, and insert the virtual card into the rich text editor.

[0044] In an exemplary embodiment of the present disclosure, a virtual card of a selected type can be filled and a snapshot image can be generated to insert the virtual card into a rich text editor. On the one hand, the operation content in the rich text editor is richer, and a custom card insertion method can be provided for users to facilitate user operation. On the other hand, the rendered page can be beautified to enhance the user's visual experience.

[0045] The following is a detailed description of each step of the method for processing rich text content.

[0046] In step S101, the type information of the virtual card in the rich text editor is obtained, and a pop-up window corresponding to the type information is generated.

[0047] In an exemplary embodiment of the present disclosure, a virtual card may be card data stored in an electronic medium of a terminal, and displayed in the form of a card in the terminal. In an optional embodiment, a rich text editor includes multiple virtual cards. The rich text editor may display rich text content uploaded by the user, and the rich text content may include some media files, such as pictures, music, videos, etc., and may also include user-defined virtual cards. In each independent rich text editor, the user may upload multiple virtual cards. In this exemplary embodiment, the user may upload multiple virtual cards in one rich text editor, and the editing experience may be more friendly, the editing content may be richer, and the customization method may be more flexible.

[0048] In order to make the virtual card present a more refined effect on the client, multiple types of virtual cards can be set. For example, virtual cards can have commodity types, crowdfunding commodity types, coupon types, article types, and clothing matching types, etc., which are not specifically limited in this exemplary embodiment. The type information can be information reflecting the characteristics of different types of virtual cards.

[0049] In an alternative embodiment, Figure 2 A flow chart of a method for determining type information of a virtual card is shown. Figure 2As shown, the method at least includes the following steps: In step S201, in response to a trigger event acting on a preset control, the position information of the trigger event is obtained. In the rich text editor, multiple preset controls can be set for the preset type information of the virtual card. The preset type information is the type information of multiple virtual cards provided to the user for selection operation. For example, the preset type information may include commodity type information, article type information, coupon type information, crowdfunding commodity type information, movie ticket type information, and clothing matching type information, etc., which is not specifically limited in this exemplary embodiment. Different preset types correspond to a preset control respectively, so different preset controls have different position information on the terminal. The user can initiate a trigger event at the corresponding position of the preset control, and the trigger event can be any form such as a click event, a long press event, a sliding event, etc., which is not specifically limited in this exemplary embodiment. For example, if the trigger event is a click event, the position information of the preset control corresponding to the click position of the trigger medium can be obtained; if the trigger event is a sliding event, the position information of the preset control corresponding to the position of the sliding end point of the trigger medium can be obtained; if the trigger event is an event of other forms, the method for determining the position information of the corresponding preset control can be set according to the actual trigger situation, which is not specifically limited in this exemplary embodiment. In step S202, the preset control corresponding to the position information is determined as the target control, so as to determine the type information according to the target control. According to the position information of the preset control acted upon by the acquired trigger event, the preset control can be determined as the target control. Based on the mapping relationship between the preset control and the preset type information, the corresponding type information can be determined according to the target control. In this exemplary embodiment, the user can determine the type information of the virtual card to be inserted by a trigger operation acting on the terminal. On the one hand, the virtual card types are diverse, providing more diverse choices and richer display effects. On the other hand, the operation method is simple and convenient, which facilitates the user to flexibly use the editing tools.

[0050] According to the type information of the virtual card selected by the user, a pop-up window corresponding to the type information can be generated. A pop-up window refers to a window that pops up automatically after the type of virtual card is determined. The pop-up window can display the option information that has been set in a type of virtual card, and can also provide the user with content information that needs to be filled in the virtual card of this type. For example, when the virtual card is a virtual card of a commodity type, the pop-up window can display the form information of the commodity that the user wants to display, which can be a small business card form, a large business card form, or other forms. This exemplary embodiment does not make special restrictions on this; the pop-up window can also provide content information to be filled in by the user, which can include link information of the commodity, price information of the commodity, and other information to be filled in. This exemplary embodiment does not make special restrictions on this.

[0051] In step S102, the content information filled in the pop-up window is obtained, and a snapshot image corresponding to the type information is generated according to the link information in the content information.

[0052] In an exemplary embodiment of the present disclosure, the content information may be information to be filled in by the user provided in a pop-up window, and different types of virtual cards correspond to different information to be filled in. For example, when the virtual card is a virtual card of a commodity type, the content information to be filled in by the user may include link information of the commodity, price information of the commodity, or other information to be filled in, and this exemplary embodiment does not specifically limit this. In order to preview the corresponding effects of different types of virtual cards in a rich text editor, the link information in the content information may be obtained. The link information is a connection relationship from a web page to a target, and the target pointed to may be another web page, or a different location on the same web page, or a picture, an email address, a file, or an application, etc., and this exemplary embodiment does not specifically limit this. According to the link information, a snapshot image corresponding to the type information may be generated to display the target pointed to by the link information. The snapshot image may capture and save the target pointed to by the link information, and display it in the corresponding position of the pop-up window. For example, if the virtual card is a commodity type, the snapshot image may display the main view and price information of the commodity.

[0053] In step S103, a virtual card is generated according to the content information and the snapshot image, and the virtual card is inserted into the rich text editor.

[0054] In an exemplary embodiment of the present disclosure, a virtual card corresponding to the type information can be generated based on the snapshot image generated by the link information and the content information filled in by the user, and the virtual card can be inserted into the rich text editor. Figure 3 A flow chart of a method for inserting a virtual card into a rich text editor is shown, Figure 3As shown, the method at least includes the following steps: In step S301, based on the type information, the form information in the content information is obtained. A type of virtual card may include one or more display forms, and the information reflecting different display forms is the form information. For example, a virtual card of the commodity type can have four display forms, namely, a small business card form, a large business card form, a one-to-two form, and a one-row-two form. Corresponding to the four display forms, when the user fills in the content information in the pop-up window, the form information in the content information will be filled in or selected, that is, the display form of the commodity is determined. In step S302, in the rich text editor, the virtual card is displayed according to the form information. For example, if the commodity is a laptop computer, the display method of the large business card form can be selected, and the form information of the large business card form can be obtained to display the laptop computer accordingly. In this exemplary embodiment, the display method of the virtual card in the rich text editor is given, the display effect is diversified, the presentation effect is more refined, and the quality of the displayed content is improved, so that the browsing experience of the client is more friendly.

[0055] In an alternative embodiment, Figure 4 A flow chart of a method for saving a target file is shown, Figure 4 As shown, the method at least includes the following steps: in step S401, content information and snapshot images are obtained, and the content information and snapshot images are saved as target files. In order to save the corresponding data in the virtual image on the node corresponding to the content of the rich text editor, and to facilitate the corresponding conversion of data between the front end, the back end and the client, the content information and snapshot images in the virtual card can be saved as a target file. In an optional embodiment, the target file includes a file stored in the JSON format. JavaScript Object Notation (JSON format for short) refers to a string format obtained by converting a set of data in a javascript object. Files in JSON format can be transferred between networks or programs, and can also be restored to data formats supported by various programming languages. In this exemplary embodiment, the information filled in the virtual card is saved in JSON format, which can not only meet the corresponding conversion of the content in the front-end rich text editor, but also meet the data storage of the back end, and also meet the needs of client rendering pages.

[0056] In an alternative embodiment, Figure 5 A flow chart of a method for obtaining and saving a type identifier is shown, such as Figure 5As shown, the method at least includes the following steps: In step S501, a type identifier corresponding to the type information is obtained. For the display effect of the virtual card, the preset virtual card types may include commodity type, crowdfunding commodity type, coupon type, article type, and clothing matching type, etc., and this exemplary embodiment does not specifically limit this. The type identifier is an identifier set for different types of virtual cards. Therefore, in an optional embodiment, the type identifier includes a commodity identifier, a crowdfunding commodity identifier, a coupon identifier, an article identifier, and a clothing matching identifier. Different types of virtual cards correspond to different type identifiers. For example, the clothing matching identifier may be a graphic identifier in the shape of a shirt, and the crowdfunding commodity identifier may be a graphic identifier in the shape of a human figure. The shape of the identifier may be set according to the characteristics of the type, and this exemplary embodiment does not specifically limit this. In addition, the type identifier may also be field information reflecting the type characteristics to distinguish various virtual cards. When inserting a virtual card, the desired type identifier may be stored according to the needs of the user. In this exemplary embodiment, different types of virtual cards may have type identifiers for distinction, which facilitates developers to identify the types of snapshot images, facilitates users to store the desired card types according to their own needs, and facilitates user modification, and the user operation function is more comprehensive and complete. In step S502, the type identifier, content information and snapshot image are saved as a target file. When the content information and snapshot image are saved, the type identifier is saved at the same time, and the three are saved as a whole on the current content node of the rich text editor to improve the attribute information of the snapshot image.

[0057] In step S402, the sequence information of the target file in the rich text editor is determined, and the target file is uploaded to the server side according to the sequence information. Since a variety of rich text contents can be saved in an independent rich text editor, in order to ensure that the display content of the display end is normal, the saving order of the target file can be set to be consistent with the display order of the rich text content. Therefore, the sequence information of the target file in the rich text editor can be obtained, the target file is stored according to the sequence information, and then the overall content is combined and uploaded to the server side. In this exemplary embodiment, the storage order of the target file is unified with the display order in the rich text editor, which ensures that the client displays the content accurately and ensures the accuracy of data transmission between the front end, the back end and the client.

[0058] The following is a detailed description of the method for processing rich text content in an embodiment of the present disclosure in conjunction with an application scenario.

[0059] Figure 6 A schematic diagram of the application interface of the pop-up window corresponding to the product card is shown, Figure 6As shown, when inserting a product, you can choose the form of inserting the product, and the user needs to enter the link information of the product. According to the link information, the data of the corresponding product can be pulled from the background, for example, there can be a display image and price of the product, and the effect preview image of the product can be generated according to the display form based on the acquired data. It can be seen that the product in this exemplary embodiment is a laptop computer, and the corresponding price is 7299 yuan. Figure 7 A schematic diagram of the application interface for inserting a product card into a rich text editor is shown, Figure 7 As shown, according to the selected product display format, information such as the price, thickness and weight of the laptop computer can be displayed. Figure 8 A schematic diagram of the application interface displayed on the client according to the virtual card in the rich text editor is shown, Figure 8 As shown, the client can browse the name, price, main view and other information of the laptop computer, and the user can also initiate a purchase of the product through the control.

[0060] Fig. 9 A flowchart showing the content processing of a rich text editor is shown in FIG. Fig. 9 As shown, the toolbar of the rich text editor provides entry controls for virtual cards that need to be inserted, for example, product cards and coupon cards. Users can fill in the corresponding content information in the virtual card, and a snapshot image can be generated based on the link information in the content information. The snapshot image can be inserted into the rich text editor through the original interface, which is simpler and more direct. A JSON object can be constructed for storage based on the filled-in content information and snapshot image, and a file in JSON format can be stored in the corresponding node of the rich text editor content. The content edited by the user and the data sent by the backend are merged and uploaded to the server.

[0061] Fig.10 A flow chart of a method for inserting a virtual card into a rich text editor is shown, Fig.10As shown, in the rich text editor, you can choose to insert a new virtual card or modify the previous card. When inserting a new virtual card, you can obtain the corresponding type information according to the card type determined by the user to generate a pop-up window of this type. The user can fill in the corresponding content information in the pop-up window to generate a corresponding snapshot image according to the link information in the content information. A virtual card can be generated based on the content information and the snapshot image, and the virtual card can be inserted into the rich text editor. When modifying the previous virtual card, you can create a new virtual card, fill in the virtual card, and then replace the original virtual card on this node. For example, when the price of a commodity floats from 100 yuan to 80 yuan, you can recreate a virtual card for a commodity, modify the corresponding price, and reinsert the virtual card of 80 yuan into the rich text editor, and the data on the corresponding node is also updated. In addition, the virtual card of the commodity type can also be replaced with a virtual card of other types, and this exemplary embodiment does not make special restrictions on this.

[0062] Fig.11 A flow chart of a method for converting the content in a rich text editor into JSON format is shown, as shown in Fig.11 As shown, when using a rich text editor, when the virtual card is a user-defined virtual card, the user can obtain the data in JSON format saved on the content node, and combine the JSON data of the overall content, and upload it to the server; when the virtual card is not a user-defined card, the system can automatically identify it and the user does not need to perform the storage operation again.

[0063] In an exemplary embodiment of the present disclosure, a virtual card of a selected type can be filled and a snapshot image can be generated to insert the virtual card into a rich text editor. On the one hand, the operation content in the rich text editor is richer, and a custom card insertion method can be provided for users to facilitate user operation. On the other hand, the rendered page can be beautified to enhance the user's visual experience.

[0064] In addition, in an exemplary embodiment of the present disclosure, a device for processing rich text content is also provided. Fig.12 A schematic diagram of the structure of a device for processing rich text content is shown, such as Fig.12 As shown, the rich text content processing device 1200 may include: a pop-up window display module 1201, a snapshot generation module 1202, and a card insertion module 1203. Among them:

[0065] The pop-up display module 1201 is configured to obtain the type information of the virtual card in the rich text editor and generate a pop-up window corresponding to the type information; the snapshot generation module 1202 is configured to obtain the content information filled in the pop-up window, and generate a snapshot image corresponding to the type information according to the link information in the content information; the card insertion module 1203 is configured to generate a virtual card according to the content information and the snapshot image, and insert the virtual card into the rich text editor.

[0066] The specific details of the above-mentioned rich text content processing device have been described in detail in the corresponding data processing method, so they will not be repeated here.

[0067] It should be noted that, although several modules or units of the rich text content processing device 1200 are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0068] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0069] Refer to the following Fig.13 13 to 14. An electronic device 1300 according to such an embodiment of the present invention is described. Fig.13 The electronic device 1300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0070] like Fig.13 As shown, the electronic device 1300 is in the form of a general computing device. The components of the electronic device 1300 may include, but are not limited to: at least one processing unit 1310, at least one storage unit 1320, a bus 1330 connecting different system components (including the storage unit 1320 and the processing unit 1310), and a display unit 1340.

[0071] The storage unit stores program codes, which can be executed by the processing unit 1310, so that the processing unit 1310 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0072] The storage unit 1320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1321 and / or a cache memory unit 1322 , and may further include a read-only memory unit (ROM) 1323 .

[0073] The storage unit 1320 may also include a program / utility 1324 having a set (at least one) of program modules 1325, such program modules 1325 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0074] Bus 1330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0075] The electronic device 1300 may also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1300, and / or communicate with any device that enables the electronic device 1300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1350. Furthermore, the electronic device 1300 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1360. As shown, the network adapter 1340 communicates with other modules of the electronic device 1300 via a bus 1330. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0076] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.

[0077] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0078] refer to Fig.14 As shown, a program product 1400 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0079] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0080] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0081] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0082] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0083] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for processing rich text content, characterized in that: The method comprises: Obtaining type information of a virtual card in a rich text editor, and generating a pop-up window corresponding to the type information; Acquire the content information filled in the pop-up window, and generate a snapshot image corresponding to the type information according to the link information in the content information; The virtual card is generated according to the content information and the snapshot image, and the virtual card is inserted into the rich text editor.

2. The method for processing rich text content according to claim 1, characterized in that: The method further comprises: Acquire the content information and the snapshot image, and save the content information and the snapshot image as a target file; Determine the sequence information of the target file in the rich text editor, and upload the target file to the server according to the sequence information.

3. The method for processing rich text content according to claim 2, characterized in that: The step of saving the content information and the snapshot image as a target file includes: Obtaining a type identifier corresponding to the type information; The type identifier, the content information and the snapshot image are saved as a target file.

4. The method for processing rich text content according to claim 3, characterized in that: The type identification includes product identification, crowdfunding product identification, coupon identification, article identification and clothing matching identification.

5. The method for processing rich text content according to claim 3, characterized in that: The target file includes a file stored in JSON format.

6. The method for processing rich text content according to claim 1, characterized in that: Before obtaining the type information of the virtual card in the rich text editor, the method further includes: In response to a trigger event acting on a preset control, obtaining position information of the trigger event; The preset control corresponding to the position information is determined as a target control, so as to determine the type information according to the target control.

7. The method for processing rich text content according to claim 1, characterized in that: Inserting the virtual card into the rich text editor includes: Based on the type information, acquiring form information in the content information; In the rich text editor, the virtual card is displayed according to the form information.

8. The method for processing rich text content according to claim 1, characterized in that: The rich text editor includes a plurality of virtual cards.

9. A device for processing rich text content, characterized in that: include: A pop-up window display module is configured to obtain type information of a virtual card in a rich text editor and generate a pop-up window corresponding to the type information; A snapshot generation module, configured to obtain the content information filled in the pop-up window, and generate a snapshot image corresponding to the type information according to the link information in the content information; The card insertion module is configured to generate the virtual card according to the content information and the snapshot image, and insert the virtual card into the rich text editor.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing rich text content described in any one of claims 1 to 8 is implemented.

11. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to execute the rich text content processing method described in any one of claims 1 to 8 by executing the executable instructions.

Citation Information

Patent Citations

  • Method for editing rich text and rich text editor

    CN102915328A

  • Method and system for realizing rich text display

    CN103389968A