Documentation > CMS Template API Library > Input > ShowWysiwyg(String,String,WysiwygParams,String,Int32,Int32,String,String,String)

ShowWysiwyg

Shows the WYSIWYG control.

public System.Void ShowWysiwyg(String,String,WysiwygParams,String,Int32,Int32,String,String,String)

Parameters

NameDescriptionType
label The label of the field when displayed. System.String
fieldName The field name where the value will be stored. System.String
wysiwygParams Used to customize what buttons and features appear. CrownPeak.CMSAPI.WysiwygParams
defaultValue Optional: The default value. System.String
width Optional: The width of the control in pixels. Defaults to 500. System.Int32
height Optional: The height of the control in pixels. Defaults to 400. System.Int32
bodybackground Optional: Background color, in web color format '#ffffff'. System.String
helpMessage Optional: help message System.String
popupMessage Optional: The popup help message. System.String

Code Example

C#

Sample:

            WysiwygParams wParams = new WysiwygParams();
            wParams.Stylesheet = "/Assets/css/stylesheet.css";
            wParams.HtmlPasteOptions = Util.MakeList("cleanOption", "mergeInlineStylesOption", "plainTextOption");
            wParams.ImageFolder = "/";
            wParams.ImageUpload = RelationshipType.Attach;
            wParams.ImageBrowse = RelationshipType.Link;
            wParams.LinkFolder = "/";
            wParams.LinkUpload = RelationshipType.Attach;
            wParams.LinkBrowse = RelationshipType.Link;
            wParams.DesignEditTabs = true;
            wParams.AddButton(FeatureType.Separator);
            wParams.AddCutPasteGroup();
            wParams.AddLinkGroup();
            wParams.AddSimpleStyleGroup();
            wParams.AddJustifyGroup();
            wParams.AddListGroup( FeatureType.None );  //none is used to prevent separator from appearing after group
            wParams.AddButton(FeatureType.upload);
            wParams.AddButton(FeatureType.bold);
            wParams.AddButton(FeatureType.copy);
            wParams.AddColorGroup(FeatureType.None);
            Input.ShowWysiwyg("Main Section", "main_section", wParams, "", 600, 300, "#ffffff");
            
            	

Connect with Crownpeak