[go: up one dir, main page]

CN111913703B - Object editing method, device, electronic equipment and readable storage medium - Google Patents

Object editing method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111913703B
CN111913703B CN201910376780.2A CN201910376780A CN111913703B CN 111913703 B CN111913703 B CN 111913703B CN 201910376780 A CN201910376780 A CN 201910376780A CN 111913703 B CN111913703 B CN 111913703B
Authority
CN
China
Prior art keywords
code
editor
original
converting
picture
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
CN201910376780.2A
Other languages
Chinese (zh)
Other versions
CN111913703A (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 CN201910376780.2A priority Critical patent/CN111913703B/en
Publication of CN111913703A publication Critical patent/CN111913703A/en
Application granted granted Critical
Publication of CN111913703B publication Critical patent/CN111913703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the disclosure discloses an object editing method, an object editing device, electronic equipment and a readable storage medium, wherein the method comprises the steps of acquiring first codes of a first object edited by a first editor, converting the first codes into second codes of a second object corresponding to the first object, and generating the second object by a second editor different from the first editor based on the second codes. According to the technical scheme, the second object can be generated through the second editor based on the first object edited by the first editor, so that the problems of format loss, abnormal display and the like caused by using different editors in the object editing process can be effectively avoided, the complexity of object editing is reduced, and the editing efficiency is improved.

Description

Object editing method, device, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to an object editing method, an object editing device, electronic equipment and a readable storage medium.
Background
In the process of web page developers using web page editors to create and edit web pages, it is sometimes necessary to copy content from other editors into the currently used editors.
In the process of presenting the present disclosure, the inventors found that different editors are prone to problems such as format loss when the same code is copied between different editors due to different host environments, different resolution complexity, and the like. In addition, for different devices, operating systems or browsers, the same code may have different interpretations, so that different display effects may be provided, the difficulty and complexity of page editing are increased, and the editing efficiency is reduced.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present disclosure provide an object editing method, apparatus, electronic device, and readable storage medium.
In a first aspect, an embodiment of the present disclosure provides an object editing method.
Specifically, the object editing method includes:
acquiring a first code of a first object edited by a first editor;
converting the first code into a second code of a second object corresponding to the first object;
the second object is generated by a second editor different from the first editor based on the second code.
With reference to the first aspect, in a first implementation manner of the first aspect, the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the first aspect, in a second implementation manner of the first aspect, the first code and the second code are hypertext markup language codes.
With reference to the first aspect, in a third implementation manner of the first aspect, the first object is a table object, and the second object is a picture object corresponding to the table object.
With reference to the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the first object and the second object have the same style; or alternatively
The first object and the second object have different styles.
With reference to the first aspect, in a fifth implementation manner of the first aspect, the obtaining the first code of the first object edited by the first editor includes:
acquiring original codes of the first object in response to the first editor executing the operation of selecting or copying the first object;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
With reference to the first aspect, in a sixth implementation manner of the first aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
With reference to the first aspect, in a seventh implementation manner of the first aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
With reference to the seventh implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the identifying the first object represented by the first code includes identifying a table described by a code for representing the table in a hypertext markup language document;
The determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
In a second aspect, an embodiment of the present disclosure provides an object editing apparatus, including:
acquiring a first code of a first object edited by a first editor;
converting the first code into a second code of a second object corresponding to the first object;
the second object is generated by a second editor different from the first editor based on the second code.
With reference to the second aspect, in a first implementation manner of the second aspect, the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the second aspect, in a second implementation manner of the second aspect, the first code and the second code are hypertext markup language codes.
With reference to the second aspect, in a third implementation manner of the second aspect, the first object is a table object, and the second object is a picture object corresponding to the table object.
With reference to the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the first object and the second object have the same style; or alternatively
The first object and the second object have different styles.
With reference to the second aspect, in a fifth implementation manner of the second aspect, the obtaining the first code of the first object edited by the first editor includes:
acquiring original codes of the first object in response to the first editor executing the operation of selecting or copying the first object;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
With reference to the second aspect, in a sixth implementation manner of the second aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
With reference to the second aspect, in a seventh implementation manner of the second aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
With reference to the seventh implementation manner of the second aspect, in an eighth implementation manner of the second aspect, the identifying the first object represented by the first code includes identifying a form described by a code for representing the form in a hypertext markup language document;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
In a third aspect, an embodiment of the present disclosure provides an electronic device comprising a memory and a processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the method steps of:
acquiring a first code of a first object edited by a first editor;
converting the first code into a second code of a second object corresponding to the first object;
the second object is generated by a second editor different from the first editor based on the second code.
With reference to the third aspect, in a first implementation manner of the third aspect, the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the third aspect, in a second implementation manner of the third aspect, the first code and the second code are hypertext markup language codes.
With reference to the third aspect, in a third implementation manner of the third aspect, the first object is a table object, and the second object is a picture object corresponding to the table object.
With reference to the third implementation manner of the third aspect, in a fourth implementation manner of the third aspect, the first object and the second object have the same style; or alternatively
The first object and the second object have different styles.
With reference to the third aspect, in a fifth implementation manner of the third aspect, the obtaining the first code of the first object edited by the first editor includes:
acquiring original codes of the first object in response to the first editor executing the operation of selecting or copying the first object;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
With reference to the third aspect, in a sixth implementation manner of the third aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
With reference to the third aspect, in a seventh implementation manner of the third aspect, the converting the first code into a second code of a second object corresponding to the first object includes:
identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
With reference to the seventh implementation manner of the third aspect, in an eighth implementation manner of the third aspect, the identifying the first object represented by the first code includes identifying a table described by a code for representing the table in a hypertext markup language document;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
In a fourth aspect, in an embodiment of the present disclosure, there is provided a readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a method according to any one of the first aspect, the first implementation manner to the eighth implementation manner of the first aspect.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the technical scheme provided by the embodiment of the disclosure, the second object corresponding to the first object can be generated through the second editor based on the first object edited by the first editor, so that the problems of format loss, abnormal display and the like caused by using different editors in the object editing process can be effectively avoided, the complexity of object editing is reduced, and the editing efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
Other objects, purposes and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 illustrates a flow chart of an object editing method according to an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of acquiring a first code according to an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of acquiring a second code according to an embodiment of the present disclosure;
FIGS. 4A-4D illustrate an exemplary process of an object editing method according to embodiments of the present disclosure;
FIG. 5 shows a block diagram of an object editing apparatus according to an embodiment of the present disclosure;
Fig. 6 shows a block diagram of an electronic device according to an embodiment of the disclosure;
fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an object editing method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, portions irrelevant to description of the exemplary embodiments are omitted in the drawings.
In this disclosure, it should be understood that terms such as "comprises" or "comprising," etc., are intended to indicate the presence of features, numbers, steps, acts, components, portions, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, acts, components, portions, or combinations thereof are present or added.
In addition, it should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
As mentioned above, different editors are easy to cause format loss and other problems when the same code is converted in different editors due to different host environments, analysis complexity and other reasons. In addition, for different devices or browsers, the same code may be interpreted incompletely, so that different display effects may be achieved, the difficulty and complexity of page editing are increased, and the editing efficiency is reduced.
In view of the above-mentioned drawbacks, the technical solution provided by the embodiments of the present disclosure obtains a first code of a first object edited by a first editor, converts the first code into a second code of a second object corresponding to the first object, and generates the second object by a second editor different from the first editor based on the second code. According to the technical scheme, the first object edited by the first editor can be based, the second object corresponding to the first object is generated by the second editor, and the problems of format loss, abnormal display and the like caused by using different editors in the object editing process can be effectively avoided, so that the complexity of object editing is reduced, and the editing efficiency is improved.
Fig. 1 illustrates a flowchart of an object editing method according to an embodiment of the present disclosure.
As shown in fig. 1, the object editing method includes the following steps S101 to S103.
In step S101, a first code of a first object edited by a first editor is acquired.
In step S102, the first code is converted into a second code of a second object corresponding to the first object.
In step S103, the second object is generated by a second editor different from the first editor, based on the second code.
According to an embodiment of the present disclosure, it is assumed that there are a plurality of editors E1, E2, … …, en, n.gtoreq.2, and the first and second editors may be any two different editors among the plurality of editors. For example, in the object editing process, a first code of a first object edited by the first editor E1 may be acquired, then the first code may be converted into a second code of a second object corresponding to the first object, and then the second object corresponding to the first object may be generated by the second editor E2.
According to an embodiment of the present disclosure, the first editor is any one of the following: word processing software, spreadsheet software, web page editing software. According to an embodiment of the present disclosure, the second editor is web page editing software.
According to an embodiment of the present disclosure, the web page editing software may be any software for editing a web page, for example, adobe Dreamweaver, microsoft Expression Web, coffeeCup, notepad, synWrite, plainEdit, jEdit, subtime Text, braicks, aptna Studio, etc., which is not particularly limited in this disclosure.
According to the embodiment of the disclosure, the second object corresponding to the first object can be generated through the second editor based on the first object edited by the first editor, so that the complexity of editing the object by using different editors can be effectively reduced, and the editing efficiency is improved.
According to an embodiment of the present disclosure, the first object is of a different type than the second object. For example, the first object is a table object, and the second object is a picture object corresponding to the table object.
According to an embodiment of the present disclosure, the first object and the second object have the same style, which may mean that the first object and the second object have the same appearance when displayed.
According to an embodiment of the present disclosure, the first object corresponds to the second object and may have the same style. For example, the first object edited by the first editor E1 is a table object T, and the second object generated by the second editor E2 based on the second code is a picture object P, where the picture object P may be a picture of the table object T and has the same appearance as the table object T. Therefore, when the object editing is carried out in a plurality of editors, the consistency of the edited object can be better maintained, and the problems of format loss, abnormal display and the like are avoided, so that the complexity of object editing is reduced, and the editing efficiency is improved.
According to embodiments of the present disclosure, the first object and the second object have different styles, which may mean that the second object and the first object have different appearances when displayed.
According to embodiments of the present disclosure, the first object corresponds to the second object and may have different styles, in particular, the styles may include one or more of color, line, font, size, etc. For example, the picture object P may be a picture of the table object T after changing one or more attributes of color, line, font, size, etc. According to the embodiment of the disclosure, when the first object (e.g., the table object T) is converted into the second object (e.g., the picture object P), the second object may be automatically set to a desired style, such as a preset style or a style consistent with a web page being edited by the second editor, thereby improving the automation degree of web page editing and significantly reducing the workload of a developer.
Fig. 2 illustrates a flow chart of acquiring a first code according to an embodiment of the present disclosure.
As shown in fig. 2, the acquiring the first code of the first object edited by the first editor (step S101) includes the following steps S201 to S202.
In step S201, in response to an operation of selecting or copying the first object performed by the first editor, an original code of the first object is acquired.
In step S202, the original code is converted into the first code, and the original code and the first code are codes of different document formats.
According to an embodiment of the present disclosure, the document format refers to a specific encoding manner of information used by an electronic device for storing information. The original code of the first object (e.g., the table object T) is a code for describing the table object T in the first editor, and a document format of the original code is determined by the first editor. For example, when the first editor is word processor (e.g., word), the original code is in a word document format; when the first editor is electronic form software (e.g., excel), the original code is the code in the format of an excel document; when the first editor is other web page editing software (e.g., javaScript editor), the original code is the code of the document format used by the other web page editing software.
In order to copy the first object from the first editor to the second editor, the original code of the first object may be converted into a first code belonging to a different file format than the original code. According to an embodiment of the present disclosure, the first code may be a code that the second editor can recognize and process. The second editor may convert the first code to obtain a second code for the second object. The first code and the second code may be codes of the same document format. For example, the first code and the second code are hypertext markup language codes, and the hypertext markup language (HyperText Markup Language, HTML) is a language commonly used by web page editing software for describing web pages. After obtaining the second code that the second editor can recognize and process, the second object can be generated by the second editor.
According to an embodiment of the disclosure, the converting the first code into a second code of a second object corresponding to the first object includes converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor.
According to an embodiment of the present disclosure, after a first code of the first object is acquired, the first code is converted into a second code in a second editor in response to a paste operation performed by the second editor, so that the second editor can generate a second object corresponding to the first object based on the second code.
According to an embodiment of the present disclosure, the converting the first code into the second code of the second object corresponding to the first object includes converting the first code into the second code of the second object corresponding to the first object in response to a position selection operation performed by the second editor after the operation of selecting or copying the first object is performed by the first editor.
According to an embodiment of the present disclosure, if an operation of selecting or copying a first object is performed by a first editor and then a position selection operation is performed by a second editor, for example, a position is selected in a document edited by the second editor, it can be regarded as intending to copy the first object in the first editor into the second editor, and then, in response to the operation, the first code is converted into a second code so that the second object can be generated by the second editor.
Fig. 3 illustrates a flowchart of acquiring a second code according to an embodiment of the present disclosure.
As shown in fig. 3, the converting the first code into the second code of the second object corresponding to the first object includes steps S301 to S303.
In step S301, the first object represented by the first code is identified.
According to an embodiment of the present disclosure, the identifying the first object represented by the first code includes identifying a form described by a code representing the form in a hypertext markup language document.
According to an embodiment of the present disclosure, for example, it is assumed that the first code and the second code are hypertext markup language codes, the HTML code includes at least one element, each element corresponding to one object, for example, a table element is all codes for describing a table object, an img element is all codes for describing a picture object, and the like. In one example, identifying the first object represented by the first code may include identifying a table T described by a table element in HTML code.
In step S302, a second object corresponding to the first object is determined.
According to an embodiment of the disclosure, the determining a second object corresponding to the first object includes determining pictures having the same content and the same or different styles as the table. For example, in the above example, the determining the second object corresponding to the first object includes determining the picture P having the same content and the same or different style as the table T.
In step S303, a second code representing the second object is generated.
According to an embodiment of the disclosure, the generating the second code for representing the second object includes generating a base64 value of the picture or a resource address of a server side for storing the base64 value of the picture. Base64 is a common encoding method for transmitting 8Bit byte codes, and is a method for representing binary data based on 64 printable characters.
According to an embodiment of the present disclosure, after a second object (e.g., picture object P) is determined, a base64 value of the picture object P may be obtained by base64 encoding, and then a second code representing the second object is generated based on the base64 value. For example, when the first code and the second code are HTML code, the second code may include an img element having the base64 value as a source attribute.
According to an embodiment of the present disclosure, after the base64 value is acquired, the base64 value may be uploaded to a server, and then a second code for representing the second object is generated based on a resource address of the server of the base64 value. For example, the second code may include an img element having a resource address of a server of the base64 value as a source attribute.
An exemplary process of the object editing method according to an embodiment of the present disclosure is specifically described below with reference to fig. 4A to 4D.
Fig. 4A-4D illustrate an exemplary process of an object editing method according to an embodiment of the present disclosure. FIG. 4A schematically illustrates a schematic view of a first object; FIG. 4B schematically illustrates a schematic diagram of a first code; FIG. 4C schematically illustrates a schematic diagram of a second code; fig. 4D schematically shows a schematic view of a second object.
For convenience of description, fig. 4A-4D illustrate an example in which the first editor is word processing software based on a word document format and the second editor is web page editing software based on an html document format. It should be understood that this example is used as an example only, and is not limiting of the present disclosure, and the first editor and the second editor in the present disclosure may be set according to actual needs, which is not specifically limited by the present disclosure.
As shown in fig. 4A, it is assumed that the first object edited by the first editor is a table object T.
First, a first code of the table object T is acquired.
Specifically, in response to performing an operation of selecting or copying the table object T through the first editor, an original code of the table object T based on a word document format may be acquired and then converted into a first code based on an HTML document format as shown in fig. 4B.
The first code is then converted into a second code of a second object corresponding to the first object.
Specifically, the first object represented by the first code is first identified, for example, the first object represented by a table element in the first code is identified, as shown in fig. 4B, and if the table element is all codes from a start tag < table > to an end tag, the first object represented by the table element is a table object T in fig. 4A.
After identifying the table object T, determining a second object corresponding to the table object T, and assuming that the second object is determined to be a picture object P, the picture object P may be a picture having the same style as the table object T, or may be a picture in which the table object T changes one or more style elements, for example, the picture object P in fig. 4D is a picture in which the table object T changes a line type.
After the picture object P is acquired, a second code for representing the picture object P is generated. As shown in fig. 4C, the second code includes an img element for describing the picture object P, where src= "X" represents a source attribute of the img element. For example, a base64 value of the picture object P is generated, the source attribute of the img element may be the base64 value, that is, "X" in fig. 4C is the base64 value; the base64 value of the picture object P may be uploaded to a server after the base64 value is generated, and then the source attribute of the img element may be a resource address of the server of the base64 value, that is, "X" in fig. 4C is a resource address of the server of the base64 value.
In step S103, the second object is generated by a second editor different from the first editor, based on the second code. For example, a second object as shown in fig. 4D is generated by a second editor based on a second code as shown in fig. 4C.
Fig. 5 shows a block diagram of a structure of an object editing apparatus 500 according to an embodiment of the present disclosure. The apparatus may be implemented as part or all of an electronic device by software, hardware, or a combination of both.
As shown in fig. 5, the object editing apparatus 500 includes an acquisition module 501, a conversion module 502, and a generation module 503.
The obtaining module 501 is configured to obtain a first code of a first object edited by a first editor;
the conversion module 502 is configured to convert the first code into a second code of a second object corresponding to the first object;
the generating module 503 is configured to generate the second object by a second editor different from the first editor based on the second code.
According to an embodiment of the present disclosure, the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
According to an embodiment of the present disclosure, the first code and the second code are hypertext markup language codes.
According to an embodiment of the present disclosure, the first object is a table object, and the second object is a picture object corresponding to the table object.
According to an embodiment of the present disclosure, the first object and the second object have the same style; or alternatively
The first object and the second object have different styles.
According to an embodiment of the present disclosure, acquiring a first code of a first object edited by a first editor includes:
acquiring original codes of the first object in response to the first editor executing the operation of selecting or copying the first object;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
According to an embodiment of the disclosure, the converting the first code into a second code of a second object corresponding to the first object includes:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
According to an embodiment of the disclosure, the converting the first code into a second code of a second object corresponding to the first object includes:
identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
According to an embodiment of the present disclosure, the identifying the first object represented by the first code includes identifying a form described by a code representing the form in a hypertext markup language document;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
The present disclosure also discloses an electronic device, fig. 6 shows a block diagram of a structure of an electronic device 600 according to an embodiment of the present disclosure.
As shown in fig. 6, the electronic device 600 includes a memory 601 and a processor 602. The memory 601 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 602 to perform the method steps of:
acquiring a first code of a first object edited by a first editor;
converting the first code into a second code of a second object corresponding to the first object;
the second object is generated by a second editor different from the first editor based on the second code.
According to an embodiment of the present disclosure, the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
According to an embodiment of the present disclosure, the first code and the second code are hypertext markup language codes.
According to an embodiment of the present disclosure, the first object is a table object, and the second object is a picture object corresponding to the table object.
According to an embodiment of the present disclosure, the first object and the second object have the same style; or alternatively
The first object and the second object have different styles.
According to an embodiment of the present disclosure, acquiring a first code of a first object edited by a first editor includes:
acquiring original codes of the first object in response to the first editor executing the operation of selecting or copying the first object;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
According to an embodiment of the disclosure, the converting the first code into a second code of a second object corresponding to the first object includes:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
According to an embodiment of the disclosure, the converting the first code into a second code of a second object corresponding to the first object includes:
identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
According to an embodiment of the present disclosure, the identifying the first object represented by the first code includes identifying a form described by a code representing the form in a hypertext markup language document;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
Fig. 7 shows a schematic diagram of a computer system suitable for use in implementing an object editing method according to an embodiment of the present disclosure.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU) 701, which can execute various processes in the above-described embodiments in accordance with a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 709 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output portion 708 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 708 including a hard disk or the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. The drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is mounted into the storage section 708 as necessary.
In particular, according to embodiments of the present disclosure, the methods described above may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the above-described object class determination method. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 709, and/or installed from the removable medium 711.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules referred to in the embodiments of the present disclosure may be implemented in software or in programmable hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a readable storage medium, which may be a readable storage medium contained in the electronic device or the computer system in the above-described embodiment; or may be a readable storage medium, alone, that is not assembled into the device. The readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described herein. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (25)

