PRB: Extra carriage return for a CMS posting is created from a Word Authoring Connector (822906)
The information in this article applies to:
- Microsoft Content Management Server 2002
SYMPTOMSIf you create Content Management Server content by using Microsoft Word Authoring Connector for Content Management Server (MCMS), when you insert a carriage return (when you press ENTER) in the Word document, MCMS converts the single carriage return (also known as a hard return) to double-spaced line spacing and inserts an extra carriage return. CAUSEWord uses inline styles to format documents. In this case, Word inserts the following Hypertext Markup Language (HTML) tag: As a result, an extra carriage return is added when the page is displayed in the browser. When you view the source code that is rendered for the browser (click View Source), a
paragraph tag (instead of a line break) is inserted in the text. The paragraph tag appears as follows: WORKAROUNDTo work around this behavior, follow these steps: - Start Visual Studio .NET IDE, and then open a Content Management Server 2002 Web project.
- Create a new Content Management Server template.
- In Template Explorer, create a new Template Gallery Item (TGI.)
- Associate the template ASPX file to a TGI Placeholder definition. Make sure that you select
a member of the OfficeHtmlPlaceHolderDefinition attribute for the TGI.
- In Microsoft Word, open a new document, and then save the file as Web page, filtered file type.
- In a text editor such as Notepad, open the file that you saved in the previous step.
- Copy the inline style definition from the file that you saved from Word, as shown in the following:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Generator" content="Microsoft Word 11 (filtered)">
<style>
@font-face { font-family: Tahoma; }
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
DIV.Section1 { page: Section1 }
</style> - Go back to the Content Management Server template HTML code editor. Paste the inline style definition as shown in the following:
<%@ Register TagPrefix="uc1" TagName="DefaultConsole" Src="../Console/DefaultConsole.ascx" %>
<%@ Page language="c#" Codebehind="WordTemplate.aspx.cs" AutoEventWireup="false" Inherits="WordAuthoringWeb.Templates.WordTemplate" %>
<%@ Register TagPrefix="cms" Namespace="Microsoft.ContentManagement.WebControls" Assembly="Microsoft.ContentManagement.WebControls, Version=5.0.1200.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WordTemplate</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<cms:RobotMetaTag runat="server" id="RobotMetaTag1"></cms:RobotMetaTag>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Generator" content="Microsoft Word 11 (filtered)">
<style>
@font-face { font-family: Tahoma; }
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
LI.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
DIV.MsoNormal { FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
DIV.Section1 { page: Section1 }
</style>
</HEAD> - In the template that you created in step 2, select htmPlaceholderControl. In the properties of htmPlacehoderControl, set PlaceholderToBind to the TGI that you defined in step 3.
- Compile the Content Management Server Web project.
- Create a posting from Word Authoring Connector.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/26/2004 |
---|
Keywords: | kbprb kbhowto KB822906 kbAudDeveloper |
---|
|