SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
ContentClasses/Elements/ITextHtml.cs
Go to the documentation of this file.
1 // SmartAPI - .Net programmatic access to RedDot servers
2 //
3 // Copyright (C) 2013 erminas GbR
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free Software Foundation,
7 // either version 3 of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 // See the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program.
14 // If not, see <http://www.gnu.org/licenses/>.
15 
16 using System;
17 using System.Xml;
18 using erminas.SmartAPI.CMS.Converter;
19 
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
21 {
22  [Flags]
23  public enum EditorSettings
24  {
25  NotSet = 0,
26  FontBold = 1,
27  FontItalic = 2,
28  FontUnderline = 4,
29  FontSize = 8,
30  FontFace = 16,
31  Superscript = 32,
32  Subscript = 64,
33  AlignLeft = 128,
34  AlignMiddle = 256,
35  AlignRight = 512,
36  InsertTab = 1024,
37  RemoveTab = 2048,
38  FontForeColor = 4096,
39  FontBackColor = 8192,
40  List = 16384,
41  InsertFormatted = 32768,
42  InsertTable = 65536,
43  InsertLink = 131072,
44  InsertJumpMark = 262144,
45  InsertImage = 524288,
46  DefineJumpMark = 1048576,
47  AlignJustify = 2097152,
48  InsertHorizontalLine = 4194304,
49  InsertExternURL = 8388608,
50  EditTarget = 16777216,
51  DoNotAllowWrapping = 33554432,
52  SpecialCharTable = 67108864,
53  DragDrop = 134217728,
54  Acronym = 268435456,
55  UserDefinedColors = 536870912,
56  SpellChecking = 1073741824
57  }
58 
59  public interface ITextHtml : IText
60  {
61  EditorSettings TextEditorSettings { get; set; }
62  }
63 
64  internal class TextHtml : Text, ITextHtml
65  {
66  internal TextHtml(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
67  {
68  //TODO checken, ob die werte in editoroptions nicht invertiert enthalten sind
69  }
70 
71  [RedDot("elteditoroptions", ConverterType = typeof (EnumConverter<EditorSettings>))]
72  public EditorSettings TextEditorSettings
73  {
74  get { return GetAttributeValue<EditorSettings>(); }
75  set { SetAttributeValue(value); }
76  }
77  }
78 }