1. An object editing method, comprising:
acquiring a first code of a first object edited by a first editor;
Converting the first code into a second code of a second object corresponding to the first object; the second object is the same as the first object in content and the same or different in style;
generating the second object by a second editor different from the first editor based on the second code;
wherein the obtaining the first code of the first object edited by the first editor includes:
acquiring an original code of the first object; the original code is code used for describing the first object in the first editor;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
2. The method according to claim 1, characterized in that:
the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
3. The method according to claim 1, characterized in that:
the first code and the second code are hypertext markup language codes.
4. The method of claim 1, wherein the first object is a table object and the second object is a picture object corresponding to the table object.
5. The method of claim 1, wherein the obtaining the original code of the first object comprises:
and acquiring the original code of the first object in response to the first editor executing the operation of selecting or copying the first object.
6. The method of claim 1, wherein the converting the first code into a second code of a second object corresponding to the first object comprises:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
7. The method of claim 1, wherein the converting the first code into a second code of a second object corresponding to the first object comprises:
Identifying the first object represented by the first code;
determining a second object corresponding to the first object;
a second code is generated for representing the second object.
8. The method according to claim 7, wherein:
said identifying said first object represented by said first code includes identifying a form in the hypertext markup language document described by a code representing the form;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
9. An object editing apparatus, comprising:
an acquisition module configured to acquire a first code of a first object edited by a first editor;
a conversion module configured to convert the first code into a second code of a second object corresponding to the first object; the second object is the same as the first object in content and the same or different in style;
A generation module configured to generate the second object by a second editor different from the first editor based on the second code;
wherein the obtaining the first code of the first object edited by the first editor includes:
acquiring an original code of the first object; the original code is code used for describing the first object in the first editor;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
10. The apparatus according to claim 9, wherein:
the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
11. The apparatus according to claim 9, wherein:
the first code and the second code are hypertext markup language codes.
12. The apparatus of claim 9, wherein the first object is a table object and the second object is a picture object corresponding to the table object.
13. The apparatus of claim 9, wherein the obtaining the original code of the first object comprises:
and acquiring the original code of the first object in response to the first editor executing the operation of selecting or copying the first object.
14. The apparatus of claim 9, wherein the converting the first code into a second code of a second object corresponding to the first object comprises:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
15. The apparatus of claim 9, wherein the converting the first code into a second code of a second object corresponding to the first object comprises:
identifying the first object represented by the first code;
Determining a second object corresponding to the first object;
a second code is generated for representing the second object.
16. The apparatus according to claim 15, wherein:
said identifying said first object represented by said first code includes identifying a form in the hypertext markup language document described by a code representing the form;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
17. An electronic device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to perform the method steps of:
acquiring a first code of a first object edited by a first editor;
converting the first code into a second code of a second object corresponding to the first object; the second object is the same as the first object in content and the same or different in style;
Generating the second object by a second editor different from the first editor based on the second code;
wherein the obtaining the first code of the first object edited by the first editor includes:
acquiring an original code of the first object; the original code is code used for describing the first object in the first editor;
the original code is converted into the first code, and the original code and the first code are codes with different file formats.
18. The electronic device of claim 17, wherein:
the first editor is any one of the following: word processing software, spreadsheet software, and web page editing software; and/or
The second editor is webpage editing software; and/or
The first code and the second code are codes of the same document format.
19. The electronic device of claim 17, wherein:
the first code and the second code are hypertext markup language codes.
20. The electronic device of claim 17, wherein the first object is a table object and the second object is a picture object corresponding to the table object.
21. The electronic device of claim 17, wherein the obtaining the original code of the first object comprises:
and acquiring the original code of the first object in response to the first editor executing the operation of selecting or copying the first object.
22. The electronic device of claim 17, wherein the converting the first code into a second code for a second object corresponding to the first object comprises:
converting the first code into a second code of a second object corresponding to the first object in response to a paste operation performed by the second editor; or alternatively
The first code is converted into a second code of a second object corresponding to the first object in response to a position selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor.
23. The electronic device of claim 17, wherein the converting the first code into a second code for a second object corresponding to the first object comprises:
identifying the first object represented by the first code;
Determining a second object corresponding to the first object;
a second code is generated for representing the second object.
24. The electronic device of claim 23, wherein:
said identifying said first object represented by said first code includes identifying a form in the hypertext markup language document described by a code representing the form;
the determining a second object corresponding to the first object includes determining pictures with the same content and the same or different styles as the table;
the generating a second code for representing the second object includes generating a base64 value of the picture, or a resource address of a server side for storing the base64 value of the picture.
25. A readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the method steps of any of claims 1-8.
CN201910376780.2A 2019-05-07 2019-05-07 Object editing method, device, electronic equipment and readable storage medium Active CN111913703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910376780.2A CN111913703B (en) 2019-05-07 2019-05-07 Object editing method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910376780.2A CN111913703B (en) 2019-05-07 2019-05-07 Object editing method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111913703A CN111913703A (en) 2020-11-10
CN111913703B true CN111913703B (en) 2024-04-12

