CN101882075B - Method for editing rich text and for restoring and displaying rich text through FLASH - Google Patents

Method for editing rich text and for restoring and displaying rich text through FLASH Download PDF

Info

Publication number
CN101882075B
CN101882075B CN 201010134980 CN201010134980A CN101882075B CN 101882075 B CN101882075 B CN 101882075B CN 201010134980 CN201010134980 CN 201010134980 CN 201010134980 A CN201010134980 A CN 201010134980A CN 101882075 B CN101882075 B CN 101882075B
Authority
CN
China
Prior art keywords
text
picture
resource
flash
attribute information
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.)
Expired - Fee Related
Application number
CN 201010134980
Other languages
Chinese (zh)
Other versions
CN101882075A (en
Inventor
吴思然
李谋邦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wondershare Technology Co ltd
Original Assignee
SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY Co Ltd filed Critical SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY Co Ltd
Priority to CN 201010134980 priority Critical patent/CN101882075B/en
Publication of CN101882075A publication Critical patent/CN101882075A/en
Application granted granted Critical
Publication of CN101882075B publication Critical patent/CN101882075B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for editing rich text and for restoring and displaying the rich text through FLASH, which comprises the following steps that: S1. an editor is used for visually editing a picture and text message and for storing the picture and text message as an RTF document; S2. the RTF document is transformed to an HTML code and a data resource; S3. the HTML code and the data source are used for restoring the picture and text message in FLASH. The picture and text message can be simply, conveniently and visually edited through the editor, and the effect when editing the picture and text can be restored in FLASH, so completely-dislocated problem of the pictures when displaying the pictures and texts through the FLASH software can be solved.

Description

A kind ofly edit rich text and reduce by FLASH the method that shows
Technical field
The present invention relates to software technology field, more particularly, relate to and a kind ofly edit rich text and reduce by FLASH the method that shows.
Background technology
FLASH is a kind of 2 D animation design software.SWF (shock wave flash) is the professional format of the animation software FLASH of Macromedia company, it is the animation file form of a kind of support vector and dot pattern, be widely used in webpage design, the fields such as cartoon making, the SWF file is also referred to as the FLASH file usually.
Yet when FLASH software showed graph-text content at the assemblies such as TextField by itself, Image Display easily misplaced, the effect that presents in the time of can't obtaining editing.Therefore, be necessary to provide a kind of method that can edit and show by FLASH in the mode that both pictures and texts are excellent.
Summary of the invention
The technical problem to be solved in the present invention is, can not show for existing FLASH software the defective that graph-text content easily misplaces, and provides a kind of and edits rich text and reduce by FLASH the method that shows.
The technical solution adopted for the present invention to solve the technical problems is: construct and a kind ofly edit rich text and reduce by FLASH the method that shows, comprise the following steps:
S1, by editing machine, graph text information is carried out visual edit, and save as the RTF document;
S2, the RTF document is changed into HTML code and data resource;
S3, the above-mentioned HTML code of use and data resource reduce in FLASH and show graph text information.
In method of the present invention, described step S2 further comprises:
S21, obtain in the RTF document that all ole object elements change into picture and attribute information is saved in a sequential chained list;
S22, obtain all the character object element property information of paragraph in the RTF document, merge together with above-mentioned ole object attribute of an element information and be saved in described sequential chained list;
The element node attribute information of S23, the above-mentioned sequential chained list of analysis resolves into text filed regional with hyperlink;
S24, the text filed element node attribute information of analysis generate corresponding code;
S25, the regional element node of analysis hyperlink attribute information generate corresponding code.
In method of the present invention, described step S24 further comprises:
S241, the text filed element node attribute information of analysis, the text or the ole object that resolve into like attribute are regional;
The text element node attribute information of S242, analysis like attribute generates corresponding code;
S243, analyze the element node attribute information in ole object zone, generate corresponding code.
In method of the present invention, described step S25 further comprises:
S251, the regional element node of analysis hyperlink attribute information obtain the hyperlink part and show textual portions;
S252, obtain the URL of hyperlink;
S253, described demonstration textual portions is changed, generated corresponding code;
The URL of S254, the above-mentioned hyperlink of assembling and demonstration text codes.
In method of the present invention, described step S3 further comprises:
S31, load the HTML code file with text mode in Flash, and it is changed into XML class data structure preserve;
S32, analyzing XML class data are distinguished resource data and resource organizations's data;
S33, according to the picture resource address and the ID that record in XML, the resource that Loads Image is also preserved, and carries out simultaneously the ID judgement, and the resource that loaded is shared;
S34, resolving resource organising data resolve into textual portions with it and picture partly is the array of first primitive unit cell, resolve simultaneously segment data;
S35, parse the sign of each text element in pairing picture and text array;
S36, hide sample text and show test;
S37, circulation shows the element in the picture and text array one by one, and carries out segmentation according to segment data, until shown all elements;
S38, the element after showing is carried out an arrangement optimization complete picture and text and show.
In method of the present invention, described step S35 is specially: show text and picture according to the restriction of width, with the hidden text frame, text is shown in advance, adjust width and line feed; Determine whether being connected on according to the width of remaining width and picture and show after text or line feed shows.
Implement editor's rich text of the present invention and reduce by FLASH the method that shows, have following beneficial effect: the present invention can carry out visual edit to graph text information simply and easily by editing machine, and can reduce the effect that presents when video text editing in FLASH, solved the FLASH software problem that picture misplaces fully when picture and text show.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in accompanying drawing:
Fig. 1 is the method flow diagram in the preferred embodiment of the present invention;
Fig. 2 is with the particular flow sheet of RTF document converting to HTML code and data resource in the preferred embodiment of the present invention;
Fig. 3 analyzes the particular flow sheet of the corresponding code of text filed generation in the preferred embodiment of the present invention;
Fig. 4 is the particular flow sheet of analyzing the corresponding code of hyperlink zone generation in the preferred embodiment of the present invention;
Fig. 5 be in the preferred embodiment of the present invention in FLASH reduction show the process flow diagram of graph text information.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.
The present invention mainly provides a kind of and has edited rich text and reduce by FLASH the method that shows, it is mainly to provide a video text editing device in client, allow user's content of edit, and content is saved as the rich text format file, when needs issue this document content, can convert the RTF document that both pictures and texts are excellent to associated data files and resource file, and load data reduction graph-text content in FLASH.By this technology, make the user can be as in using board when content of edit, What You See Is What You Get editor graph-text content generates the FLASH format file at last.The RTF that adopts in this process is a kind of rich text format file, and Chinese translation claims again rich text format or rich text form etc.It is also the WordPad accepted standard form of Microsoft simultaneously.The RTF file is a kind of file of similar DOC form, and good compatibility is arranged, and uses " board " in Windows " annex " just can open the edlin of going forward side by side.The RTF document can be used for carrying out the transmission of formatted text document between different application.
The below is described specific implementation process of the present invention.
See also Fig. 1, be the method flow diagram in the preferred embodiment of the present invention.As shown in Figure 1, method provided by the invention mainly comprises the following steps:
At first in step S1, by editing machine, graph text information is carried out visual edit, and save as the RTF document.For example at RichEdit control inediting graph text information, and save as the RTF file.
In step S2, the RTF document is changed into HTML code and data resource subsequently.
At last, in step S3, use above-mentioned HTML code and data resource to reduce in FLASH and show graph text information.
See also Fig. 2, for the present invention is with the particular flow sheet of RTF document converting to HTML code and data resource in the preferred embodiment of the present invention.As shown in Figure 2, above-mentioned steps S2 further realizes by following scheme:
In step S21, obtain in the RTF document that all ole object elements change into picture and attribute information is saved in a sequential chained list.For example, analyze the ole object element in MSFTEdit.dll, it is changed into corresponding picture and attribute information, be saved in and form OLEObjects in sequential chained list.In this step, can also carry out CRC32 to the pictorial information resource and calculate, optimize identical resource and only preserve portion, to reduce the overall data amount.
In step S22, obtain all character object element property information of paragraph in the RTF document, merge to be saved in described sequential chained list together with above-mentioned ole object attribute of an element information and form MSFTObjects.
In step S23, analyze the element node attribute information of above-mentioned sequential chained list, resolve into text filed (Txt2Html) and hyperlink zone (HyperLink2Html).
In step S24, analyze text filed element node attribute information, generate corresponding code.
In step S25, analyze the regional element node of hyperlink attribute information, generate corresponding code.
See also Fig. 3, for analyzing the particular flow sheet of the corresponding code of text filed generation in the preferred embodiment of the present invention.As shown in Figure 3, in above-mentioned steps S2, step S24 can further realize by the following method: in step S241, analyze text filed element node attribute information, the text or the ole object that resolve into like attribute are regional.In step S242, analyze the text fragments element node attribute information of like attribute, generate corresponding code (as Words2Html).In step S243, analyze the element node attribute information in ole object zone, generate corresponding code (as OLE2Html).
See also Fig. 4, for analyzing the particular flow sheet of the corresponding code of hyperlink zone generation in the preferred embodiment of the present invention.As shown in Figure 4, in above-mentioned steps S2, step S25 can further realize by the following method: in step S251, analyze the regional element node of hyperlink attribute information, obtain the hyperlink part and show textual portions.In step S252, obtain the URL of hyperlink.In step S253, described demonstration textual portions is changed, generate corresponding code (as Txt2Html).In step S254, the URL of the above-mentioned hyperlink of assembling and demonstration text codes.Step S25 can carry out simultaneously with step S24.
See also Fig. 5, for reduce the process flow diagram that shows graph text information in the preferred embodiment of the present invention in FLASH.As shown in Figure 5, in said method of the present invention, step S3 further can realize by following steps:
In step S31, load the HTML code file with text mode in Flash, and it is changed into the preservation of XML class data structure.
In step S32, analyzing XML class data are distinguished resource data and resource organizations's data.
In step S33, according to the picture resource address and the ID that record in XML, the resource that Loads Image is also preserved, and carries out simultaneously the ID judgement, and the resource that loaded is shared.
In step S34, the resolving resource organising data resolves into textual portions with it and picture partly is the array of first primitive unit cell, resolves simultaneously segment data.
In step S35, parse the sign of each text element in pairing picture and text array, so that follow-up demonstration one by one.
In step S36, hide sample text and show test.Mainly the restriction according to width shows text and picture, with the hidden text frame, text is shown in advance, adjusts width and line feed; Determine whether being connected on according to the width of remaining width and picture and show after text or line feed shows.
In step S37, circulation shows the element in the picture and text array one by one, and carries out segmentation according to segment data, until shown all elements.
In step S38, the element after showing is carried out arrangement optimization one time, and calculate width and the height of viewing area, show thereby complete picture and text all reduction work of completing.
In sum, the present invention can carry out visual edit to graph text information simply and easily by editing machine, and can reduce the effect that presents when video text editing in FLASH, has solved the FLASH software problem that picture misplaces fully when picture and text show.
The present invention is described according to specific embodiment, but it will be understood by those skilled in the art that when not breaking away from the scope of the invention, can carry out various variations and be equal to replacement.In addition, for adapting to specific occasion or the material of the technology of the present invention, can carry out many modifications and not break away from its protection domain the present invention.Therefore, the present invention is not limited to specific embodiment disclosed herein, and comprises that all drop into the embodiment of claim protection domain.

Claims (1)

1. edit rich text and reduce by FLASH the method that shows for one kind, it is characterized in that, comprise the following steps:
S1, by editing machine, the graph text information in rich text is carried out visual edit, and save as the RTF document;
S2, the RTF document is changed into HTML code and data resource;
S3, the above-mentioned HTML code of use and data resource reduce in FLASH and show graph text information; Wherein:
Described step S2 further comprises:
S21, obtain all ole object elements in the RTF document, and the ole object element is changed into picture and attribute information is saved in a sequential chained list;
S22, obtain all the character object element property information of paragraph in the RTF document, merge together with above-mentioned ole object attribute of an element information and be saved in described sequential chained list;
The element node attribute information of S23, the above-mentioned sequential chained list of analysis resolves into text filed regional with hyperlink;
S24, the text filed element node attribute information of analysis generate corresponding code;
S25, the regional element node of analysis hyperlink attribute information generate corresponding code;
Described step S24 further comprises:
S241, the text filed element node attribute information of analysis, the text or the ole object that resolve into like attribute are regional;
The text element node attribute information of S242, analysis like attribute generates corresponding code;
S243, analyze the element node attribute information in ole object zone, generate corresponding code;
Described step S25 further comprises:
S251, the regional element node of analysis hyperlink attribute information obtain the hyperlink part and show textual portions;
S252, obtain the URL of hyperlink;
S253, described demonstration textual portions is changed, generated corresponding code;
The URL of S254, the above-mentioned hyperlink of assembling and demonstration text codes;
Described step S3 further comprises:
S31, load the HTML code file with text mode in Flash, and it is changed into XML class data structure preserve;
S32, analyzing XML class data are distinguished resource data and resource organizations's data;
S33, according to the picture resource address and the ID that record in XML, the resource that Loads Image is also preserved, and carries out simultaneously the ID judgement, and the resource that loaded is shared;
S34, resolving resource organising data resolve into textual portions with it and picture partly is the array of first primitive unit cell, resolve simultaneously segment data;
S35, parse pairing and resolve into textual portions and picture in described step S34 and partly be the sign of each text element in the array of first primitive unit cell;
S36, show text and picture according to the restriction of width, with the hidden text frame, text is shown in advance, adjust width and line feed; Decide picture whether to be connected on to show after text or line feed shows according to the width of remaining width and picture;
S37, circulation shows the element in the picture and text array one by one, and carries out segmentation according to segment data, until shown all elements;
S38, the element after showing is carried out an arrangement optimization complete picture and text and show.
CN 201010134980 2010-03-24 2010-03-24 Method for editing rich text and for restoring and displaying rich text through FLASH Expired - Fee Related CN101882075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010134980 CN101882075B (en) 2010-03-24 2010-03-24 Method for editing rich text and for restoring and displaying rich text through FLASH

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010134980 CN101882075B (en) 2010-03-24 2010-03-24 Method for editing rich text and for restoring and displaying rich text through FLASH

Publications (2)

Publication Number Publication Date
CN101882075A CN101882075A (en) 2010-11-10
CN101882075B true CN101882075B (en) 2013-06-12

Family

ID=43054095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010134980 Expired - Fee Related CN101882075B (en) 2010-03-24 2010-03-24 Method for editing rich text and for restoring and displaying rich text through FLASH

Country Status (1)

Country Link
CN (1) CN101882075B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9171098B2 (en) * 2011-09-30 2015-10-27 Microsoft Technology Licensing, Llc Decomposing markup language elements for animation
CN102662928A (en) * 2012-03-28 2012-09-12 福建榕基软件股份有限公司 Rich text editing method for importing documents and device thereof
CN102708160A (en) * 2012-04-24 2012-10-03 深圳供电局有限公司 Question bank establishing method and device
CN103034700B (en) * 2012-12-05 2016-06-29 北京奇虎科技有限公司 The processing method of rich text content and system
CN103034622B (en) * 2012-12-05 2016-06-29 北京奇虎科技有限公司 The processing method of rich text content and server
CN104516927B (en) * 2013-09-30 2017-09-12 腾讯科技(深圳)有限公司 Document processing method, device and terminal
CN105306233B (en) 2014-06-19 2021-01-22 中兴通讯股份有限公司 Terminal management method and system, server and terminal
CN106846444B (en) * 2017-04-07 2020-09-01 成都东珑科技有限公司 Animation production system and method
CN108874379B (en) * 2017-05-10 2022-01-25 北京国双科技有限公司 Page processing method and device
CN111913703B (en) * 2019-05-07 2024-04-12 阿里巴巴集团控股有限公司 Object editing method, device, electronic equipment and readable storage medium
CN111274760B (en) * 2020-01-09 2023-07-18 抖音视界有限公司 Rich text data processing method and device, electronic equipment and computer storage medium
CN113778236B (en) * 2021-08-23 2024-01-09 百融至信(北京)科技有限公司 Method and system for realizing emphasis function of rich text editor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860073A (en) * 1995-07-17 1999-01-12 Microsoft Corporation Style sheets for publishing system
CN1808436A (en) * 2006-02-13 2006-07-26 无锡永中科技有限公司 Object memory store based custom object processing method
CN101169786A (en) * 2007-11-23 2008-04-30 中兴通讯股份有限公司 Walkthrough method for web application page picture and page jump
CN101539910A (en) * 2009-01-15 2009-09-23 传神联合(北京)信息技术有限公司 A sentence taking method for computer aided translation and system thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860073A (en) * 1995-07-17 1999-01-12 Microsoft Corporation Style sheets for publishing system
CN1808436A (en) * 2006-02-13 2006-07-26 无锡永中科技有限公司 Object memory store based custom object processing method
CN101169786A (en) * 2007-11-23 2008-04-30 中兴通讯股份有限公司 Walkthrough method for web application page picture and page jump
CN101539910A (en) * 2009-01-15 2009-09-23 传神联合(北京)信息技术有限公司 A sentence taking method for computer aided translation and system thereof

Also Published As

Publication number Publication date
CN101882075A (en) 2010-11-10

Similar Documents

Publication Publication Date Title
CN101882075B (en) Method for editing rich text and for restoring and displaying rich text through FLASH
CN111259644B (en) Rich text processing method, editor, equipment and storage medium
US9628296B2 (en) Fast mobile mail with context indicators
CN102750148B (en) A kind of media information display method and device
US20130238975A1 (en) Off-line presentation of web content
US10452747B2 (en) Dynamically formatting scalable vector graphics
AU2006295278A1 (en) Integrating charts in documents
JP6975339B2 (en) Backdrop rendering of digital components
CN107656941A (en) Document analysis method, apparatus and editor
CN106294493A (en) Realize the method and device of document format conversion
CN108268260A (en) It is a kind of quick micro- using assemble method based on integrated support technology
JP2015521773A (en) Web page display method and apparatus used for portable information terminal
CN104462516A (en) Information prompt method and mobile terminal
CN104081432A (en) Graphical view of social content streams
CN101650739A (en) Method for system for interface of wep page
CN106648349B (en) Information display method and device
CN103793229B (en) A kind of templating digital publishing edit methods and system
CN117235019B (en) Method for generating new readable file by multi-file extraction combination
US10108592B1 (en) Methods and systems for chunking markup language documents containing style rules
CN115309476A (en) Browser-based ofd file display and editing method
KR20140137630A (en) Widget authoring system and method thereof
CN105653144A (en) Webpage-based hand input method and editor
KR101337982B1 (en) Method and apparatus for processing document of web page
JP6038269B1 (en) Program, display control method, and information processing apparatus
US10235347B1 (en) Systems and methods for managing adaptive electronic communications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road, room 9 building on the north side of block A901 No. 006 TCL Industry Research Institute building A A Building 8 floor

Applicant after: SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY Co.,Ltd.

Address before: Room 9, block A901 building on the north side of a building 518057 North TCL A of Guangdong Province, Shenzhen city Nanshan District South Road West ten high new technology

Applicant before: WONDERSHARE SOFTWARE Co.,Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SHENZHEN WONDERSHARE SOFTWARE CO., LTD. TO: SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 850000 Tibet autonomous region, Lhasa City, New District, west of the East Ring Road, 1-4 road to the north, south of 1-3 Road, Liu Dong building, east of the 8 unit 6, floor 2, No.

Patentee after: WONDERSHARE TECHNOLOGY CO.,LTD.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road, room 9 building on the north side of block A901 No. 006 TCL Industry Research Institute building A A Building 8 floor

Patentee before: SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130612

CF01 Termination of patent right due to non-payment of annual fee