CN111913703A - Object editing method and device, electronic equipment and readable storage medium - Google Patents
Object editing method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN111913703A CN111913703A CN201910376780.2A CN201910376780A CN111913703A CN 111913703 A CN111913703 A CN 111913703A CN 201910376780 A CN201910376780 A CN 201910376780A CN 111913703 A CN111913703 A CN 111913703A
- Authority
- CN
- China
- Prior art keywords
- code
- editor
- converting
- picture
- generating
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/33—Intelligent 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, an electronic device and a readable storage medium. 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, and the problems of format loss, abnormal display and the like caused by the use of 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.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an object editing method and apparatus, an electronic device, 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 editors currently in use.
In the process of providing the present disclosure, the inventors found that different editors are easy to cause problems such as format loss when the same code is copied between different editors due to different host environments, different resolution complexities, and the like. In addition, different devices, operating systems or browsers may have different explanations for the same code, and thus different display effects may be achieved, thereby increasing the difficulty and complexity of page editing and reducing the editing efficiency.
Disclosure of Invention
In order to solve the problems in the related art, embodiments of the present disclosure provide an object editing method and apparatus, an electronic device, and a 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;
generating, based on the second code, the second object through a second editor different from the first editor.
With reference to the first aspect, in a first implementation manner of the first aspect, the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the first aspect, the present disclosure provides in a second implementation manner of the first aspect, wherein 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
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 acquiring first code of a first object edited by a first editor includes:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
With reference to the first aspect, the present disclosure 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
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;
generating a second code 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 used for representing the table in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for 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;
generating, based on the second code, the second object through a second editor different from the first editor.
With reference to the second aspect, in a first implementation manner of the second aspect, the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the second aspect, the present disclosure provides in a second implementation manner of the second aspect, wherein 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
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 a first code of a first object edited by a first editor includes:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
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;
generating a second code 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 table described by a code used for representing the table in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
In a third aspect, the disclosed embodiments provide 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 implement the following method steps:
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;
generating, based on the second code, the second object through a second editor different from the first editor.
With reference to the third aspect, in a first implementation manner of the third aspect, the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
With reference to the third aspect, the present disclosure provides in a second implementation form 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
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 a first code of a first object edited by a first editor includes:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
With reference to the third aspect, the present disclosure provides 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
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;
generating a second code 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 used for representing the table in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
In a fourth aspect, an embodiment of the present disclosure provides a readable storage medium, on which computer instructions are stored, and the computer instructions, when executed by a processor, implement the 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 have 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, 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.
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 labels, objects and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 shows a flow diagram of an object editing method according to an embodiment of the present disclosure;
fig. 2 shows a flow diagram for obtaining a first code according to an embodiment of the disclosure;
FIG. 3 illustrates a flow diagram for obtaining a second code according to an embodiment of the disclosure;
4A-4D illustrate an exemplary process of an object editing method according to an embodiment of the present disclosure;
fig. 5 illustrates a block diagram of the structure 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 present disclosure;
fig. 7 shows a schematic structural diagram of a computer system suitable for 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. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. 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 different in host environment and complicated in resolution, which easily causes the problem of format loss when the same code is converted in different editors. In addition, different devices or browsers may have different explanations for the same code, 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 foregoing drawbacks, an embodiment of the present disclosure provides a method for obtaining 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, and generating the second object by a second editor different from the first editor based on the second code. According to the technical scheme, 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, 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 the embodiment of the disclosure, assuming that a plurality of editors E1, E2, … …, En, n ≧ 2 exist, the first editor and the second editor 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 a first editor E1 may be obtained, 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: 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, coffeacup, Notepad, syncwrite, platedit, jEdit, Sublime Text, sockets, Aptana Studio, and the like, which is not specifically limited by the present disclosure.
According to the embodiment of the disclosure, the second object corresponding to the first object can be generated by the second editor based on the first object edited by the first editor, and the complexity of editing the object by using different editors can be effectively reduced, so that the editing efficiency is improved.
According to an embodiment of the present disclosure, the first object and the second object are of different types. 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 being 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, if 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, the picture object P may be a picture of the table object T and have the same appearance as the table object T. Therefore, when the objects are edited by using a plurality of editors, the consistency of the edited objects can be better kept, 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 an embodiment of the present disclosure, the first object and the second object have different styles, and the different styles may mean that the second object and the first object have different appearances when displayed.
According to an embodiment of the present disclosure, the first object corresponds to the second object, and may have different styles, and specifically, the styles may include one or more of attributes such as color, line, font, size, and the like. 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, and the like. According to the embodiment of the present disclosure, when a first object (e.g., a form object T) is converted into a second object (e.g., a picture object P), the second object may be automatically set to a desired style, for example, a preset style or a style consistent with a web page being edited by a second editor, thereby increasing the automation degree of web page editing and significantly reducing the workload of developers.
Fig. 2 shows a flow diagram for acquiring a first code according to an embodiment of the disclosure.
As shown in fig. 2, the acquiring of 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 being performed by the first editor, 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 in different document formats.
According to an embodiment of the present disclosure, the document format refers to a specific encoding manner of information used by the electronic device for storing the information. The original code of a first object (e.g., a table object T), whose document format is determined by a first editor, is the code used in the first editor to describe the table object T. For example, when the first editor is word processing software (e.g., word), the original code is a code in a word document format; when the first editor is spreadsheet software (e.g. excel), the original code is code in an excel document format; when the first editor is other web page editing software (e.g., a JavaScript editor), the original code is a code in a document format used by the other web page editing software.
To copy a first object from a first editor to a second editor, the original code of the first object may be converted into a first code that belongs to a different document 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 (HTML) code, which is a Language commonly used by web page editing software to describe a web page. After obtaining a second code that the second editor can recognize and process, the second object may be generated by the second editor.
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 paste operation performed by the second editor.
According to the embodiment of the present disclosure, after the first code of the first object is acquired, the first code is converted into the second code in the second editor in response to a paste operation performed by the second editor, so that the second editor can generate the 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 location 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 present disclosure, if an operation of selecting or copying a first object is performed by a first editor and then a location selection operation is performed by a second editor in turn, for example, a location is selected in a document edited by the second editor, it may be considered that a first object in the first editor is intended to be copied into the second editor, and then, in response to the operation, the first code is converted into a second code, so that a second object may be generated by the second editor.
Fig. 3 shows a flow diagram for acquiring a second code according to an embodiment of the present disclosure.
As shown in fig. 3, the converting the first code into a second code of a 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, and the HTML codes include 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 present disclosure, the determining of the second object corresponding to the first object includes determining a picture having the same content and the same or different style as the table. For example, in the above example, the determining a second object corresponding to the first object includes determining a 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 present disclosure, the generating the second code for representing the second object includes generating a base64 value of the picture, or a server-side resource address for storing a base64 value of the picture. Base64 is a common encoding method for transmitting 8-Bit byte codes, and is a method for representing binary data based on 64 printable characters.
According to an embodiment of the present disclosure, after determining a second object (e.g., a picture object P), a base64 value of the picture object P may be acquired through base64 encoding, and then a second code for representing the second object is generated based on the base64 value. For example, when the first code and the second code are HTML code, then 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 obtaining the base64 value, the base64 value may be uploaded to a server, and then a second code representing the second object may be 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 the server with the base64 value as a source attribute.
An exemplary process of an object editing method according to an embodiment of the present disclosure is specifically described below with reference to fig. 4A-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 shows a schematic diagram of a first code; FIG. 4C schematically shows a diagram of a second code; fig. 4D schematically shows a schematic view of the 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 for illustration only, and not for limitation of the present disclosure, and the first editor and the second editor in the present disclosure may be set according to actual needs, and the present disclosure does not specifically limit this.
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 an operation of selecting or copying the table object T performed by the first editor, original code of the table object T based on the word document format may be acquired and then converted into first code based on the HTML document format as shown in fig. 4B.
The first code is then converted into a second code for a second object corresponding to the first object.
Specifically, the first object represented by the first code is identified first, for example, the first object represented by a table element in the first code is identified, as shown in fig. 4B, the table element is all codes from a start tag < table > to an end tag </table >, and then the first object represented by the table element is a table object T in fig. 4A.
After identifying the table object T, a second object corresponding to the table object T is determined, 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 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.
And after the picture object P is acquired, generating a second code for representing the picture object P. As shown in fig. 4C, the second code includes an img element for describing the picture object P, where src ═ X denotes a source attribute of the img element. For example, if a base64 value of the picture object P is generated, the source attribute of the img element may be the base64 value, i.e., "X" in fig. 4C is the base64 value; or after generating the base64 value of the picture object P, uploading the base64 value to a server, the source attribute of the img element may be the resource address of the server with the base64 value, that is, "X" in fig. 4C is the resource address of the server with 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, based on the second code as shown in fig. 4C, a second object as shown in fig. 4D is generated by the second editor.
Fig. 5 illustrates a block diagram of the 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 through 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 through 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: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page 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 code.
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
The first object and the second object have different styles.
According to an embodiment of the present disclosure, acquiring first code of a first object edited by a first editor includes:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
According to an embodiment of the present 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
According to an embodiment of the present 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;
generating a second code 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 of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
The present disclosure also discloses an electronic device, and fig. 6 shows a block diagram 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 implement the following method steps:
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;
generating, based on the second code, the second object through a second editor different from the first editor.
According to an embodiment of the present disclosure, the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page 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 code.
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
The first object and the second object have different styles.
According to an embodiment of the present disclosure, acquiring first code of a first object edited by a first editor includes:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
According to an embodiment of the present 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
According to an embodiment of the present 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;
generating a second code 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 of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
Fig. 7 shows a schematic structural diagram of a computer system suitable for 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 according to 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 necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via 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 portion 706 including a keyboard, a mouse, and the like; an output section 708 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and 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. A 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 out therefrom is mounted into the storage section 708 as necessary.
In particular, the above described methods may be implemented as computer software programs according to embodiments of the present disclosure. 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 can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711.
The flowchart 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 flowcharts or block diagrams may represent a module, a program segment, or a 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 described in the embodiments of the present disclosure may be implemented by software or by programmable hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
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 embodiments; or may be a separately present, non-built-in, readable storage medium. 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 exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present disclosure is not limited to the specific combination of the above-mentioned features, but also covers other embodiments formed by any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (28)
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;
generating, based on the second code, the second object through a second editor different from the first editor.
2. The method of claim 1, wherein:
the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
3. The method of claim 1, wherein:
the first code and the second code are hypertext markup language code.
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 4, wherein:
the first object and the second object have the same style; or
The first object and the second object have different styles.
6. The method of claim 1, wherein obtaining the first code for the first object edited by the first editor comprises:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
7. The method of claim 1, wherein 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
8. The method of claim 1, wherein 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;
generating a second code representing the second object.
9. The method of claim 8, wherein:
said identifying said first object represented by said first code comprises identifying a form described by a code representing a form in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
10. 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;
a generating module configured to generate the second object through a second editor different from the first editor based on the second code.
11. The apparatus of claim 10, wherein:
the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
12. The apparatus of claim 10, wherein:
the first code and the second code are hypertext markup language code.
13. The apparatus of claim 10, wherein the first object is a table object and the second object is a picture object corresponding to the table object.
14. The apparatus of claim 13, wherein:
the first object and the second object have the same style; or
The first object and the second object have different styles.
15. The apparatus of claim 10, wherein obtaining the first code for the first object edited by the first editor comprises:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
16. The apparatus of claim 10, 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
17. The apparatus of claim 10, 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;
generating a second code representing the second object.
18. The apparatus of claim 17, wherein:
said identifying said first object represented by said first code comprises identifying a form described by a code representing a form in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
19. An electronic device comprising a memory and a processor; wherein the memory is to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement 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;
generating, based on the second code, the second object through a second editor different from the first editor.
20. The electronic device of claim 19, wherein:
the first editor is any one of: word processing software, spreadsheet software, web page editing software; and/or
The second editor is web page editing software; and/or
The first code and the second code are codes of the same document format.
21. The electronic device of claim 19, wherein:
the first code and the second code are hypertext markup language code.
22. The electronic device of claim 19, wherein the first object is a table object and the second object is a picture object corresponding to the table object.
23. The electronic device of claim 22, wherein:
the first object and the second object have the same style; or
The first object and the second object have different styles.
24. The electronic device of claim 19, wherein obtaining the first code for the first object edited by the first editor comprises:
acquiring original code of the first object in response to an operation of selecting or copying the first object being performed by the first editor;
converting the original code into the first code, the original code and the first code being codes of different document formats.
25. The electronic device of claim 19, wherein said 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
In response to a location selection operation performed by the second editor after an operation of selecting or copying the first object is performed by the first editor, converting the first code into a second code for a second object corresponding to the first object.
26. The electronic device of claim 19, wherein said 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;
generating a second code representing the second object.
27. The electronic device of claim 26, wherein:
said identifying said first object represented by said first code comprises identifying a form described by a code representing a form in a hypertext markup language document;
the determining of the second object corresponding to the first object comprises determining pictures with the same content and the same or different styles with the table;
the generating a second code for representing the second object includes generating a base64 value for the picture, or a server-side resource address for storing a base64 value for the picture.
28. A readable storage medium having stored thereon computer instructions, characterized in that the computer instructions, when executed by a processor, carry out the method steps of any of claims 1-9.
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 true CN111913703A (en) | 2020-11-10 |
| CN111913703B 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) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114547519A (en) * | 2022-02-24 | 2022-05-27 | 京东方数字科技有限公司 | Page editing method and device, electronic equipment and readable storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080071593A1 (en) * | 2006-09-19 | 2008-03-20 | Fujitsu Limited | Business process editor, business process editing method, and computer product |
| 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 |
| US20110194770A1 (en) * | 2010-02-05 | 2011-08-11 | Samsung Electronics Co., Ltd. | Document editing apparatus and method |
| 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 |
-
2019
- 2019-05-07 CN CN201910376780.2A patent/CN111913703B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080071593A1 (en) * | 2006-09-19 | 2008-03-20 | Fujitsu Limited | Business process editor, business process editing method, and computer product |
| CN101714133A (en) * | 2009-11-18 | 2010-05-26 | 佛山市数苑科技信息有限公司 | WEB-based mathematical formula editing system and method |
| US20110194770A1 (en) * | 2010-02-05 | 2011-08-11 | Samsung Electronics Co., Ltd. | Document editing apparatus 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)
| Title |
|---|
| 侯霞;王杨;张磊;: "一种支持公式的在线文档编辑器的设计", 电脑知识与技术, no. 13, 5 May 2016 (2016-05-05) * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114547519A (en) * | 2022-02-24 | 2022-05-27 | 京东方数字科技有限公司 | Page editing method and device, electronic equipment and readable storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111913703B (en) | 2024-04-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8549395B2 (en) | Method and system for transforming an integrated webpage | |
| CN109933752B (en) | Method and device for exporting electronic document | |
| CN109801347B (en) | Method, device, equipment and medium for generating editable image template | |
| CN107832045B (en) | Method and apparatus for cross programming language interface conversion | |
| US10008009B1 (en) | Method for generating dynamic vector graphics | |
| US7949942B2 (en) | System and method for identifying line breaks | |
| US20050235202A1 (en) | Automatic graphical layout printing system utilizing parsing and merging of data | |
| US20030034989A1 (en) | Application editing apparatus and data processing method and program | |
| CN110096275B (en) | Page processing method and device | |
| JP2015529874A (en) | System and method for viewing medical images | |
| CN111459501B (en) | SVG-based Web configuration picture storage and display system, method and medium | |
| CN114329283B (en) | File processing method, device, equipment and storage medium thereof | |
| CN109960773A (en) | Page animation method, apparatus, equipment and storage medium based on HTML5 | |
| CN111294395A (en) | Terminal page transmission method, device, medium and electronic equipment | |
| CN115291868A (en) | Method, device and storage medium for generating dynamic page data | |
| CN116954450A (en) | Screenshot method and device for front-end webpage, storage medium and terminal | |
| CN113822033A (en) | Report generation method, device, equipment and storage medium | |
| CN108170409B (en) | Development method and system of WEB front-end control | |
| CN111158675A (en) | Front-end page template multiplexing method | |
| CN113377453A (en) | Picture processing method and device and electronic equipment | |
| CN111913703B (en) | Object editing method, device, electronic equipment and readable storage medium | |
| CN112765522B (en) | Digital newspaper content generation method, system and computer readable storage medium | |
| KR102013620B1 (en) | Web based document editing server for changing template of web based document and operating method thereof | |
| CN108932330B (en) | Data display method and device | |
| CN111179164A (en) | Method and device for generating thumbnail |
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 |