Ejemplo n.º 1
0
        /// <summary>
        /// Creates the data type.
        /// </summary>
        public static void CreateDataType()
        {
            var editorSettings = RichTextPropertyEditorDefaultSettings.CreateDefaultPreValues();

            editorSettings.validators = new List <Validator>(editorSettings.validators)
            {
                new Validator()
                {
                    name = RichTextValidators.MaximumWordCount, max = 100
                }
            }.ToArray();

            RichTextDataTypeService.InsertDataType(DataTypeName, editorSettings);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates the data type.
        /// </summary>
        public static void CreateDataType()
        {
            var editorSettings = RichTextPropertyEditorDefaultSettings.CreateDefaultPreValues();

            editorSettings.validators = new List <Validator>(editorSettings.validators)
            {
                new Validator()
                {
                    name = RichTextValidators.OnlyContainsLinks
                }
            }.ToArray();

            RichTextDataTypeService.InsertDataType(DataTypeName, editorSettings);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates the data type.
        /// </summary>
        public static void CreateDataType()
        {
            var editorSettings = RichTextPropertyEditorDefaultSettings.CreateDefaultPreValues();

            var toolbar = new List<string>(editorSettings.toolbar);
            toolbar.Remove(TinyMceButtons.RemoveFormat);
            toolbar.Remove(TinyMceButtons.Bold);
            toolbar.Remove(TinyMceButtons.Numberedlist);
            toolbar.Remove(TinyMceButtons.BulletedList);
            editorSettings.toolbar = toolbar.ToArray();

            editorSettings.validators = new List<Validator>(editorSettings.validators)
            {
                new Validator(){ name = RichTextValidators.OnlyContainsLinks }
            }.ToArray();

            editorSettings.dimensions = new Dimensions()
            {
                height = 50
            };

            RichTextDataTypeService.InsertDataType(DataTypeName, editorSettings);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates the data type.
        /// </summary>
        public static void CreateDataType()
        {
            var editorSettings = RichTextPropertyEditorDefaultSettings.CreateDefaultPreValues();

            editorSettings.toolbar = new List <string>(editorSettings.toolbar)
            {
                TinyMceButtons.StyleSelect,
                TinyMceButtons.Table,
                TinyMceButtons.Blockquote
            }.ToArray();

            editorSettings.stylesheets = new List <string>(editorSettings.stylesheets)
            {
                RichTextPropertyEditorDefaultSettings.StylesheetHeadings,
                "TinyMCE-StyleSelector-Embed"
            }.ToArray();

            var validators = new List <Validator>(editorSettings.validators);

            validators.RemoveAll(val => val.name == RichTextValidators.DoNotLinkToDocuments);
            editorSettings.validators = validators.ToArray();

            RichTextDataTypeService.InsertDataType(DataTypeName, editorSettings);
        }