CN105095163A - Web page editing method and device - Google Patents

Web page editing method and device Download PDF

Info

Publication number
CN105095163A
CN105095163A CN201410160635.8A CN201410160635A CN105095163A CN 105095163 A CN105095163 A CN 105095163A CN 201410160635 A CN201410160635 A CN 201410160635A CN 105095163 A CN105095163 A CN 105095163A
Authority
CN
China
Prior art keywords
code
given content
editor
address information
webpage
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.)
Pending
Application number
CN201410160635.8A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410160635.8A priority Critical patent/CN105095163A/en
Publication of CN105095163A publication Critical patent/CN105095163A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a web page editing method and device, pertaining to the field of web page techniques. The method comprises following steps: acquiring editing operation on the specified content of web pages when web pages are displayed; editing codes corresponding to the specified content based on editing operation in order to obtain edited codes corresponding to the specified content; and displaying edited specified content based on edited codes. The web page editing method and device have following beneficial effects: the function of editing the specified content of web pages is fulfilled so that high pertinency is obtained; furthermore, the specified content is unnecessarily copied to an editor and format conversion of web pages is unnecessarily carried out so that disorder of type setting is avoided; and operation is simplified.

Description

Page authoring method and device
Technical field
The disclosure is directed to web technologies field, specifically about page authoring method and device.
Background technology
Along with the development of Internet technology, the demand of user to webpage function is more and more higher, and a lot of user wishes when browsing to interested web page contents can this web page contents of direct editing, as being that this web page contents adds annotation, adds underscore etc.
But current browser does not provide editor the function of web page contents, user can not directly edit in webpage, web page contents can only be copied in special editing machine and edit, or this webpage is converted to Word, PDF(PortableDocumentFormat, Portable Document format) etc. form file after edit again.
This web page contents may comprise the content of the multiple format such as word, picture, and typesetting may be caused when this web page contents being copied to editing machine chaotic; And when this webpage is converted to the file of the forms such as Word, PDF, format conversion must be carried out to all web page contents in this webpage, specific aim is poor, complex operation.
Summary of the invention
In order to solve Problems existing in correlation technique, present disclose provides a kind of page authoring method and device.Described technical scheme is as follows:
According to the first aspect of disclosure embodiment, provide a kind of page authoring method, described method comprises:
When display web page, obtain the editing operation to given content in described webpage;
According to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Based on the code after described editor, the given content after display editor.
According to described editing operation, the code corresponding to described given content is edited, and the code obtained after editor corresponding to described given content comprises:
According to default corresponding relation, obtain the operation code that described editing operation is corresponding, described default corresponding relation comprises the corresponding relation between editing operation and operation code;
Operation code corresponding for described editing operation is added in code corresponding to described given content, obtains the code after described editor.
According to described editing operation, the code corresponding to described given content is edited, and after obtaining the code after editor corresponding to described given content, described method also comprises:
Obtain the address information of described webpage;
Code after the described address information of corresponding preservation, described given content and described editor.
Described method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in described web displaying operation;
According to described address information, obtain the code of described webpage;
Judge whether the code after preserving given content corresponding to described address information and editor;
When preserving the code after given content corresponding to described address information and editor, in the code of described webpage, code corresponding for described given content being replaced with the code after described editor, obtaining the web page code after replacing;
Based on the web page code after replacement, show described webpage.
After obtaining the address information of described webpage, described method also comprises:
Based on current user ID, send the code after described address information, described given content and described editor to server, described server is used for the code after the described user ID of corresponding preservation, described address information, described given content and described editor.
Described method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in described web displaying operation;
According to described address information, obtain the code of described webpage;
Based on current user ID, described address information is sent to described server, described server is for judging whether to preserve the code after described user ID and given content corresponding to described address information and editor, if so, the code after described user ID and given content corresponding to described address information and editor is returned;
In the code of described webpage, code corresponding for described given content is replaced with the code after described editor, obtain the web page code after replacing;
Based on the web page code after replacement, show described webpage.
According to the second aspect of disclosure embodiment, provide a kind of web page editing device, described device comprises:
Editing operation acquisition module, for when display web page, obtains the editing operation to given content in described webpage;
Edit code module, for according to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Display module, for based on the code after described editor, shows the given content after editor.
Described edit code module comprises:
Code obtaining unit, preset corresponding relation for basis, obtain the operation code that described editing operation is corresponding, described default corresponding relation comprises the corresponding relation between editing operation and operation code;
Adding code unit, for operation code corresponding for described editing operation being added in code corresponding to described given content, obtaining the code after described editor.
Described device also comprises:
Address information acquisition module, for obtaining the address information of described webpage;
Preserve module, preserve the code after described address information, described given content and described editor for correspondence.
Described device also comprises:
First display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in described web displaying operation;
First web page code acquisition module, for according to described address information, obtains the code of described webpage;
First judge module, for judging whether the code after preserving given content corresponding to described address information and editor;
First replaces code module, for when preserving the code after given content corresponding to described address information and editor, in the code of described webpage, code corresponding for described given content is replaced with the code after described editor, obtains the web page code after replacing;
First replaces display module, for based on the web page code after replacement, shows described webpage.
Described device also comprises:
Sending module, for based on current user ID, send the code after described address information, described given content and described editor to server, described server is used for the code after the described user ID of corresponding preservation, described address information, described given content and described editor.
Described device also comprises:
Second display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in described web displaying operation;
Second web page code acquisition module, for according to described address information, obtains the code of described webpage;
Address sending module, for based on current user ID, described address information is sent to described server, described server is for judging whether to preserve the code after described user ID and given content corresponding to described address information and editor, if so, the code after described user ID and given content corresponding to described address information and editor is returned;
Second replaces code module, for code corresponding for described given content being replaced with the code after described editor in the code of described webpage, obtains the web page code after replacing;
Second replaces display module, for based on the web page code after replacement, shows described webpage.
According to the third aspect of disclosure embodiment, provide a kind of web page editing device, comprising:
Processor; For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
When display web page, obtain the editing operation to given content in described webpage;
According to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Based on the code after described editor, the given content after display editor.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect:
By obtaining the editing operation to given content in this webpage, and according to this editing operation, the code corresponding to this given content is edited, obtain the code after editor corresponding to this given content, with based on the code after this editor, given content after display editor, achieve in the web page to the function that given content is edited, with strong points, further, without the need to this given content is copied to editing machine, also without the need to carrying out format conversion to this webpage, avoid typesetting confusion, simplify operation.
Should be understood that, it is only exemplary that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows embodiment according to the invention, and is used from instructions one and explains principle of the present invention.
Fig. 1 is the process flow diagram of a kind of page authoring method according to an exemplary embodiment;
Fig. 2 is the process flow diagram of a kind of page authoring method according to an exemplary embodiment;
Fig. 3 is the web displaying schematic diagram according to an exemplary embodiment;
Fig. 4 is the given content display effect schematic diagram according to an exemplary embodiment;
Fig. 5 is the editing options display schematic diagram according to an exemplary embodiment;
Fig. 6 is the given content display effect schematic diagram after the editor according to an exemplary embodiment;
Fig. 7 is a kind of web page editing device schematic diagram according to an exemplary embodiment;
Fig. 8 is a kind of block diagram for web page editing device according to an exemplary embodiment.
Embodiment
For making object of the present disclosure, technical scheme and advantage clearly understand, below in conjunction with embodiment and accompanying drawing, the disclosure is described in further details.At this, exemplary embodiment of the present disclosure and illustrating for explaining the disclosure, but not as to restriction of the present disclosure.
Disclosure embodiment provides a kind of page authoring method and device, is described in detail to the disclosure below in conjunction with accompanying drawing.
Fig. 1 is the process flow diagram of a kind of page authoring method according to an exemplary embodiment, and as shown in Figure 1, this page authoring method is used for, in terminal, comprising the following steps:
In a step 101, when display web page, obtain the editing operation to given content in this webpage.
In a step 102, according to this editing operation, the code corresponding to this given content is edited, and obtains the code after editor corresponding to this given content.
In step 103, based on the code after this editor, the given content after display editor.
The method that the embodiment of the present invention provides, by obtaining the editing operation to given content in this webpage, and according to this editing operation, the code corresponding to this given content is edited, obtain the code after editor corresponding to this given content, with based on the code after this editor, given content after display editor, achieve in the web page to the function that given content is edited, with strong points, further, without the need to this given content is copied to editing machine, also without the need to carrying out format conversion to this webpage, avoiding typesetting confusion, simplifying operation.
Alternatively, according to this editing operation, the code corresponding to this given content is edited, and the code obtained after editor corresponding to this given content comprises:
According to default corresponding relation, obtain the operation code that this editing operation is corresponding, this default corresponding relation comprises the corresponding relation between editing operation and operation code;
Operation code corresponding for this editing operation is added in code corresponding to this given content, obtains the code after this editor.
Alternatively, according to this editing operation, the code corresponding to this given content is edited, and after obtaining the code after editor corresponding to this given content, the method also comprises:
Obtain the address information of this webpage;
Code after corresponding this address information of preservation, this given content and this editor.
Alternatively, the method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in the operation of this web displaying;
According to this address information, obtain the code of this webpage;
Judge whether the code after preserving given content corresponding to this address information and editor;
When preserving the code after given content corresponding to this address information and editor, in the code of this webpage, code corresponding for this given content being replaced with the code after this editor, obtaining the web page code after replacing;
Based on the web page code after replacement, show this webpage.
Alternatively, after obtaining the address information of this webpage, the method also comprises:
Based on current user ID, send the code after this address information, this given content and this editor to server, this server is used for the code after corresponding this user ID of preservation, this address information, this given content and this editor.
Alternatively, the method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in the operation of this web displaying;
According to this address information, obtain the code of this webpage;
Based on current user ID, this address information is sent to this server, this server is for judging whether the code after preserving this user ID given content corresponding with this address information and editor, if so, the code after this user ID given content corresponding with this address information and editor is returned;
In the code of this webpage, code corresponding for this given content is replaced with the code after this editor, obtain the web page code after replacing;
Based on the web page code after replacement, show this webpage.
Above-mentioned all alternatives, can adopt and combine arbitrarily formation optional embodiment of the present invention, this is no longer going to repeat them.
In one embodiment, Fig. 2 is the exemplary process diagram of page authoring method, and see Fig. 2, the method comprises:
In step 201, terminal, when display web page, obtains the editing operation to given content in this webpage.
Wherein, this given content is the web page contents in this webpage, can be one section of text in this webpage, a width picture, or the combination of text and picture etc., the present embodiment does not limit this.
In the present embodiment, this terminal when display web page, can be monitored the whole web page contents in this webpage, to obtain the editing operation of user to web page contents arbitrary in this webpage, web page contents corresponding for this editing operation is defined as given content.This terminal also when display web page, can obtain the web page contents that user selects, as given content, then monitors this given content, to obtain the editing operation of user to this given content.Wherein, the web page contents that this terminal obtains user's selection can comprise as given content: for the terminal being configured with mouse, this terminal obtains the drag operation of mouse, using web page contents corresponding for this drag operation as this given content, or, for the terminal being configured with touch screen, this terminal obtains the slide of user, using web page contents corresponding for this slide as this given content.When user wishes to edit interested web page contents, interested web page contents can be selected, this terminal obtains the web page contents of user's selection as given content, only need pay close attention to the editing operation to this given content, and the web page contents that can filter out in this webpage beyond this given content, with strong points.
See Fig. 3, the webpage of this terminal demonstration comprises two sections of texts, when this terminal gets the drag operation of mouse, when determining that web page contents corresponding to this drag operation is first paragraph text, first paragraph text is defined as this given content, and adjust the background color of this given content, to highlight this given content, the display effect of this given content is as shown in Figure 4.
In the present embodiment, this editing operation can for adding underscore operation, interpolation annotation operations, the operation of adjustment font, adjustment color operations etc., and the embodiment of the present invention does not limit this.This terminal can provide editing options corresponding to often kind of editing operation for this given content, as added underscore option, adding comment options, adjust font size option, adjusting font color option etc., when this terminal gets the activation manipulation of user to arbitrary editing options, determine to get this editing options corresponding, editing operation to this given content.See Fig. 5, this terminal is when getting this given content, add underscore option for this given content provides, add comment options, adjust font size option and adjustment font color option, user can click wherein any one editing options, trigger corresponding editing operation, simple and efficient to handle.
Based on the above-mentioned four kinds of editing options enumerated, this step 201 " terminal, when display web page, obtains the editing operation to given content in this webpage " can comprise the following steps any one or multinomial in 201a-201d:
201a, when this terminal gets user to when adding the activation manipulation of underscore option, determine to get and underlined operation is added to this given content.
201b, get user to when adding the activation manipulation of comment options when this terminal, display input field, this input field is used for user and inputs annotation to be added, when detect user input specify annotation time, determine to get for this given content adds the operation of this appointment annotation.
201c, when this terminal gets the activation manipulation to adjustment font size option, the option of display multiple font size, when getting the specified size that user selects, determines to get the operation font size of this given content being adjusted to this specified size.
201d, when this terminal gets the activation manipulation to adjustment font color option, the option of display multiple font color, when getting the designated color that user selects, determines to get the operation font color of this given content being adjusted to this designated color.
The present embodiment is only described for above-mentioned four kinds of editing options, does not in fact limit the editing options that this terminal provides.
In step 202., this terminal, according to default corresponding relation, obtains the operation code that this editing operation is corresponding.
Wherein, this default corresponding relation comprises the corresponding relation between editing operation and operation code, and this operation code, for realizing corresponding editing operation, namely when this terminal performs this operation code, can realize the editing operation that this operation code is corresponding.This default corresponding relation can be set up in advance by technician, and the multiple editing operation triggered according to user in application process upgrades, and the present embodiment does not limit this.
The present embodiment is preserved for this default corresponding relation and is described in the terminal, when this terminal gets the editing operation to this given content, directly according to this default corresponding relation preserved, can obtain the operation code that this editing operation is corresponding.Certainly, this default corresponding relation also can be kept in the code server with this terminal association, by this terminal when getting the editing operation to this given content, to the operation code that this this editing operation of code server acquisition request is corresponding, this code server is namely according to this default corresponding relation, obtain the operation code that this editing operation is corresponding, return to this terminal.
In addition, this operation code can based on HTML(HyperTextMarkupLanguage, HTML (Hypertext Markup Language)), JavaScript or CSS(CascadingStyleSheets, Cascading Style Sheet) etc. polytype language, the present embodiment does not limit this.
In step 203, operation code corresponding for this editing operation is added in code corresponding to this given content by this terminal, obtains the code after this editor.
Wherein, the code of this webpage comprises code corresponding to this given content, when this terminal shows this webpage based on the code of this webpage, can show this given content based on the code that this given content is corresponding.When operation code corresponding for this editing operation is added in code corresponding to this given content by this terminal, obtain the code after editing, when this terminal follow-up performs the code to this editor, this editing operation to this given content can be realized, thus the given content that can show after editor, and original given content can not be shown.
Based on above-mentioned steps 201a-201d, this step 203 can comprise the following steps any one or multinomial in 203a-203d:
203a, when this editing operation for add underscore operation time, being added in code corresponding to this given content by adding underlined code, obtaining the code after this editor.
203b, when this editing operation for add annotation operations time, obtain user input appointment annotation, by add this appointment annotation code be added in code corresponding to this given content, obtain the code after this editor.
203c, when this editing operation for adjustment font size operation time, obtain user select specified size, code font size being adjusted to specified size is added in code corresponding to this given content, obtains the code after this editor.
203d, when this editing operation for adjustment font color operation time, obtain user select designated color, code font color being adjusted to designated color is added in code corresponding to this given content, obtains the code after this editor.
In step 204, this terminal, based on the code after this editor, shows the given content after editor.
In the present embodiment, this terminal show this webpage time, based on the code that this given content is corresponding, show this given content, during code then after obtaining this editor, this terminal shows based on the code after this editor again, to show the given content after editor.
See Fig. 5, when user clicks this interpolation underscore option, this terminal gets and operates the interpolation underscore of this given content, then be added in code corresponding to this given content by adding underlined code, obtain the code after this editor, based on the given content after the code display editor after this editor, display effect as shown in Figure 6.
From this given content is copied in editing machine different, operation code corresponding for this editing operation is added in code corresponding to this given content by this terminal, when this given content comprises the web page contents of the multiple format such as text, picture, code after this editor still comprises the composition information of this given content, when then this terminal shows based on the code after editor, still can according to the composition information of this given content, given content after display editor, the typesetting avoiding the web page contents causing multiple format in this given content is chaotic.
In step 205, this terminal obtains the address information of this webpage, the code after corresponding this address information of preservation, this given content and this editor.
Wherein, the address information of this webpage can be the title of this webpage or the URL(UniformResourceLocator of this webpage, URL(uniform resource locator)) address etc. uniquely can determine the information of this webpage.
In the present embodiment, during the code of this terminal after getting this editor, correspondingly can preserve the code after this address information, this given content and this editor, so that when once opening this webpage in this terminal, according to this address information, the code after this given content and this editor can be got, thus based on the code after this editor, given content after display editor, and do not show original given content.This terminal can retain the editing operation of user to this given content, when each display web page, can given content after instant playback editor, and the given content after making user directly can browse editor.
It should be noted that, this step 205 is optional step, and this terminal can not also perform step 205, when then once opening this webpage in this terminal, this webpage can be shown based on the code of this webpage, show original given content, and the web page contents after editor can not be shown.In addition, do not have absolute sequential relationship between this step 205 and this step 204, this step 205 can perform before this step 204, perform after this step 204, or perform with this step 204 simultaneously, the present embodiment does not limit this.
In step 206, this terminal obtains web displaying operation, and the address information of this webpage is carried in the operation of this web displaying.
Wherein, the operation of this web displaying can be triggered by the operation of opening webpage, or is triggered by the operation of refreshed web page, and the present embodiment does not limit this.
It should be noted that, the present embodiment is all example mutually with the webpage shown in webpage corresponding to this web displaying operation and above-mentioned steps 201 and is described, in fact, for each webpage, this terminal all corresponding can preserve the given content in the address information of this webpage, this webpage and the code after editor, when this terminal follow-up gets the web displaying operation for arbitrary webpage, all can inquire about according to the address information of the webpage of this web displaying operation correspondence, to obtain the code after given content corresponding to this address information and editor.
In step 207, this terminal, according to this address information, obtains the code of this webpage.
This terminal can according to this address information, from the web page code of this terminal buffers, obtain the code of this webpage, or this terminal can also send this address information to web page server, this web page server is used for the code for terminals with web pages, when this web page server receives this address information, according to this address information, obtain the code of this webpage, return to this terminal, this terminal obtains the code of this webpage.
In a step 208, whether this terminal judges has preserved the code after given content corresponding to this address information and editor, if so, performs step 209, if not, performs 211.
Code after this terminal has preserved given content corresponding to this address information and editor, shows this terminal once this given content edited, then when this shows this webpage, needs, based on the code after this editor, show the given content after editor.Code after this terminal does not preserve given content corresponding to this address information and editor, show this terminal this given content not edited or code before deleting after the corresponding given content preserved and editor, then show original webpage when this shows this webpage based on the code of this webpage.
This terminal can according to this address information, the given content that traversal is preserved and the code after editing, to judge whether the code after preserving given content corresponding to this address information and editor.But the code after this terminal does not preserve given content corresponding to this address information and editor, could determine after having traveled through the code after all given contents and editor that this terminal does not preserve given content corresponding to this address information and the code after editing, consume the too much time.For this reason, this terminal can preserve the address information of this webpage in correspondence, during code after this given content and this editor, for this address information adds editor's mark, then this terminal can by judging whether this address information has editor's mark, determine whether the code after preserving given content corresponding to this address information and editor, when this address information have this editor identify time, this terminal travels through the given content of preservation and the code after editing again, obtain the code after given content corresponding to this address information and editor, and when this address information does not have editor's mark, this terminal is without the need to the given content of traversal preservation and the code after editing, direct execution step 211, avoid unnecessary traversing operation, save the time.
It should be noted that, absolute sequential relationship is not had between this step 208 and this step 207, this step 208 can perform before this step 207, execution after this step 207, or perform with this step 207, this step 208 and this step 207 only need perform after this step 206 simultaneously.
In step 209, code corresponding for this given content is replaced with the code after this editor by this terminal in the code of this webpage, obtains the web page code after replacing.
When this terminal has preserved the code after given content corresponding to this address information and editor, when code corresponding for this given content being replaced with the code after this editor in the code of this webpage, can in the process performing the web page code after replacing, perform the code after this editor, thus the given content when showing this webpage after instant playback editor.
In step 210, this terminal, based on the web page code after replacement, shows this webpage, terminates.
In step 211, this terminal, based on the code of this webpage, shows this webpage.When this terminal does not preserve the code after given content corresponding to this address information and editor, without the need to carrying out the replacement of web page code, the code directly based on this webpage shows this webpage.
It should be noted that, in step 205, this terminal by this address information, this given content is corresponding with the code after this editor preserves in the terminal, then in step 206-210, for the webpage of once edited given content, this terminal can show the given content after editing when showing this webpage.And in actual application, in order to the editing operation of unified management user in different terminals, realize the given content after all editor can being shown when showing this webpage in different terminals, this terminal can also by this address information, this given content is corresponding with the code after this editor is kept in synchronization server, this synchronization server is used for corresponding address information, the code after given content and editor of preserving webpage.
Accordingly, in another embodiment that the present embodiment provides, using above-mentioned terminal as first terminal, this step 205-211 can be replaced by following steps 212-218:
212, this first terminal obtains the address information of this webpage, based on current user ID, sends the code after this address information, this given content and this editor to this synchronization server.
Wherein, registering under the account mechanism that this user ID provides at this synchronization server, can be user account, user's pet name etc.This first terminal can log in this synchronization server based on the user ID of user's input, or user bound identifies in advance, and the user ID directly based on binding logs in this synchronization server.When logining successfully, this first terminal can send information based on this user ID to this server.
When this first terminal gets the address information of this webpage, based on this user ID, send the code after this address information, this given content and this editor to this synchronization server, so as by this user ID, this address information, this given content is corresponding with the code after this editor is kept in this synchronization server.
213, the code after this this user ID of synchronization server correspondence preservation, this address information, this given content and this editor.
For each user ID, this synchronization server correspondingly can preserve the address information of the different web pages corresponding to this user ID, given content and the code after editing, then when user is based on identical user ID, when different terminals triggers the editing operation to the given content of webpage, this synchronization server correspondence preserves this user ID, the address information of this webpage, code after this given content and this editor, make based on this user ID any terminal all can show this webpage time, based on the code after this editor, given content after display editor, and the terminal at place when user triggers this editing operation need not be defined in.
214, the second terminal obtains web displaying operation, and the address information of this webpage is carried in the operation of this web displaying, according to this address information, obtains the code of this webpage.Wherein, this second terminal and this first terminal can be same terminal, and can be also different terminals, the present embodiment limit this.
215, this second terminal is based on this user ID, sends this address information to this synchronization server.
216, this synchronization server judges whether to preserve the code after this user ID and given content corresponding to this address information and editor, if, return the code after this user ID given content corresponding with this address information and editor, if not, return acquisition failed message.
217, when this second terminal receives the code after this user ID and given content corresponding to this address information and editor, in the code of this webpage, code corresponding for this given content is replaced with the code after this editor, obtain the web page code after replacing, based on the web page code after replacement, show this webpage.
When this second terminal receives the code after this user ID given content corresponding with this address information and editor, show user's once this given content edited, then code corresponding for this given content is replaced with the code after this editor by this second terminal in the code of this webpage, obtain the web page code after replacing, based on the web page code after replacement, show this webpage.
218, when this second terminal receives acquisition failed message, based on the code of this webpage, this webpage is shown.
When this second terminal receives this acquisition failed message, show the code after not preserving this user ID given content corresponding with this address information and editor in this synchronization server, user may web page contents in this webpage not edited, then this second terminal is directly based on the code of this webpage, shows this webpage.
It should be noted that, above-mentioned code server, web page server and synchronization server can be same server, or the different server in same server cluster, and the present embodiment does not limit this.
The method that the embodiment of the present invention provides, achieves in the web page to the function that given content is edited, with strong points, and without the need to this given content is copied to editing machine, also without the need to carrying out format conversion to this webpage, avoiding typesetting confusion, simplifying operation.Preserve the code after the address information of this webpage, this given content and this editor by correspondence, the editing operation of user to this given content can be retained, the given content after this editor of instant playback.Further, by the code preserved after user ID, the address information of webpage, given content and editor corresponding in synchronization server, be convenient to the editing operation of unified management user in different terminals, achieve the synchronous of editing operation.
Fig. 7 is a kind of web page editing device schematic diagram according to an exemplary embodiment, and with reference to Fig. 7, this device comprises editing operation acquisition module 701, edit code module 702 and display module 703.
When this editing operation acquisition module 701 is configured in display web page, obtain the editing operation to given content in this webpage;
This edit code module 702 is configured to for according to this editing operation, and the code corresponding to this given content is edited, and obtains the code after editor corresponding to this given content;
This display module 703 is configured to, for based on the code after this editor, show the given content after editor.
This edit code module 702 comprises:
Code obtaining unit, preset corresponding relation for basis, obtain the operation code that this editing operation is corresponding, this default corresponding relation comprises the corresponding relation between editing operation and operation code;
Adding code unit, for operation code corresponding for this editing operation being added in code corresponding to this given content, obtaining the code after this editor.
This device also comprises:
Address information acquisition module, for obtaining the address information of this webpage;
Preserve module, preserve the code after this address information, this given content and this editor for correspondence.
This device also comprises:
First display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in the operation of this web displaying;
First web page code acquisition module, for according to this address information, obtains the code of this webpage;
First judge module, for judging whether the code after preserving given content corresponding to this address information and editor;
First replaces code module, for when preserving the code after given content corresponding to this address information and editor, in the code of this webpage, code corresponding for this given content is replaced with the code after this editor, obtains the web page code after replacing;
First replaces display module, for based on the web page code after replacement, shows this webpage.
This device also comprises:
Sending module, for based on current user ID, sends the code after this address information, this given content and this editor to server, and this server is used for the code after corresponding this user ID of preservation, this address information, this given content and this editor.
This device also comprises:
Second display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in the operation of this web displaying;
Second web page code acquisition module, for according to this address information, obtains the code of this webpage;
Address sending module, for based on current user ID, this address information is sent to this server, this server is for judging whether the code after preserving this user ID given content corresponding with this address information and editor, if so, the code after this user ID given content corresponding with this address information and editor is returned;
Second replaces code module, for code corresponding for this given content being replaced with the code after this editor in the code of this webpage, obtains the web page code after replacing;
Second replaces display module, for based on the web page code after replacement, shows this webpage.
The device that the present embodiment provides, by obtaining the editing operation to given content in this webpage, and according to this editing operation, the code corresponding to this given content is edited, obtain the code after editor corresponding to this given content, with based on the code after this editor, given content after display editor, achieve in the web page to the function that given content is edited, with strong points, further, without the need to this given content is copied to editing machine, also without the need to carrying out format conversion to this webpage, avoiding typesetting confusion, simplifying operation.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
It should be noted that: the web page editing device that above-described embodiment provides is when editing webpage, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by terminal is divided into different functional modules, to complete all or part of function described above.In addition, the web page editing device that above-described embodiment provides and page authoring method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
Fig. 8 is the block diagram of a kind of device 800 for web page editing according to an exemplary embodiment.Such as, device 800 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 8, device 800 can comprise following one or more assembly: processing components 802, storer 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of I/O (I/O), sensor module 814, and communications component 816.
The integrated operation of the usual control device 800 of processing components 802, such as with display, call, data communication, camera operation and record operate the operation be associated.Treatment element 802 can comprise one or more processor 820 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 802 can comprise one or more module, and what be convenient between processing components 802 and other assemblies is mutual.Such as, processing element 802 can comprise multi-media module, mutual with what facilitate between multimedia groupware 808 and processing components 802.
Storer 804 is configured to store various types of data to be supported in the operation of equipment 800.The example of these data comprises for any application program of operation on device 800 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 804 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read-only memory (prom), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that electric power assembly 806 is device 800 provide electric power.Electric power assembly 806 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 800 and be associated.
Multimedia groupware 808 is included in the screen providing an output interface between this device 800 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.This touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to this touch or slide and pressure.In certain embodiments, multimedia groupware 808 comprises a front-facing camera and/or post-positioned pick-up head.When equipment 800 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 810 is configured to export and/or input audio signal.Such as, audio-frequency assembly 810 comprises a microphone (MIC), and when device 800 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 804 further or be sent via communications component 816.In certain embodiments, audio-frequency assembly 810 also comprises a loudspeaker, for output audio signal.
I/O interface 812 is for providing interface between processing components 802 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 814 comprises one or more sensor, for providing the state estimation of various aspects for device 800.Such as, sensor module 814 can detect the opening/closing state of equipment 800, the relative positioning of assembly, such as this assembly is display and the keypad of device 800, the position of all right pick-up unit 800 of sensor module 814 or device 800 1 assemblies changes, the presence or absence that user contacts with device 800, the temperature variation of device 800 orientation or acceleration/deceleration and device 800.Sensor module 814 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 814 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 814 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 816 is configured to the communication being convenient to wired or wireless mode between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communication component 816 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, this communication component 816 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 800 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 804 of instruction, above-mentioned instruction can perform said method by the processor 820 of device 800.Such as, this non-transitory computer-readable recording medium can be ROM, random-access memory (ram), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in this storage medium is performed by the processor of mobile terminal, make mobile terminal can perform a kind of page authoring method, the method comprises:
When display web page, obtain the editing operation to given content in this webpage;
According to this editing operation, the code corresponding to this given content is edited, and obtains the code after editor corresponding to this given content;
Based on the code after this editor, the given content after display editor.
According to this editing operation, the code corresponding to this given content is edited, and the code obtained after editor corresponding to this given content comprises:
According to default corresponding relation, obtain the operation code that this editing operation is corresponding, this default corresponding relation comprises the corresponding relation between editing operation and operation code;
Operation code corresponding for this editing operation is added in code corresponding to this given content, obtains the code after this editor.
According to this editing operation, the code corresponding to this given content is edited, and after obtaining the code after editor corresponding to this given content, the method also comprises:
Obtain the address information of this webpage;
Code after corresponding this address information of preservation, this given content and this editor.
The method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in the operation of this web displaying;
According to this address information, obtain the code of this webpage;
Judge whether the code after preserving given content corresponding to this address information and editor;
When preserving the code after given content corresponding to this address information and editor, in the code of this webpage, code corresponding for this given content being replaced with the code after this editor, obtaining the web page code after replacing;
Based on the web page code after replacement, show this webpage.
After obtaining the address information of this webpage, the method also comprises:
Based on current user ID, send the code after this address information, this given content and this editor to server, this server is used for the code after corresponding this user ID of preservation, this address information, this given content and this editor.
The method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in the operation of this web displaying;
According to this address information, obtain the code of this webpage;
Based on current user ID, this address information is sent to this server, this server is for judging whether the code after preserving this user ID given content corresponding with this address information and editor, if so, the code after this user ID given content corresponding with this address information and editor is returned;
In the code of this webpage, code corresponding for this given content is replaced with the code after this editor, obtain the web page code after replacing;
Based on the web page code after replacement, show this webpage.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim.
Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (13)

