CN111259644B - Rich text processing method, editor, equipment and storage medium - Google Patents

Rich text processing method, editor, equipment and storage medium Download PDF

Info

Publication number
CN111259644B
CN111259644B CN201811459641.8A CN201811459641A CN111259644B CN 111259644 B CN111259644 B CN 111259644B CN 201811459641 A CN201811459641 A CN 201811459641A CN 111259644 B CN111259644 B CN 111259644B
Authority
CN
China
Prior art keywords
component
rich text
target
inline
text template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811459641.8A
Other languages
Chinese (zh)
Other versions
CN111259644A (en
Inventor
李佳骏
田宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811459641.8A priority Critical patent/CN111259644B/en
Publication of CN111259644A publication Critical patent/CN111259644A/en
Application granted granted Critical
Publication of CN111259644B publication Critical patent/CN111259644B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a rich text processing method, an editor, rich text processing equipment and a storage medium. In the embodiment of the application, new text content, namely inline components, are added in the rich text field, the inline components are used as the text content in the rich text field, values and/or styles of the inline components can be dynamically changed, a rich text template is generated in advance based on the inline components, and then the rich text is generated based on the rich text template. The style of the in-line components in the rich text template can be flexibly adjusted by combining the characteristic that the style of the in-line components can be dynamically changed, different rich texts can be generated according to the same rich text template by combining the characteristic that the values of the in-line components can be dynamically changed, and the rich text editing is more flexible and is favorable for meeting the continuously increased rich text editing requirements.

Description

Rich text processing method, editor, equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a rich text processing method, an editor, a device, and a storage medium.
Background
A Rich Text Editor (RTE) is a Text Editor that can be embedded in a browser, what you see is what you get. The rich text editor can perform different formatting processing on the text, and the rich text edited by the rich text editor usually has rich format settings and is stronger in readability.
With the rich text editor, a user can easily edit rich text in various formats. However, the rich text editing requirements of users are increasing, and the rich text editor is gradually unable to meet the increasing text editing requirements of users.
Disclosure of Invention
Various aspects of the present application provide a rich text processing method, an editor, a device, and a storage medium, so as to provide a more flexible rich text processing method, and meet the continuously increasing rich text editing requirements.
The embodiment of the application provides a rich text processing method, which comprises the following steps: receiving a rich text template identifier sent by a service end; determining a target rich text template from at least one rich text template according to the rich text template identification; obtaining a rich text required by the service end according to the target rich text template; and sending the rich text to the service end for the service end to use.
The embodiment of the present application further provides another rich text processing method, including: displaying an editing interface, wherein the editing interface comprises an editing area and at least one component icon of an in-row component; determining at least one target component icon dragged into the editing area in response to at least one component icon dragging operation; rendering at least one target in-row component corresponding to the at least one target component icon into the editing area; generating a rich text template according to at least one target in-line component in the editing area; wherein, the at least one inline component belongs to the text content in the rich text field, and the value and/or style thereof can be dynamically changed.
An embodiment of the present application further provides an apparatus, including: a memory, a processor, and a communications component;
the communication component is used for receiving the rich text template identification sent by the service end; the memory for storing a computer program; the processor to execute the computer program to: determining a target rich text template from at least one rich text template according to the rich text template identification; obtaining a rich text required by the service end according to the target rich text template; the communication component is further configured to send the rich text to the service end for use by the service end.
An embodiment of the present application further provides another device, including: the device comprises a memory, a processor and a display screen;
the memory for storing a computer program; the processor to execute the computer program to: displaying an editing interface through the display screen, wherein the editing interface comprises an editing area and component icons of at least one in-row component; determining at least one target component icon dragged into the editing area in response to at least one component icon dragging operation; rendering at least one target in-row component corresponding to the at least one target component icon into the editing area; generating a rich text template according to at least one target in-line component in the editing area; wherein, the at least one inline component belongs to the text content in the rich text field, and the value and/or style thereof can be dynamically changed.
The embodiment of the present application further provides a rich text editor, including: an editing interface comprising an editing area and component icons for at least one in-row component; the editing interface is configured to determine at least one target component icon dragged into the editing region in response to at least one component icon dragging operation; rendering at least one target in-row component corresponding to the at least one target component icon into the editing area; generating a rich text template according to at least one target inline component in the editing area; wherein, the at least one inline component belongs to the text content in the rich text field, and the value and/or style thereof can be dynamically changed.
The embodiment of the present application further provides a computer-readable storage medium storing a computer program, which is used to implement the steps in the rich text processing method provided in the foregoing embodiment of the present application when the computer program is executed by a processor.
The embodiment of the present application further provides a computer-readable storage medium storing a computer program, which is used to implement the steps in another rich text processing method provided in the above embodiment of the present application when the computer program is executed by a processor.
In the embodiment of the application, new text content, namely the inline component is added in the rich text field, the inline component is used as the text content in the rich text field, the value and/or the style of the inline component can be changed dynamically, the rich text template is generated in advance based on the inline component, and then the rich text is generated based on the rich text template. The style of the in-line components in the rich text template can be flexibly adjusted by combining the characteristic that the style of the in-line components can be dynamically changed, different rich texts can be generated according to the same rich text template by combining the characteristic that the values of the in-line components can be dynamically changed, and the rich text editing is more flexible and is favorable for meeting the continuously increased rich text editing requirements.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1a is a schematic flow chart diagram illustrating a rich text processing method according to an exemplary embodiment of the present application;
FIG. 1b is a style diagram of an editing interface provided by an exemplary embodiment of the present application;
FIG. 1c is a style diagram of another editing interface provided by an exemplary embodiment of the present application;
FIG. 2a is a style diagram of yet another editing interface provided by an exemplary embodiment of the present application;
FIG. 2b is a style sheet for rendering inline components into an edit section as provided in an exemplary embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating another rich text processing method according to an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an exemplary embodiment of an apparatus 400 according to the present application;
fig. 5 is a schematic structural diagram of an apparatus 500 according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Aiming at the technical problem that the requirements for editing the existing rich text are continuously increased, in some embodiments of the application, new text content, namely inline components, are added in a rich text field, the inline components are used as the text content in the rich text field, values and/or styles of the inline components can be dynamically changed, a rich text template is generated in advance based on the inline components, and then the rich text is generated based on the rich text template. The style of the in-line components in the rich text template can be flexibly adjusted by combining the characteristic that the style of the in-line components can be dynamically changed, different rich texts can be generated according to the same rich text template by combining the characteristic that the values of the in-line components can be dynamically changed, and the rich text editing is more flexible and is favorable for meeting the continuously increased rich text editing requirements.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
In the embodiment of the present application, a rich text editor is provided, and the rich text editor may be embedded in a browser and implemented by relying on the browser, and may also be implemented as an independent software product. The rich text editor provided by the embodiment of the application not only supports common text content, but also supports at least one in-line component.
The inline components are text contents newly added in the rich text field in the embodiment of the application. The inline component is different from the plain text content in the rich text field, is somewhat similar to the front-end component in that attributes, methods and events exist, but can exist in the rich text editor like plain text content, and the value and/or style thereof can be dynamically changed, and the style and position thereof can be modified by the rich text editor.
After the inline components which can be edited like common text contents and have the properties, methods and events similar to the front-end components are added in the rich text field, the requirement of dynamic change can be met when contents such as names, ages, serial numbers and the like of people meet in the process of editing the rich text, and the requirement of the change of the style can be met when the style of some contents is required to be adjusted, so that the editing mode and flexibility of the rich text can be greatly enriched.
It is worth noting that the required inline components may be implemented in conjunction with the rich text application scenario before they are used. One or more inline components may be implemented according to the requirements of the rich text application scenario for inline components, with different kinds of inline components belonging to different text content in the rich text domain. For example, in some rich text application scenarios, at least one inline component of a variable component, a sequence number component, a reference sequence number component, a picture component, and a link component, among others, may be defined. For a detailed description of these inline components, reference may be made to the following examples, which are not intended to be detailed here.
The embodiment of the present application does not limit the manner for implementing inline components, and any manner capable of implementing inline components that can be edited by a rich text editor is applicable to the embodiment of the present application. The following embodiments of the present application provide a way to implement inline components, that is, implement at least one inline component using HyperText Markup Language (HTML) tags. Alternatively, the name and the attribute of the at least one inline component may be defined using HTML tags, and the method and the event of the at least one inline component are implemented based on the defined name and attribute of the at least one inline component, thereby obtaining the at least one inline component. Wherein inline components may be implemented using any HTML tag. For example, an input tag or div tag may be utilized to define the name and attributes of at least one inline component.
Taking the input tag as an example, data such as the name and attribute of the in-line component can be put into the data-tips attribute of the input tag. The view (view) layer of the inline component is realized through the input label, the name and the attribute of the inline component are converted into json character strings which are bound on the data-props attribute of the input label, and therefore, the integrity of data can still be kept after the inline component is copied, cut, pasted and the like in rich text. In addition, the view layer of the inline component is realized by using an input tag, so that the view layer supports the native events and the custom events of all the input tags, and the events supported by the inline component can be realized based on the native events and the custom events; meanwhile, the method of the inline components is realized by a constructor of the inline components, which is a class containing a large number of static methods (for simulating events and methods) to better separate a view layer and a control (control) layer, which enables the inline components to be inserted in the rich text editor and the presentation form of the inline components in the rich text editor to be dynamically changed by the inline component constructor. Moreover, intra-row components can also communicate and be linked with each other.
Regardless, rich text editing can be performed based on the at least one in-line component after the at least one in-line component is implemented. In the embodiment of the application, in order to fully utilize the characteristic that the values and/or styles of inline components can be dynamically changed, a rich text template can be generated based on the inline components, and then a rich text is generated according to the rich text template. The style of the in-line components in the rich text template can be flexibly adjusted by combining the characteristic that the style of the in-line components can be dynamically changed, different rich texts can be generated according to the same rich text template by combining the characteristic that the values of the in-line components can be dynamically changed, and the rich text editing is more flexible and is favorable for meeting the continuously increased rich text editing requirements.
The processes of generating the rich text template and generating the rich text based on the rich text template by the rich text editor will be described in detail below.
Fig. 1a is a schematic flowchart of a rich text processing method according to an exemplary embodiment of the present application. The method shown in fig. 1a mainly describes the process of generating a rich text template by a rich text editor. As shown in fig. 1a, the method comprises the steps of:
101. an editing interface is presented that includes an editing area and component icons for at least one in-row component.
102. At least one target component icon dragged into the editing region is determined in response to at least one component icon dragging operation.
103. And rendering at least one target in-row component corresponding to the at least one target component icon into the editing area.
104. A rich text template is generated from at least one target inline component within the edit region.
In this embodiment, the rich text editor provides an editing interface that is an interface for the rich text editor to interact with a user, facilitating the user to edit a desired rich text or rich text template using the rich text editor. As shown in FIGS. 1b and 1c, the editing interface includes an editing area and component icons for at least one in-row component. In fig. 1b, the component icons and the editing area of at least one in-line component are arranged left and right, the component icons are located on the left side of the editing interface, and the editing area is located on the right side of the editing interface. In FIG. 1c, the component icons and the editing area of at least one in-line component are arranged in an upper and lower row, and the component icons are located at the upper part of the editing interface, and the editing area is located below the component icons. It is worth mentioning that. The layout style between the component icons and the edit section is not limited to that shown in fig. 1b and 1 c. Any interface format that is capable of presenting component icons and edit sections for at least one in-row component is suitable for use with embodiments of the subject application.
Alternatively, the component icons of at least one in-row component may be organized in a list, as shown in FIGS. 1b and 1 c. A component icon represents an in-row component, and there should be a difference between component icons of different in-row components to facilitate a user being able to distinguish between different in-row components by component icons. The component icons may be pictures, graphics, numbers, animations, etc. Furthermore, the component icons of the in-row components can be provided with marking information such as the names of the in-row components, so that a user can quickly identify the in-row components represented by the component icons.
For example, when a user opens the rich text editor, or the rich text editor enters foreground runtime from the background, the rich text editor may present its editing interface to the user. It is noted that, besides the component icons including the editing area and at least one in-line component, the editing interface may also include other tools or components related to rich text editing, such as fonts, font sizes, forward and backward functional components, and this embodiment of the present application is not described here.
Wherein the component icons on the editing interface support drag events. When a user needs to use a certain in-line component, the component icon corresponding to the in-line component can be dragged into the editing area, so that the in-line component corresponding to the component icon can be rendered into the editing area by the rich text editor. If the user needs to use a plurality of in-line components, the component icons corresponding to the plurality of in-line components can be dragged into the editing area respectively, and thus the in-line components corresponding to the plurality of component icons can be rendered into the editing area by the rich text editor. It should be noted that the user drags the component icons into the editing area, but the in-line components corresponding to the component icons are actually shown in the editing area.
Based on the above, when the rich text template is generated, the user may perform at least one component icon dragging operation to drag a component icon corresponding to at least one in-line component required in the rich text template into the editing area, so that the at least one in-line component required by the rich text template is rendered into the editing area. For a rich text editor, at least one component icon dragged into the editing region may be determined in response to at least one component icon dragging operation; and rendering at least one in-row component corresponding to the determined at least one component icon dragged into the editing area. For ease of description, the component icon dragged into the edit area is referred to as the target component icon, and the inline component corresponding to the target component icon is referred to as the target inline component. Wherein a target component icon represents a target in-row component.
In an optional embodiment, the user performs a component icon drag-in operation, and the rich text editor responds to the component icon drag-in operation and renders the in-line component corresponding to the component icon into the editing area; and then, the user executes the next component icon dragging operation again and sequentially until the required in-line components in the rich text template are rendered into the editing area.
In another alternative embodiment, the user may continuously perform the component icon drag-in operation without considering the rendering result of the inline component corresponding to the last component icon drag-in operation when performing the next component icon drag-in operation. For the rich text editor, component icon dragging operations which occur continuously can be recorded, then the dragging operations of all component icons are responded in sequence, corresponding inline components are rendered into the editing area one by one, or multithreading is started, the dragging operations of all component icons are responded in parallel, and the corresponding inline components are rendered into the editing area in parallel.
It should be noted that the at least one target inline component may include the same kind of inline component, that is, the same kind of inline component is dragged into the editing region multiple times. For example, if a rich text template requires multiple uses of the same inline component, the user may drag the component icon for the inline component into the editing region multiple times, such that the inline component is rendered into the editing region multiple times. Of course, the positions of the components in several rows in the same kind are different in the editing area, and the rendered styles may be the same or different. Similarly, if the inline components of the category need to be assigned values, values of the inline components of the category in the next several rows may be the same or different when the rich text is subsequently generated. Of course, the at least one target intra-row element may be a completely different kind of intra-row element, or may be all of the same kind of intra-row elements.
After rendering at least one target inline component required by the rich text template to the editing region, the rich text template may be generated from the at least one target inline component.
The rich text template may contain different content in different application scenarios. For example, in some application scenarios, the rich text template only includes at least one in-target in-line component, and then the at least one in-target in-line component in the editing region may be directly saved as the rich text template. For another example, in other application scenarios, the rich text template may include other text content besides the at least one in-target-line component, where the other text content mainly refers to general text content, and the general text content may be manually input, copied, pasted, or inserted into the editing area by the user. Based on this, at least one target inline component within the edit section may be saved as a rich text template along with other text content within the edit section.
In this embodiment, the rich text template may be in a structured format or an unstructured format. Optionally, when the rich text template is generated, the structured rich text template may be generated separately, the unstructured rich text template may be generated separately, and the structured rich text template and the unstructured rich text template may also be generated simultaneously.
Taking the rich text template as an example, where the rich text template includes at least one target inline component and other text content at the same time, the name and attribute value of the component in the at least one target inline component may be saved in one array field, and the other text content may be saved in another array field, thereby obtaining the structured rich text template. In this way, dynamic modification of components within the target row is facilitated.
Taking the rich text template including at least one target inline component and other text content at the same time as an example, the at least one target inline component and other text content may be stored as a character string together, so as to obtain an unstructured rich text template.
It is worth mentioning that for rich text templates containing at least one in-target component, it is proposed to generate both structured rich text templates and unstructured rich text templates. Of course, if only one rich text template can be generated, it is preferable to consider generating a structured rich text template for the case that at least one target inline component contains an inline component that needs to be assigned a value.
In one embodiment of the present application, the rich text editor supports at least one inline component, one component icon for each inline component, and having a name, method, attribute, and event. Where the inline component has a default attribute value. To associate a component icon on an interface with an in-row component, the component icon for each in-row component may be associated with the component name and component type for that in-row component when implemented. The component types herein are largely divided into inline and non-inline components.
Based on the above, when the rich text editor is launched or enters into foreground running from the background, an editing interface comprising an editing area and component icons of at least one in-line component can be presented to the user. When the user generates the rich text template, the component icons corresponding to the in-line components required by the rich text template can be dragged into the editing area, that is, the user can send out at least one component icon dragging operation. The rich text editor may determine at least one target component icon dragged into the editing region in response to at least one component icon dragging operation; determining at least one target in-row component corresponding to at least one target component icon according to the component name and the component type respectively associated with the at least one target component icon; further, rendering the at least one in-target-line component into the editing area according to the default attribute value of the at least one in-target-line component; a rich text template is then generated from at least one target inline component within the edit region. This embodiment is relatively simple, and the target in-row component may be rendered directly based on the default attribute values of the target in-row component without modifying the attribute values of the target in-row component.
Optionally, after determining at least one target component icon dragged into the editing area, a component name and a component type respectively associated with the at least one target component icon may be obtained; then, according to the component type associated with each target component icon, determining whether the component corresponding to the target component icon is an inline component (namely, judging whether the inline component is dragged into the editing area or not); if it is determined that the component corresponding to the at least one target in-row component icon is an in-row component (i.e., it is determined that the in-row component is dragged into the editing region), the target in-row component corresponding to the at least one target component icon (i.e., it is determined that the target in-row component is dragged into the editing region) may be determined according to the component name associated with the at least one target component icon. And then, calling a rendering method corresponding to the in-target-line component dragged into the editing area, and rendering the in-target-line component into the editing area. The corresponding rendering method will be different for different intra-row elements.
In addition, inline components in embodiments of the present application have event properties and may support various events such as click events, long press events, mouse over events, double click events, and the like. These events may be associated with operations that modify the attribute values of components within a row. Based on the method, when the rich text template is generated, if the attribute value of the in-line component needs to be modified, the rich text editor can be triggered to modify the attribute value of the in-line component through a specified event.
In an alternative embodiment, the rich text editor may determine at least one target component icon dragged into the editing region in response to at least one component icon drag operation; determining at least one target intra-row component corresponding to at least one target component icon according to the component name and the component type respectively associated with the at least one target component icon; further, at least one target in-row component is rendered into the editing region according to the default attribute value of the at least one target in-row component. Before generating the rich text template, the user can modify the attribute value of any in-line component in the at least one target in-line component through a specified event, and the modified in-line component can be one or more.
For ease of description, it is assumed that the user needs to modify the attribute values of the components in the first target inline component, which is any inline component of the at least one target inline component. Then, the user may issue a specified event, such as a click event, a double click event, or a mouse-over event, etc., for the first in-target-line component within the edit region. For the rich text editor, the modifiable attribute items for the first in-target in-line component may be displayed in response to a specified event for the first in-target in-line component. In conjunction with FIG. 1b and FIG. 1c, a property area of the inline component is displayed on the editing interface, the property area displaying modifiable property items of the first target inline component.
The user may modify the modifiable attribute items of the components in the first target row. The rich text editor responds to the modification operation of the modifiable attribute items of the components in the first target row, and obtains a new attribute value of the components in the first target row; then, according to the new attribute value of the first target in-row component, re-rendering the first target in-row component into the editing area; a rich text template may then be generated from the first target in-line component re-rendered into the editing region and other non-re-rendered target in-line components.
Further optionally, after the property value of the component in the first target row is modified, the rich text editor needs to replace the default property value with a new property value, for example, write the new property value into the data-tips property of the input tag. The embodiment is relatively flexible, and allows a user to modify the attributes of the in-line components according to requirements, so that a rich text template meeting the requirements of the user is obtained.
It is noted that the modifiable attribute entries may vary according to the different types of inline components. Regardless of the type of inline component, its modifiable attribute entries may be divided into style attributes and non-style attributes. Style attributes refer to attributes that are related to the presentation style of the in-line components, and non-style attributes refer to attributes that are not related to the presentation style of the in-line components. The presentation style of the in-row components includes their size, shape, color, position, border, and the like.
Based on the above, if the modifiable attribute items of the first target inline component include a style attribute, the new attribute value of the first target inline component may include a style attribute value, based on which the style of the first target inline component may be different before and after re-rendering. For example, prior to re-rendering, the bounding box of the component in the first target row is red; after re-rendering, the bounding box of the component in the first target row is green.
It is worth mentioning that in the process of generating the rich text template, the attribute value of at least one in-target-line component required by the rich text template may be modified to meet the rich text editing requirement. In addition, after the rich text template is generated, the rich text template can be opened to edit the rich text template again, and in the process of editing the rich text template again, the attribute values of the components in at least one target line contained in the rich text template can be modified. After the rich text template is opened, at least one target in-line component contained in the rich text template is re-rendered into an editing area of an editing interface, for which, a user can send a specified event to the target in-line component needing to be modified (here, the first target in-line component is also taken as an example), and the rich text editor responds to the specified event to the first target in-line component and displays a modifiable attribute item of the first target in-line component, as shown in fig. 1b and fig. 1 c; further, responding to the modification operation of the user on the modifiable attribute items of the components in the first target row, and acquiring a new attribute value of the components in the first target row; and according to the new attribute value of the component in the first target row, re-rendering the component in the first target row into the editing area, and further completing re-editing of the rich text template.
It is worth noting that when the modifiable attribute items of the intra-first target intra-row components are modified, either during the rich text template generation process or during the re-editing process, there may be other intra-row components associated with the intra-first target intra-row components in the current rich text template or other rich text templates, and the attribute values between these inter-associated intra-row components may affect each other. For example, taking the sequence number component in the current rich text template as an example, after the border color of the sequence number in a certain position is changed, the border colors of the sequence numbers in other positions need to be adaptively modified to maintain consistency of sequence number patterns. For another example, still taking the sequence number component in the current rich text template as an example, when the hierarchy to which the sequence number of a certain position belongs changes, the hierarchy of the sequence numbers of other positions that need to belong to the same hierarchy also needs to be changed adaptively, for example, the sequence number 3.1.1 changes to the sequence number 3.1, and correspondingly, the sequence number 3.1.2 needs to change to the sequence number 3.2.
Based on the above analysis, in response to the modification operation on the modifiable attribute items of the components in the first target row, besides acquiring the new attribute value of the components in the first target row and re-rendering the components in the first target row to the editing area according to the new attribute value of the components in the first target row, the attribute values of the components in the rich text template or other rich text templates to which the components in the first target row belong and in other rows associated with the components in the first target row can be modified in association, so as to realize linkage between the components in the rows.
Taking a rich text application scenario as an example, assume that input tags are used to define the following inline components: variable components, sequence number components, reference sequence number components, picture components, link components, and the like. The meaning of each inline component and its attributes are briefly described below:
a variable component: the method is used for realizing the content which needs to be dynamically changed according to different situations in the rich text field, such as staff names, salaries and the like. Variable components may have attributes such as alias, value displayed, hidden for null, display condition, etc. Alias: the display text of the inline component with the "value of display" in the attribute as a variable is used by default, but the alias is preferentially used as the display text after the alias is filled in. The values displayed are: the value of the variable component is obtained, and the value of the parameter provided by the service end can be assigned to the variable component through the formula editor, so that the association between the variable component and the service end is established. Hiding for null: the attribute may be selected to be active or inactive, and if the attribute is inactive, the variable name is displayed by default. The display conditions are as follows: when a certain condition is met, the rendering result of the variable component is displayed in the editing area. When the display is not in stand, the following display is displayed: when the 'display condition' is not satisfied, the rendering result of the variable component is displayed in the editing area, and vice versa when the 'display condition' is satisfied.
Sequence number component: for adding a sequence number to the content in the rich text field. The sequence number component may have attributes of grouping, hierarchy, format, capitalization, reference names, display conditions, and the like. Grouping: the grouping to which the serial numbers belong may be defined, and multiple serial numbers may be set to the same group, so that the serial numbers may be linked, for example, when a certain serial number is clicked, all the serial numbers in the group may be highlighted at the same time. And (3) hierarchy: a hierarchy of ordinal numbers is defined, e.g., hierarchy 1, ordinal number shown as 1, hierarchy 2, ordinal number shown as 1.1, etc. The format is as follows: the format of the serial number is limited, for example, the serial number can be in the format of arabic numerals, roman numerals, english serial numbers, and the like. Capital letters: the device is used for limiting the case of the serial number under the condition of selecting the English serial number; if the capital property of the letter is activated, the sequence number can adopt the capital letter, such as A, A.B and the like; if the letter capital attribute is not activated, the sequence number will be in lower case, e.g., a, a.b, etc. Reference name: the serial number is the unique identifier of the serial number and is mainly used for being associated with a reference serial number component. The display conditions are as follows: when the set conditions are met, the rendering result of the serial number component is displayed in the editing area.
Reference sequence number component: associated with the sequence number component is a reference to the sequence number in the sequence number component. For example, 1.1 in "section 1.1" is a serial number, and "section 1.1 as described above" is a reference number. The reference sequence number is disassociated from the referenced sequence number according to the reference name, and the rendering result of the reference sequence number is displayed as the value of the referenced sequence number. The reference number component may have attributes such as reference name, display condition, etc. Reference name: for association with a referenced sequence number is the reference name of the referenced sequence number.
A picture assembly: for adding pictures in the rich text field, it will also have some attributes of its own, such as picture format, size, etc. A linking component: for adding links in the rich text field, it will also have some properties of its own, such as the format of the link address, etc.
On the basis of the in-line components, when the rich text editor is started, a style of an editing interface provided for a user is shown in fig. 2 a. As shown in fig. 2a, the editing interface includes: a basic tools area, an editing area, a component area, and an attribute area. The basic tool area is positioned at the top of the editing interface and mainly comprises basic text editing tools such as fonts, word sizes, line heights, indentation and the like. The middle part of the editing interface is an editing area, the left side of the editing area is a component area, and the right side of the editing area is a property area. As shown in FIG. 2a, in this embodiment, the component area includes block-level components and inline components, and the block-level components refer to components defining text formats, mainly including containers, tables, rich text, page breaks, and the like; the inline component is a text content, and mainly comprises icons such as a variable component, a sequence number component, a reference sequence number component, a picture component, a link component and the like. The property area primarily shows modifiable property items for in-row components that the user needs to modify. In fig. 2a, taking the intra-row component that the user needs to modify as an example, the attribute area shows the alias of the variable component, the hidden option as empty, the displayed content, the display condition, and other attribute items.
To generate a recruitment offer template, the user may select a component icon for a desired intra-row component from the left intra-row components and drag it into the edit area. As shown in FIG. 2b, assuming that the user drags an icon of a variable component into the editing area, the rich text editor determines that the inline component corresponding to the component icon dragged into the editing area is a variable component, and then invokes a rendering method of the variable component to render the variable component into the editing area, the variable component including the employee name. Then, as shown in fig. 2b, assuming that the user drags an icon of another variable component into the editing area, the rich text editor determines that the inline component corresponding to the icon of the component dragged into the editing area is a variable component, and then calls a rendering method of the variable component to render the variable component into the editing area, wherein the variable component comprises the english name of the sign-up company. Then, assuming that the user drags the icon of the sequence number component into the editing area, the rich text editor determines that the inline component corresponding to the component icon dragged into the editing area is the sequence number component, and then calls a rendering method of the sequence number component to render the sequence number component into the editing area, wherein the variable component comprises a sequence number 1: x, sequence number 2: XX, serial No. 3: x, and the like. The following of these serial numbers are some common text contents, which are contents with common properties, such as job description, company system, and privacy principle. During this time, the user can modify the property values of the sequence number components through the property area on the right side of the editing interface shown in FIG. 2 b. As shown in FIG. 2b, the property items of the sequence number component, such as grouping, hierarchy, format, reference name, etc., can be modified through the property area on the right.
After the inline components and other common text contents required by the offer template are all input into the editing area and the attribute values of the inline components are adjusted, the inline components and other common text contents in the editing area can be respectively stored into different array fields, and the structured offer template is obtained.
After the rich text template is generated, the rich text template can be externally published so as to be convenient for the service end to use the rich text template. For example, a recruitment offer template can be published to a personnel part of a company, so that colleagues in the personnel department can directly call the recruitment offer template to quickly generate different offer documents for different application personnel. In order to facilitate the service end to use the rich text template, after the rich text template is generated, a name or an ID and other identifiers can be allocated to the rich text template, and when the rich text template is issued to the outside, information such as the identifier, the brief introduction and the participation of the rich text template can be issued.
As can be seen from the above examples, when a user edits a rich text template (e.g., offer template, mail template), it is often necessary to have some dynamic variables in the components, such as person name, age, etc., which are different from person to person. Or article numbers, the numbers often need to be changed dynamically when the user modifies the sequence of chapters. In the embodiment of the application, the problem can be easily solved by utilizing the characteristic that the value and/or the style of the inline component can be dynamically changed; in addition, some complex logics such as style change, linkage, dynamic data acquisition and the like can be processed through the attributes, methods and events of the in-line components, so that rich text editing modes are greatly enriched, and the flexibility is improved.
Based on the generated rich text template, the exemplary embodiment of the present application provides another rich text processing method, which mainly describes a process of generating rich text based on the rich text template. As shown in fig. 3, the method mainly includes the following steps:
301. and receiving the rich text template identification sent by the service end.
302. And determining a target rich text template from at least one rich text template according to the rich text template identification.
303. And obtaining the rich text required by the service end according to the target rich text template.
304. And sending the rich text to the service end for the service end to use.
In this embodiment, the service end refers to a computer device that needs to generate a rich text by using a rich text template, and the computer device may be a mobile phone, a PC, or the like. When a rich text template needs to be used, a rich text template identification can be sent to the rich text editor, and the rich text template identification represents the rich text template required by the service end. Optionally, in this embodiment, the at least one rich text template may be generated in advance based on the at least one in-line component. At least one inline component belongs to the text content in the rich text field, and the value and/or style thereof can be dynamically changed, and the detailed description thereof can be referred to the foregoing embodiments.
After receiving the rich text template identifier sent by the service end, the rich text editor can determine a target rich text template from at least one rich text template according to the rich text template identifier; then obtaining a rich text required by the service end according to the target rich text template; and sending the rich text to the service end for the service end to use. The process of generating the rich text is relatively simple and efficient no matter the service end or the rich text editor.
In an alternative embodiment, the format of the rich text template may not be the same as that of the target rich text template in consideration of the rich text format supported by the service terminal. Based on the method, the rich text editor can render the target rich text template into the rich text according to the rich text format supported by the service end. For example, the target rich text template is rendered into an HTML document or a PDF document, etc.
In some alternative embodiments, the target rich text template does not require incoming parameters. In this case, after determining the target rich text template, the rich text editor may render the target rich text template into the rich text directly according to a rich text format supported by the service end.
In other alternative embodiments, the target rich text template requires incoming parameters, e.g., the target rich text template contains a variant component. In this case, the rich text editor will also receive the rich text template parameters sent by the service end, and the rich text template parameters include parameter names and parameter values. The parameter name here has a corresponding relationship with the name of the component in the row in the target rich text template, for example, the parameter name is the name of the component in the row. Then, the rich text editor can determine inline components to be assigned in the target rich text template according to the parameter names of the rich text template in the parameters; and then, according to the parameter values in the rich text template parameters, assigning the in-line components to be assigned. For example, take the recruitment 0ffer template as an example, assign the employee name and assign the company name. And then, the rich text editor can render the assigned target rich text template into a rich text according to a rich text format supported by the service end.
It should be noted that, the executing subjects of the steps of the method provided in the foregoing embodiments may be the same device, or different devices may also be used as the executing subjects of the method. For example, the execution subjects of steps 101 to 104 may be device a; for another example, the execution subject of steps 101 and 103 may be device a, and the execution subject of step 104 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations occurring in a specific order are included, but it should be clearly understood that these operations may be executed out of order or in parallel as they appear herein, and the sequence numbers of the operations, such as 101, 102, etc., are used merely to distinguish various operations, and the sequence numbers themselves do not represent any execution order. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit the types of "first" and "second".
Fig. 4 is a schematic structural diagram of an apparatus 400 provided in an exemplary embodiment of the present application. As shown in fig. 4, the apparatus 400 includes: memory 41, processor 42, and communication component 43.
A memory 41 for storing the computer program and may be configured to store other various data to support operations on the device. Examples of such data include instructions for any application or method operating on the device, contact data, phonebook data, messages, pictures, videos, and so forth.
And the communication component 43 is configured to receive the rich text template identifier sent by the service end.
A processor 42, coupled to the memory 41, for executing the computer program in the memory 41, for: determining a target rich text template from at least one rich text template according to the rich text template identification; and obtaining the rich text required by the service end according to the target rich text template.
The communication component 43 is further configured to send the rich text to the service end for use by the service end.
Optionally, when obtaining the rich text required by the service end according to the target rich text template, the processor 42 is specifically configured to: and rendering the target rich text template into a rich text according to a rich text format supported by the service end.
Further optionally, the communication component 43 is further configured to receive a rich text template entry sent by the service end, where the rich text template entry includes a parameter name and a parameter value. Based thereon, processor 42 is further configured to: before the target rich text template is rendered into a rich text, determining in-line components to be assigned in the target rich text template according to parameter names of the rich text template in parameters; and assigning the inline components to be assigned according to the parameter values in the rich text template parameters.
Further optionally, the processor 42 is further configured to: generating at least one rich text template based on the at least one inline component; at least one inline component belongs to the text content in the rich text field, and the value and/or the style of the inline component can be dynamically changed. For a process of generating at least one rich text template based on at least one inline component, reference may be made to the description in the foregoing embodiments, and details are not repeated here.
Further, as shown in fig. 4, the apparatus 400 further includes: a display 44, a power supply component 45, an audio component 46, and the like. Only some of the components are schematically shown in fig. 4, and it is not meant that the apparatus 400 includes only the components shown in fig. 4.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program can implement the steps in the method embodiment described above and illustrated by fig. 3 when executed.
Fig. 5 is a schematic structural diagram of an apparatus 500 according to an exemplary embodiment of the present application. As shown in fig. 5, the apparatus 500 includes: memory 51, processor 52 and display 53.
The memory 51 is used to store computer programs and may be configured to store other various data to support operations on the device. Examples of such data include instructions for any application or method operating on the device, contact data, phonebook data, messages, pictures, videos, and the like.
A processor 52 coupled to the memory 51 for executing the computer program in the memory 51 for:
presenting, via the display 53, an editing interface comprising an editing area and component icons for at least one in-row component;
in response to at least one component icon drag-in operation, determining at least one target component icon dragged into the editing area;
rendering at least one target in-row component corresponding to at least one target component icon into the editing area;
generating a rich text template according to at least one target inline component in the editing area; at least one inline component belongs to the text content in the rich text field, and the value and/or the style of the inline component can be dynamically changed.
Optionally, when rendering at least one in-target-row component corresponding to at least one target component icon into the editing region, the processor 52 is specifically configured to: determining at least one target in-row component according to the component name and the component type respectively associated with the at least one target component icon; rendering at least one target in-row component into the editing zone according to the default attribute value of the at least one target in-row component.
Further, the processor 52 is further configured to display, via the display 53, modifiable attribute items of the components in the first target row in response to a specified event for the components in the first target row, before generating the rich text template from the at least one component in the target row in the editing area, or during re-editing the rich text template after generating the rich text template; responding to the modification operation of the modifiable attribute items of the components in the first target row, and acquiring a new attribute value of the components in the first target row; re-rendering the components in the first target row into the editing area according to the new attribute values of the components in the first target row; wherein the first target inline component is any inline component of the at least one target inline component.
Further, processor 52 is also configured to replace the default attribute value of the component in the first target row with the new attribute value.
Optionally, if the new attribute value of the first target inline component includes a style attribute value, the style of the first target inline component before and after re-rendering is different.
Further, the processor 52 is configured to perform an associated modification on the property values of the other in-line components associated with the first target in-line component in the rich text template or other rich text templates in response to a modification operation on the modifiable property items of the first target in-line component.
Optionally, when determining the at least one target intra-row component according to the component name and the component type respectively associated with the at least one target component icon, the processor 52 is specifically configured to: determining whether the component corresponding to the at least one target component icon is an in-row component or not according to the component type respectively associated with the at least one target component icon; and if the component corresponding to the at least one target component icon is the in-line component, determining the target in-line component corresponding to the at least one target component icon according to the component name associated with the at least one target component icon.
Optionally, when the processor 52 generates the rich text template according to at least one target inline component in the editing region, it is specifically configured to: at least one target inline component within the edit section is saved as a rich text template along with other text content within the edit section.
Further, when saving the at least one target in-line component in the edit section together with other text content in the edit section as a rich text template, the processor 52 is specifically configured to:
storing the name and the attribute value of the component in at least one target line into an array field, and storing other text contents into another array field to obtain a structured rich text template;
and/or
And storing the at least one target inline component and other text contents as character strings to obtain the unstructured rich text template.
Optionally, the processor 52, before presenting the editing interface through the display 53, is further configured to: and defining the name and the attribute of the at least one inline component by using the HTML tag, and realizing the method and the event of the at least one inline component based on the name and the attribute of the at least one inline component to obtain the at least one inline component.
For example, processor 52 may define at least one in-row component name and attribute using an input tag or div tag.
Optionally, the at least one inline component comprises: at least one of a variable component, a sequence number component, a reference sequence number component, a picture component, and a link component.
Further, as shown in fig. 5, the apparatus 500 further includes: communication components 54, power components 55, audio components 56, and the like. Only some of the components are schematically shown in fig. 5, and the apparatus 500 is not meant to include only the components shown in fig. 5.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program can implement the steps in the method embodiment described above and illustrated by fig. 1 a.
In addition to providing the above apparatus, method, and storage medium, an embodiment of the present application further provides a rich text editor, where the rich text editor includes: an editing interface comprising an editing area and component icons for at least one in-row component. Wherein the editing interface is configured to determine at least one target component icon dragged into the editing region in response to at least one component icon dragging operation; rendering at least one target in-row component corresponding to the at least one target component icon into the editing area; generating a rich text template according to at least one target inline component in the editing area; at least one inline component belongs to the text content in the rich text field, and the value and/or the style of the inline component can be dynamically changed.
In addition to the above operations, the editing interface may also perform other operations in the rich text template generating process, and the other operations may refer to the description of the foregoing embodiment and are not described herein again.
The memories of fig. 4 and 5 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The communication components of fig. 4 and 5 described above are configured to facilitate wired or wireless communication between the device in which the communication component is located and other devices. The device in which the communication component is located may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component may further include a Near Field Communication (NFC) module, radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and the like.
The display screens in fig. 4 and 5 described above include screens, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The power supply components of fig. 4 and 5 described above provide power to the various components of the device in which the power supply components are located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The audio components of fig. 4 and 5 described above may be configured to output and/or input audio signals. For example, the audio component includes a Microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or apparatus comprising the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (21)

1. A rich text processing method, comprising:
receiving a rich text template identifier sent by a service end;
determining a target rich text template from at least one rich text template according to the rich text template identification, wherein the at least one rich text template is generated according to at least one inline component, the inline component belongs to text content in a rich text field, and attributes, methods and events exist in the inline component, so that the value and/or the style of the inline component can be dynamically changed;
obtaining a rich text required by the service end according to the target rich text template;
and sending the rich text to the service end for the service end to use.
2. The method according to claim 1, wherein obtaining the rich text required by the service end according to the target rich text template comprises:
and rendering the target rich text template into the rich text according to the rich text format supported by the service end.
3. The method according to claim 2, before rendering the target rich text template into the rich text according to the rich text format supported by the service end, further comprising:
receiving rich text template access parameters sent by the service end, wherein the rich text template access parameters comprise parameter names and parameter values;
determining in-line components to be assigned in the target rich text template according to parameter names of the rich text template in the parameters;
and assigning the in-line components to be assigned according to the parameter values in the rich text template parameters.
4. The method according to any one of claims 1-3, further comprising, before receiving the rich text template identifier sent by the service end:
generating the at least one rich text template based on at least one inline component.
5. A rich text processing method, comprising:
displaying an editing interface, wherein the editing interface comprises an editing area and at least one component icon of an in-row component;
determining at least one target component icon dragged into the editing area in response to at least one component icon dragging operation;
rendering at least one target in-row component corresponding to the at least one target component icon into the editing area;
generating a rich text template according to at least one target inline component in the editing area; wherein the at least one inline component belongs to text content in a rich text domain, and the inline component has properties, methods and events, so that values and/or styles of the inline component can be dynamically changed.
6. The method of claim 5, wherein rendering at least one in-target component corresponding to the at least one target component icon into the edit section comprises:
determining the at least one target in-row component according to the component name and the component type respectively associated with the at least one target component icon;
rendering the at least one target in-row component into the edit region according to a default attribute value of the at least one target in-row component.
7. The method of claim 6, wherein before generating a rich text template from at least one target inline component within the editing region, or during re-editing the rich text template after generating the rich text template, the method further comprises:
displaying modifiable attribute items of a first target in-row component in response to a specified event for the first target in-row component;
in response to a modification operation on a modifiable attribute item of a component in the first target row, acquiring a new attribute value of the component in the first target row;
re-rendering the first target inline components into the editing region according to the new attribute values of the first target inline components; wherein the first target inline component is any of the at least one target inline component.
8. The method of claim 7, further comprising:
replacing the default attribute values of the components in the first target row with new attribute values.
9. The method of claim 7, wherein the style of the first target inline component before and after re-rendering is different if the new attribute value of the first target inline component comprises a style attribute value.
10. The method of claim 7, further comprising:
in response to a modification operation on a modifiable attribute item of the first target inline component, an associated modification is made to an attribute value of another inline component of the rich text template or another rich text template associated with the first target inline component.
11. The method of claim 6, wherein determining the at least one target in-row component according to the component name and the component type associated with each of the at least one target component icon comprises:
determining whether the component corresponding to the at least one target component icon is an in-row component according to the component type respectively associated with the at least one target component icon;
and if the component corresponding to the at least one target component icon is an in-line component, determining the target in-line component corresponding to the at least one target component icon according to the component name associated with the at least one target component icon.
12. The method of any of claims 5-11, wherein generating a rich text template from at least one target inline component within the edit region comprises:
saving at least one target inline component within the edit section along with other text content within the edit section as the rich text template.
13. The method of claim 12, wherein saving at least one target inline component within the edit section along with other text content within the edit section as the rich text template comprises:
storing the name and the attribute value of the component in the at least one target line into an array field, and storing the other text contents into another array field to obtain a structured rich text template;
and/or
And saving the at least one target inline component and the other text content as character strings to obtain an unstructured rich text template.
14. The method according to any one of claims 5-11, prior to presenting the editing interface, further comprising:
defining the name and the attribute of the at least one inline component by using an HTML tag, and realizing the method and the event of the at least one inline component based on the name and the attribute of the at least one inline component to obtain the at least one inline component.
15. The method of claim 14, wherein defining the name and attributes of the at least one inline component using HTML tags comprises:
defining the name and the attribute of the at least one inline component by using an input tag or a div tag.
16. The method of any of claims 5-11, wherein the at least one in-row component comprises: at least one of a variable component, a sequence number component, a reference sequence number component, a picture component, and a link component.
17. An apparatus, comprising: a memory, a processor, and a communications component;
the communication component is used for receiving the rich text template identification sent by the service end;
the memory for storing a computer program;
the processor to execute the computer program to:
determining a target rich text template from at least one rich text template according to the rich text template identification, wherein the at least one rich text template is generated according to at least one inline component, the inline component belongs to text content in a rich text domain, and attributes, methods and events exist in the inline component, so that the value and/or the style of the inline component can be dynamically changed;
obtaining a rich text required by the service end according to the target rich text template;
the communication component is further configured to send the rich text to the service end for use by the service end.
18. An apparatus, comprising: the device comprises a memory, a processor and a display screen;
the memory for storing a computer program;
the processor to execute the computer program to:
displaying an editing interface through the display screen, wherein the editing interface comprises an editing area and component icons of at least one in-row component;
determining at least one target component icon dragged into the editing area in response to at least one component icon dragging operation;
rendering at least one target in-row component corresponding to the at least one target component icon into the editing area;
generating a rich text template according to at least one target inline component in the editing area; wherein the at least one inline component belongs to text content in a rich text field, and the inline component has properties, methods, and events, such that values and/or styles of the inline component can be dynamically changed.
19. A rich text editor, comprising: an editing interface comprising an editing area and component icons for at least one in-row component;
the editing interface is configured to determine at least one target component icon dragged into the editing region in response to at least one component icon dragging operation;
rendering at least one target in-row component corresponding to the at least one target component icon into the editing area;
generating a rich text template according to at least one target in-line component in the editing area; wherein the at least one inline component belongs to text content in a rich text domain, and the inline component has properties, methods and events, so that values and/or styles of the inline component can be dynamically changed.
20. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 4.
21. A computer-readable storage medium storing a computer program for implementing the steps of the method according to any one of claims 5-15 when the computer program is executed by a processor.
CN201811459641.8A 2018-11-30 2018-11-30 Rich text processing method, editor, equipment and storage medium Active CN111259644B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811459641.8A CN111259644B (en) 2018-11-30 2018-11-30 Rich text processing method, editor, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811459641.8A CN111259644B (en) 2018-11-30 2018-11-30 Rich text processing method, editor, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111259644A CN111259644A (en) 2020-06-09
CN111259644B true CN111259644B (en) 2023-04-14

Family

ID=70948425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811459641.8A Active CN111259644B (en) 2018-11-30 2018-11-30 Rich text processing method, editor, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111259644B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708535A (en) * 2020-06-17 2020-09-25 网易(杭州)网络有限公司 Image-text display control method and device and electronic equipment
CN111914528B (en) * 2020-06-19 2024-02-23 北京百度网讯科技有限公司 Content editing method, method for generating editor, device, equipment and medium thereof
CN112001153B (en) * 2020-08-12 2024-05-17 腾讯科技(深圳)有限公司 Text processing method, device, computer equipment and storage medium
CN112653584A (en) * 2020-12-22 2021-04-13 杭州东方通信软件技术有限公司 5G message arranging method and arranging tool box based on component capability
CN112861481B (en) * 2021-01-29 2024-01-30 北京尚医智信健康管理有限公司 Paging processing method, paging processing device, electronic equipment and computer readable storage medium
CN113190314B (en) * 2021-04-29 2023-08-18 北京有竹居网络技术有限公司 Interactive content generation method and device, storage medium and electronic equipment
CN113779952B (en) * 2021-09-28 2024-03-01 北京字跳网络技术有限公司 Text processing method and device and electronic equipment
CN115309298B (en) * 2022-08-30 2024-05-10 医渡云(北京)技术有限公司 Text structuring method and device based on rich text editor, medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915328A (en) * 2012-09-04 2013-02-06 新浪网技术(中国)有限公司 Method for editing rich text and rich text editor
CN106897251A (en) * 2016-07-01 2017-06-27 阿里巴巴集团控股有限公司 Rich text methods of exhibiting and device
CN107656941A (en) * 2016-07-26 2018-02-02 阿里巴巴集团控股有限公司 Document analysis method, apparatus and editor
CN108874379A (en) * 2017-05-10 2018-11-23 北京国双科技有限公司 The processing method and processing device of the page

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100996682B1 (en) * 2007-11-30 2010-11-25 주식회사 모션클라우드 Rich Content Creation System and Method Thereof, and Media That Can Record Computer Program for Method Thereof
US10204077B2 (en) * 2015-09-21 2019-02-12 Facebook, Inc. Rich text editor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915328A (en) * 2012-09-04 2013-02-06 新浪网技术(中国)有限公司 Method for editing rich text and rich text editor
CN106897251A (en) * 2016-07-01 2017-06-27 阿里巴巴集团控股有限公司 Rich text methods of exhibiting and device
CN107656941A (en) * 2016-07-26 2018-02-02 阿里巴巴集团控股有限公司 Document analysis method, apparatus and editor
CN108874379A (en) * 2017-05-10 2018-11-23 北京国双科技有限公司 The processing method and processing device of the page

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Bruno Dumas等."A graphical editor for the SMUIML multimodal user interaction description language".《Science of Computer Programming》.2014,第86卷第30-42页. *
郑斌等."在线富文本公式编辑器的设计与实现".《计算机工程》.2011,第37卷(第18期),第287-289页. *

Also Published As

Publication number Publication date
CN111259644A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111259644B (en) Rich text processing method, editor, equipment and storage medium
CN104267947B (en) A kind of editor's method of pop-up picture and pop-up picture editor's device
KR101733943B1 (en) Hierarchically-organized control galleries
CN105867931B (en) The variation and device at information displaying interface
US9418336B2 (en) Automatic recognition and insights of data
US20140047308A1 (en) Providing note based annotation of content in e-reader
US20060225094A1 (en) Enabling customization and personalization of views in content aggregation frameworks
US20130346843A1 (en) Displaying documents based on author preferences
TW201447731A (en) Ink to text representation conversion
CN105094832A (en) WYSIWYG method and system for dynamically generating user interface
CN109614601A (en) Form processing method, device, equipment and readable medium based on web
US20140331179A1 (en) Automated Presentation of Visualized Data
CN113238741A (en) Form configuration method and device, electronic equipment and storage medium
CN104915186B (en) A kind of method and apparatus making the page
US20150178259A1 (en) Annotation hint display
JP2016503199A (en) Preserve content area layout during modification
CN106708506A (en) Method and device for optimizing starting speed of Android applications visually
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN112068911A (en) Method, device, system, equipment and medium for generating electronic form
CN107562710B (en) Chart processing device and method
CN105718434A (en) Natural language formula editing method and system
US9223766B2 (en) Preserving formatting of content selection through snippets
CN114547515A (en) Page generation method, system, device, equipment and storage medium
CN109446295B (en) Svg data map editing tool, editing method and computer readable medium
KR100856132B1 (en) System for managing web subjects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant