| 1 | Code segment to replace the ContentsCss property in CKEditorControl.cs: |
|---|
| 2 | |
|---|
| 3 | [PersistenceMode(PersistenceMode.Attribute)] |
|---|
| 4 | [Category("CKEditor Basic Settings")] |
|---|
| 5 | [Description("The CSS file(s) to be used to apply style to the contents. It should reflect the CSS used in the final pages where the contents are to be used. Comma, '|', CR, or LF separated list of files.")] |
|---|
| 6 | [DefaultValue("~/ckeditor/contents.css")] |
|---|
| 7 | [Editor(typeof(System.ComponentModel.Design.MultilineStringEditor), typeof(System.Drawing.Design.UITypeEditor))] |
|---|
| 8 | public string ContentsCss |
|---|
| 9 | { |
|---|
| 10 | get |
|---|
| 11 | { |
|---|
| 12 | string retVal = string.Empty; |
|---|
| 13 | foreach (string item in config.contentsCss) retVal += item + ","; |
|---|
| 14 | if (retVal.EndsWith(",")) retVal = retVal.Remove(retVal.Length - 1); |
|---|
| 15 | return retVal; |
|---|
| 16 | } |
|---|
| 17 | set { |
|---|
| 18 | config.contentsCss = value.Replace("\t", string.Empty).Split(new char[] { ',', '\n', '\r', '|' }, StringSplitOptions.RemoveEmptyEntries); |
|---|
| 19 | for (int i = 0; i < config.contentsCss.Length; i++) |
|---|
| 20 | { |
|---|
| 21 | if (config.contentsCss[i].StartsWith("~")) { |
|---|
| 22 | config.contentsCss[i] = ResolveUrl(config.contentsCss[i]); |
|---|
| 23 | } |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
| 26 | } |
|---|