1. a page authoring method, is characterized in that, described method comprises:
When display web page, obtain the editing operation to given content in described webpage;
According to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Based on the code after described editor, the given content after display editor.
2. method according to claim 1, is characterized in that, according to described editing operation, the code corresponding to described given content is edited, and the code obtained after editor corresponding to described given content comprises:
According to default corresponding relation, obtain the operation code that described editing operation is corresponding, described default corresponding relation comprises the corresponding relation between editing operation and operation code;
Operation code corresponding for described editing operation is added in code corresponding to described given content, obtains the code after described editor.
3. method according to claim 1, is characterized in that, according to described editing operation, the code corresponding to described given content is edited, and after obtaining the code after editor corresponding to described given content, described method also comprises:
Obtain the address information of described webpage;
Code after the described address information of corresponding preservation, described given content and described editor.
4. method according to claim 3, is characterized in that, described method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in described web displaying operation;
According to described address information, obtain the code of described webpage;
Judge whether the code after preserving given content corresponding to described address information and editor;
When preserving the code after given content corresponding to described address information and editor, in the code of described webpage, code corresponding for described given content being replaced with the code after described editor, obtaining the web page code after replacing;
Based on the web page code after replacement, show described webpage.
5. method according to claim 3, is characterized in that, after obtaining the address information of described webpage, described method also comprises:
Based on current user ID, send the code after described address information, described given content and described editor to server, described server is used for the code after the described user ID of corresponding preservation, described address information, described given content and described editor.
6. method according to claim 5, is characterized in that, described method also comprises:
Acquisition web displaying operates, and the address information of webpage to be shown is carried in described web displaying operation;
According to described address information, obtain the code of described webpage;
Based on current user ID, described address information is sent to described server, described server is for judging whether to preserve the code after described user ID and given content corresponding to described address information and editor, if so, the code after described user ID and given content corresponding to described address information and editor is returned;
In the code of described webpage, code corresponding for described given content is replaced with the code after described editor, obtain the web page code after replacing;
Based on the web page code after replacement, show described webpage.
7. a web page editing device, is characterized in that, described device comprises:
Editing operation acquisition module, for when display web page, obtains the editing operation to given content in described webpage;
Edit code module, for according to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Display module, for based on the code after described editor, shows the given content after editor.
8. device according to claim 7, is characterized in that, described edit code module comprises:
Code obtaining unit, preset corresponding relation for basis, obtain the operation code that described editing operation is corresponding, described default corresponding relation comprises the corresponding relation between editing operation and operation code;
Adding code unit, for operation code corresponding for described editing operation being added in code corresponding to described given content, obtaining the code after described editor.
9. device according to claim 7, is characterized in that, described device also comprises:
Address information acquisition module, for obtaining the address information of described webpage;
Preserve module, preserve the code after described address information, described given content and described editor for correspondence.
10. device according to claim 9, is characterized in that, described device also comprises:
First display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in described web displaying operation;
First web page code acquisition module, for according to described address information, obtains the code of described webpage;
First judge module, for judging whether the code after preserving given content corresponding to described address information and editor;
First replaces code module, for when preserving the code after given content corresponding to described address information and editor, in the code of described webpage, code corresponding for described given content is replaced with the code after described editor, obtains the web page code after replacing;
First replaces display module, for based on the web page code after replacement, shows described webpage.
11. devices according to claim 9, is characterized in that, described device also comprises:
Sending module, for based on current user ID, send the code after described address information, described given content and described editor to server, described server is used for the code after the described user ID of corresponding preservation, described address information, described given content and described editor.
12. devices according to claim 11, is characterized in that, described device also comprises:
Second display operation acquisition module, for obtaining web displaying operation, the address information of webpage to be shown is carried in described web displaying operation;
Second web page code acquisition module, for according to described address information, obtains the code of described webpage;
Address sending module, for based on current user ID, described address information is sent to described server, described server is for judging whether to preserve the code after described user ID and given content corresponding to described address information and editor, if so, the code after described user ID and given content corresponding to described address information and editor is returned;
Second replaces code module, for code corresponding for described given content being replaced with the code after described editor in the code of described webpage, obtains the web page code after replacing;
Second replaces display module, for based on the web page code after replacement, shows described webpage.
13. 1 kinds of web page editing devices, is characterized in that, comprising:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
When display web page, obtain the editing operation to given content in described webpage;
According to described editing operation, the code corresponding to described given content is edited, and obtains the code after editor corresponding to described given content;
Based on the code after described editor, the given content after display editor.
CN201410160635.8A 2014-04-21 2014-04-21 Web page editing method and device Pending CN105095163A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410160635.8A CN105095163A (en) 2014-04-21 2014-04-21 Web page editing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410160635.8A CN105095163A (en) 2014-04-21 2014-04-21 Web page editing method and device

