2

When I create a Site Column of Type Publishing HTML it becomes a NoteField. When I look at a system generated Site Column called Page Content, it is also of type Publishing HTMl however it gets created as a RichHTMLField.

How do I created a Column of Type Publishing HTML that uses template RichHTMLField?

*NoteField's do not give you the ability to use WYSIWYG editor functionality

2

Used PowerShell to create my columns the way I wanted.

Add-PSSnapIn "Microsoft.SharePoint.Powershell"
#Get the site collection and web object
$siteColl = Get-SPSite -Identity "http://sitecollectionURL.com"
$rootWeb = $siteColl.RootWeb

#Assign fieldXMLString variable with field XML for site column
$fieldXMLString = '<Field Type="HTML"
Name="htmlContentLeft"
Description="Publishing HTML column with Template RichHTMLText."
DisplayName="HTML Content Left"
StaticName="htmlContentLeft"
Group="_Custom"
RichText="TRUE" 
RichTextMode="FullHtml"
UnlimitedLengthInDocumentLibrary ="TRUE" 
Hidden="FALSE"
Required="FALSE"
Sealed="FALSE"
ShowInDisplayForm="TRUE"
ShowInEditForm="TRUE"
ShowInListSettings="TRUE"
ShowInNewForm="TRUE"></Field>'
#See field XML on console
write-host $fieldXMLString
#Create site column from XML string
$rootWeb.Fields.AddFieldAsXml($fieldXMLString) 

$siteColl.Dispose()
| improve this answer | |
  • I think though it would have just been making sure the publishing features were active, then a HTML column with constraints for publishing column would become available. – Eric Alexander Jul 21 '15 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.