Family

ID=73241922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910376780.2A Active CN111913703B (en) 2019-05-07 2019-05-07 Object editing method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111913703B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114547519B (en) * 2022-02-24 2023-04-07 京东方数字科技有限公司 Page editing method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714133A (en) * 2009-11-18 2010-05-26 佛山市数苑科技信息有限公司 WEB-based mathematical formula editing system and method
CN101882075A (en) * 2010-03-24 2010-11-10 深圳市万兴软件有限公司 Method for editing rich text and for restoring and displaying rich text through FLASH
CN105138503A (en) * 2015-08-27 2015-12-09 网易(杭州)网络有限公司 Data editing method and device
CN108595389A (en) * 2018-04-25 2018-09-28 华中科技大学 A method of Word document is converted into txt plain text documents
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5045042B2 (en) * 2006-09-19 2012-10-10 富士通株式会社 Business flow editing program, business flow editing apparatus, and business flow editing method
KR20110091296A (en) * 2010-02-05 2011-08-11 삼성전자주식회사 Document writing device and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714133A (en) * 2009-11-18 2010-05-26 佛山市数苑科技信息有限公司 WEB-based mathematical formula editing system and method
CN101882075A (en) * 2010-03-24 2010-11-10 深圳市万兴软件有限公司 Method for editing rich text and for restoring and displaying rich text through FLASH
CN105138503A (en) * 2015-08-27 2015-12-09 网易(杭州)网络有限公司 Data editing method and device
CN108595389A (en) * 2018-04-25 2018-09-28 华中科技大学 A method of Word document is converted into txt plain text documents
CN109710902A (en) * 2018-08-17 2019-05-03 深圳壹账通智能科技有限公司 Generation method, device, equipment and the computer readable storage medium of PDF document

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种支持公式的在线文档编辑器的设计;侯霞;王杨;张磊;;电脑知识与技术;20160505(13);全文 *