Publications (1)

Publication Number Publication Date
CN105095163A true CN105095163A (en) 2015-11-25

Family

ID=54575640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410160635.8A Pending CN105095163A (en) 2014-04-21 2014-04-21 Web page editing method and device

Country Status (1)

Country Link
CN (1) CN105095163A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090734A (en) * 2017-12-12 2018-05-29 深圳市买买提信息科技有限公司 User role matching process and device
CN108399217A (en) * 2018-02-07 2018-08-14 广州阿里巴巴文学信息技术有限公司 view display processing method, device and mobile terminal device
CN110045955A (en) * 2018-01-17 2019-07-23 北京视联动力国际信息技术有限公司 A kind of edit methods and device
CN110083790A (en) * 2019-04-30 2019-08-02 珠海随变科技有限公司 Page editing method, page output method, device, computer equipment and medium
CN111191176A (en) * 2019-12-24 2020-05-22 腾讯云计算(北京)有限责任公司 Website content updating method, device, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783085A (en) * 2004-12-02 2006-06-07 国际商业机器公司 Web page authoring apparatus, web page authoring method and program
CN103207869A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Webpage maintenance method, system and platform
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1783085A (en) * 2004-12-02 2006-06-07 国际商业机器公司 Web page authoring apparatus, web page authoring method and program
CN103207869A (en) * 2012-01-16 2013-07-17 腾讯科技(深圳)有限公司 Webpage maintenance method, system and platform
CN103577171A (en) * 2012-07-30 2014-02-12 腾讯科技(深圳)有限公司 Webpage content displaying method and mobile terminal

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090734A (en) * 2017-12-12 2018-05-29 深圳市买买提信息科技有限公司 User role matching process and device
CN110045955A (en) * 2018-01-17 2019-07-23 北京视联动力国际信息技术有限公司 A kind of edit methods and device
CN110045955B (en) * 2018-01-17 2022-10-18 视联动力信息技术股份有限公司 Editing method and device
CN108399217A (en) * 2018-02-07 2018-08-14 广州阿里巴巴文学信息技术有限公司 view display processing method, device and mobile terminal device
CN108399217B (en) * 2018-02-07 2020-11-06 阿里巴巴(中国)有限公司 View display processing method and device and mobile terminal equipment
CN110083790A (en) * 2019-04-30 2019-08-02 珠海随变科技有限公司 Page editing method, page output method, device, computer equipment and medium
CN111191176A (en) * 2019-12-24 2020-05-22 腾讯云计算(北京)有限责任公司 Website content updating method, device, terminal and storage medium
CN111191176B (en) * 2019-12-24 2023-04-07 腾讯云计算(北京)有限责任公司 Website content updating method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
JP7414842B2 (en) How to add comments and electronic devices
CN106569800B (en) Front-end interface generation method and device
CN106489129A (en) The method and device that a kind of content is shared
CN104375980A (en) Selection method and device for text content
CN105205133A (en) Information collection method and device
CN105095163A (en) Web page editing method and device
CN104679599A (en) Application program duplicating method and device
CN104915204A (en) Web processing method and device
CN105159524A (en) Interface display method and apparatus
CN104267877A (en) Display method and device of expression pictures and electronic device
CN104991916A (en) Webpage loading method and apparatus
CN104750793A (en) Method and device for generating page tables
CN104050266A (en) Recording method and device for user behaviors and webpage browser
KR20220028184A (en) Method and device for processing image in application, terminal device, and storage medium
CN105488145A (en) Webpage content display method and apparatus and terminal
CN104461348A (en) Method and device for selecting information
CN105786944A (en) Method and device for automatically turning pages of browser
CN104267881A (en) Toolbar operating method and device
CN104834433A (en) Method and device for editing text and terminal
CN104636170A (en) Application acquiring method and device and electronic device
CN104503690A (en) Arrangement method and device for application icons
CN104636164A (en) Generating method and device for starting page
CN105095360A (en) Method and device for processing user requests for browser
CN105224174A (en) The display packing of Paste and device
CN104536787A (en) Resource preloading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20151125

RJ01 Rejection of invention patent application after publication