Also Published As

Publication number Publication date
CN111913703A (en) 2020-11-10

Similar Documents

Publication Publication Date Title
US8549395B2 (en) Method and system for transforming an integrated webpage
US10008009B1 (en) Method for generating dynamic vector graphics
US10419568B2 (en) Manipulation of browser DOM on server
CN110389755B (en) Code processing method and device, electronic equipment and computer readable storage medium
AU2017210597A1 (en) System and method for the online editing of pdf documents
KR20100135844A (en) Document modification techniques using latent transfer surfaces
CN110096275B (en) Page processing method and device
CN112486482B (en) Page display method and device
CN111459501B (en) SVG-based Web configuration picture storage and display system, method and medium
CN109634579B (en) Code generation method, device, computer device and storage medium
CN112905944A (en) Page online dynamic generation method and device, electronic equipment and readable storage medium
CN110263279B (en) Page generation method and device, electronic equipment and computer readable storage medium
CN112632425B (en) Method, device, equipment and storage medium for generating offline resource file
CN115291868A (en) Method, device and storage medium for generating dynamic page data
CN111294395A (en) Terminal page transmission method, device, medium and electronic equipment
CN108170409B (en) Development method and system of WEB front-end control
CN116954450A (en) Screenshot method and device for front-end webpage, storage medium and terminal
CN114329283A (en) File processing method, device, equipment and storage medium thereof
CN113495730B (en) Resource package generation and parsing method and device
CN113656041A (en) Data processing method, device, equipment and storage medium
CN113377453A (en) Picture processing method and device and electronic equipment
CN111913703B (en) Object editing method, device, electronic equipment and readable storage medium
CN118194837A (en) Method and device for generating report file
CN112306619A (en) Screenshot method and device
CN118193723A (en) Text parsing method, system, electronic equipment and storage medium

Legal Events

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