Content Block Editor - ToolsFile.xml
Hi all,
I have looked through the various posts on this forum regarding using my own ToolsFile.xml with the RadEditor as I used to in v3.7 but for the life of me I cannot get it to work in v4.
From the back end under Administration>Settings>Advanced>Appearance I initially replaced the StandardEditorConfiguration of "Telerik.Sitefinity.Resources.Themes.StandardToolsFile.xml" and MinimalEditorConfiguration of "Telerik.Sitefinity.Resources.Themes.MinimalToolsFile.xml" with the path to my ToolsFile.xml which resulted in the error:
The file: "xxx.xml" in the assembly: "Telerik.Sitefinity.Resources, Version=4.0.1098.0, Culture=neutral, PublicKeyToken=null" was not found!
I then replaced the original values back in and then went to Administration>Settings>Advanced>Appearance>EditorConfigurations and create two new entries of StandardEditorConfiguration & MinimalEditorConfiguration and in the value field I put the path to my ToolsFile.xml.
When I then go to edit some content I still have the same options so it doesn't appear to be picking up the new settings.
I'm not sure if I have missed something simple so apologies if I have but I would be greatful for any help.
Many thanks
Richard
Resolved, I was missing:
<
appearanceConfig
xmlns:config
=
"urn:telerik:sitefinity:configuration"
xmlns:type
=
"urn:telerik:sitefinity:configuration:type"
config:version
=
"4.0.4042.33518"
>
<
editorConfigurations
>
<
add
value
=
"xxx"
key
=
"xxx"
/>
</
editorConfigurations
>
</
appearanceConfig
>
I cannot get this to work at all :)
So this gives you a global change to the tools available in the editor?
Hi Steve,
This is what I have:
Created a new folder called "Controls" in the root, added a user control of "ContentBlockDesignerTemplate.ascx" with the following code:
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %>
<
sf:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
Name
=
"Styles/Window.css"
/>
</
sf:ResourceLinks
>
<
sf:FormManager
ID
=
"formManager"
runat
=
"server"
/>
<
div
style
=
"width: 660px; overflow: hidden;"
>
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
Width
=
"99%"
Height
=
"370px"
EditorToolsConfiguration
=
"Custom"
EditorConfigurations
=
"~/Controls/ToolsFile.xml"
EditorToolsConfigurationKey
=
"ToolsFile"
DisplayMode
=
"Write"
FixCursorIssue
=
"True"
>
</
sf:HtmlField
>
</
div
>
<
script
type
=
"text/javascript"
>
$("body").addClass("sfContentBlockDesigner");
</
script
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
root
>
<
tools
name
=
"MainToolbar"
enabled
=
"true"
>
<
tool
name
=
"AjaxSpellCheck"
/>
<
tool
name
=
"Print"
/>
<
tool
name
=
"FindAndReplace"
/>
<
tool
separator
=
"true"
/>
<
tool
name
=
"Cut"
/>
<
tool
name
=
"Copy"
/>
<
tool
name
=
"Paste"
/>
<
tool
name
=
"PasteFromWord"
/>
<
tool
name
=
"PastePlainText"
/>
<
tool
name
=
"PasteAsHtml"
/>
<
tool
separator
=
"true"
/>
<
tool
name
=
"Undo"
/>
<
tool
name
=
"Redo"
/>
<
tool
name
=
"ApplyClass"
/>
</
tools
>
</
root
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
appearanceConfig
xmlns:config
=
"urn:telerik:sitefinity:configuration"
xmlns:type
=
"urn:telerik:sitefinity:configuration:type"
config:version
=
"4.0.4042.33518"
>
<
editorConfigurations
>
<
add
value
=
"~/Controls/ToolsFile.xml"
key
=
"ToolsFile"
/>
</
editorConfigurations
>
</
appearanceConfig
>
Thank you sir :)
In step one it appeared that you did this:
"I then replaced the original values back in and then went to Administration>Settings>Advanced>Appearance>EditorConfigurations and create two new entries of StandardEditorConfiguration & MinimalEditorConfiguration and in the value field I put the path to my ToolsFile.xml."
But then in your later post, you didn't mention it. Did you still need to do this step or not?
Cool idea. Thanks. :-)
Hello Dan,
You should use the configuration
<
editorConfigurations
>
<
add
value
=
"~/Controls/ToolsFile.xml"
key
=
"ToolsFile"
/>
</
editorConfigurations
>
Hi guys,
If you want to change the appearance of the Editor sitewide you can do the following:
1) Create a user control for HtmlField.ascx, and copy the contents of the original HTML field control, below:
Also make sure you remove the code-behind files.
001.
<%@ Control Language="C#" %>
002.
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
003.
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
004.
005.
<
sf:ConditionalTemplateContainer
ID
=
"conditionalTemplate"
runat
=
"server"
>
006.
<
Templates
>
007.
<
sf:ConditionalTemplate
Left
=
"DisplayMode"
Operator
=
"Equal"
Right
=
"Read"
runat
=
"server"
>
008.
<
sf:SitefinityLabel
id
=
"titleLabel"
runat
=
"server"
WrapperTagName
=
"div"
HideIfNoText
=
"false"
CssClass
=
"sfTxtLbl"
/>
009.
<
sf:SitefinityLabel
id
=
"viewControl"
runat
=
"server"
WrapperTagName
=
"div"
HideIfNoText
=
"false"
CssClass
=
"sfRTFContent"
/>
010.
</
sf:ConditionalTemplate
>
011.
<
sf:ConditionalTemplate
Left
=
"DisplayMode"
Operator
=
"Equal"
Right
=
"Write"
runat
=
"server"
>
012.
<
sf:ResourceLinks
id
=
"resourcesLinks2"
runat
=
"server"
>
013.
<
sf:EmbeddedResourcePropertySetter
Name
=
"Telerik.Sitefinity.Resources.Themes.Default.Styles.EditorDialogs.css"
Static
=
"true"
ControlID
=
"editControl"
ControlPropertyName
=
"DialogsCssFile"
/>
014.
<
sf:ResourceFile
Name
=
"Styles/Window.css"
/>
015.
</
sf:ResourceLinks
>
016.
<
asp:Label
ID
=
"titleLabel"
runat
=
"server"
CssClass
=
"sfTxtLbl"
AssociatedControlID
=
"editControl"
/>
017.
<
asp:LinkButton
ID
=
"expandLink"
runat
=
"server"
OnClientClick
=
"return false;"
CssClass
=
"sfOptionalExpander"
/>
018.
<
asp:Panel
ID
=
"expandableTarget"
runat
=
"server"
CssClass
=
"sfEditorWrp sfClearfix"
>
019.
<
telerik:RadEditor
020.
ID
=
"editControl"
021.
runat
=
"server"
022.
Skin
=
"Sitefinity"
023.
Width
=
"100%"
024.
Height
=
"550px"
025.
EnableResize
=
"False"
026.
EditModes
=
"Design,HTML"
027.
DialogHandlerUrl
=
"~/Telerik.Web.UI.DialogHandler.axd"
028.
Content
=
""
029.
NewLineBr
=
"False"
030.
StripFormattingOptions
=
"Css,Font,Span"
031.
OnClientLoad
=
"Telerik$Sitefinity$Web$UI$Fields$HtmlField$radEditorToggleAdvancedToolbars"
032.
OnClientPasteHtml
=
"OnClientPasteHtml"
033.
OnClientCommandExecuting
=
"OnClientCommandExecuting"
>
034.
<
FlashManager
ViewPaths
=
"~/Files"
UploadPaths
=
"~/Files"
DeletePaths
=
"~/Files"
/>
035.
</
telerik:RadEditor
>
036.
<
sf:SitefinityLabel
id
=
"descriptionLabel"
runat
=
"server"
WrapperTagName
=
"div"
HideIfNoText
=
"true"
CssClass
=
"sfDescription"
/>
037.
<
sf:SitefinityLabel
id
=
"exampleLabel"
runat
=
"server"
WrapperTagName
=
"div"
HideIfNoText
=
"true"
CssClass
=
"sfExample"
/>
038.
</
asp:Panel
>
039.
<
script
type
=
"text/javascript"
>
040.
/*
<![CDATA[ */
041.
042.
var className = null;
043.
var toRemove = false;
044.
var handlersAdded = false;
045.
046.
function OnClientPasteHtml(sender, args)
047.
048.
var newContent = args.get_value();
049.
newContent = newContent.replace(new RegExp("<b(\\s([^>])*?)?>", "ig"), "<strong$1>");
050.
newContent = newContent.replace(new RegExp("</b(\\s([^>])*?)?>", "ig"), "</strong$1>");
051.
newContent = newContent.replace(new RegExp("<i(\\s([^>])*?)?>", "ig"), "<em$1>");
052.
newContent = newContent.replace(new RegExp("</i(\\s([^>])*?)?>", "ig"), "</em$1>");
053.
var regex = /<([a-zA-Z]+) ?[^>]*?>\s*<\/\1>/gi;
054.
newContent = newContent.replace(regex, "");
055.
056.
newContent = newContent.replace(new RegExp("( \s*\n*)+", "ig"), " ");
057.
newContent = newContent.replace(new RegExp("(\s*\n*<br\s*\/?>\s*\n*)+", "ig"), "<br />");
058.
059.
args.set_value(newContent);
060.
061.
062.
function OnClientCommandExecuting(editor, args)
063.
064.
var name = args.get_name();
065.
var val = args.get_value();
066.
067.
className = "re" + args.get_commandName();
068.
if (editor.get_dialogOpener())
069.
070.
if (editor.get_dialogOpener()._container && !handlersAdded)
071.
072.
editor.get_dialogOpener()._container.add_show(AddRemoveCSSClass);
073.
editor.get_dialogOpener()._container.add_close(AddRemoveCSSClass);
074.
handlersAdded = true;
075.
076.
077.
078.
if (name == "MergeTags")
079.
080.
editor.pasteHtml(val);
081.
//Cancel the further execution of the command as such a command does not exist in the editor command list
082.
args.set_cancel(true);
083.
084.
085.
086.
function AddRemoveCSSClass(sender, args)
087.
088.
var popupElement = sender.get_popupElement();
089.
if (!toRemove)
090.
091.
Sys.UI.DomElement.addCssClass(popupElement, className);
092.
093.
else
094.
095.
Sys.UI.DomElement.removeCssClass(popupElement, className);
096.
097.
098.
099.
/* ]]>
*/
100.
</
script
>
101.
</
sf:ConditionalTemplate
>
102.
</
Templates
>
103.
</
sf:ConditionalTemplateContainer
>
01.
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
02.
<
root
>
03.
<
modules
>
04.
<
module
name
=
"RadEditorStatistics"
dockingZone
=
"Bottom"
visible
=
"false"
/>
05.
<
module
name
=
"RadEditorDomInspector"
visible
=
"true"
/>
06.
<
module
name
=
"RadEditorNodeInspector"
visible
=
"false"
/>
07.
<
module
name
=
"RadEditorHtmlInspector"
visible
=
"false"
/>
08.
</
modules
>
09.
<
tools
name
=
"MainToolbar"
>
10.
<
tool
name
=
"Bold"
shortcut
=
"CTRL+B"
/>
11.
<
tool
name
=
"Italic"
shortcut
=
"CTRL+I"
/>
12.
<
tool
separator
=
"true"
/>
13.
<
tool
name
=
"InsertOrderedList"
/>
14.
<
tool
name
=
"InsertUnorderedList"
/>
15.
<
tool
separator
=
"true"
/>
16.
<
tool
name
=
"LinkManager"
shortcut
=
"CTRL+K"
/>
17.
<
tool
name
=
"Unlink"
shortcut
=
"CTRL+SHIFT+K"
/>
18.
<
tool
name
=
"ImageManager"
shortcut
=
"CTRL+G"
/>
19.
<
tool
separator
=
"true"
/>
20.
<
tool
name
=
"AjaxSpellCheck"
/>
21.
<
tool
separator
=
"true"
/>
22.
<
tool
name
=
"PasteFromWord"
/>
23.
</
tools
>
24.
<
tools
>
25.
<
tool
separator
=
"true"
/>
26.
<
tool
name
=
"Indent"
/>
27.
<
tool
name
=
"Outdent"
/>
28.
</
tools
>
29.
<
tools
>
30.
31.
<
tool
separator
=
"true"
/>
32.
<
tool
name
=
"ForeColor"
/>
33.
<
tool
name
=
"BackColor"
/>
34.
</
tools
>
35.
<
tools
>
36.
<
tool
name
=
"InsertParagraph"
/>
37.
<
tool
name
=
"InsertSymbol"
/>
38.
<
tool
name
=
"InsertHorizontalRule"
/>
39.
<
tool
separator
=
"true"
/>
40.
<
tool
name
=
"Superscript"
/>
41.
<
tool
name
=
"Subscript"
/>
42.
<
tool
separator
=
"true"
/>
43.
<
tool
name
=
"FormatStripper"
/>
44.
</
tools
>
45.
<
tools
>
46.
<
tool
separator
=
"true"
/>
47.
<
tool
name
=
"FormatBlock"
/>
48.
</
tools
>
49.
</
root
>
OnClientLoad
=
"Telerik$Sitefinity$Web$UI$Fields$HtmlField$radEditorToggleAdvancedToolbars"
Does anyone know why it takes a while for these changes to take effect the first time? Is there some process that needs to be restarted or refreshed before the tools.xml takes over the default settings?
Hi Dan,
Mapping the CotnentBlockDesigner will require to restart the application, otherwise the old configuration is still used. When you map the designer we do not make application restart which we do when you register a widget.
All the best,
Ivan Dimitrov
the Telerik team
I just make it a common practice to recycle the associated App Pool in IIS after any changes I make (source code or back-end alike). Only way to ensure i'm looking at a non-cached version.
Hi guys,
What I want to achieve is to hide the:
- Advanced button,
- The HTML link,
- And the Editing options
of the Generic content editor interface for a selected role of users.
The rest of the users, I want them to see that.
Is that possible?
Thanks,
Andrei
Hello Andrei,
To hide advanced button you will need a custom control designer which is equivalent to a custom control. You can call the methods below inside InitializeControls of the designer.
this.HideAdvancedMode = true;
this.DisableAdvancedMode();
To hide the HTML mode you have to get instance of the RadEditor and do this inside InitializeControls of the control designer you are going to use
RadEditor1.EditModes = EditModes.Design | EditModes.Preview;
RadEditor1.EnsureToolsFileLoaded(); RemoveButton("FindAndReplace"); RemoveButton("Cut"); RemoveButton("Copy"); RemoveButton("Paste");
Ok, so let me see if I get this:
1 - Create a Custom Control that is the Generic Content control,
2 - Inside the code make the changes you mentioned,
3 - And then use it on the pages that can be seen by
the user that I want to restrict.
There is no way of editing a ToolsFile.xml like I was able to in Sitefinity 3.7
and disable all the things from there for a given Role?
In that case can I have a copy of the Generic Content Control please so
that I do not have to create it from ground level up. That way I can just:
- Modify it,
- Register it in the ToolBox,
- Drop it on the page,
and that's it.
Thanks Ivan,
Andrei
Hello Andrei,
In 3.x you should also have a custom code to load a tools file per role. So, the ContentBlock uses tools file, but it is not located in the solution. It is embedded into dlls. Since you want to make some more granularity related to who is allowed to use subset of tools , you have to modify the HtmlField control.
If you are not looking for some specific features of ContentBlock and respectively the wrapped HtmlFiel, you should better use the RadEditor control.
What you can also try is mapping template for CotentBlock control which contains the declaration of HtmlField control that wraps RadEditor control. Then add a C# script with Page_Load method. In the page load method you should set the value to HtmlField.Editor.ToolsFile. Since there are 3 nested controls RadEditor, HtmlField and ContentBlock you might need to use another event, like RadEditor.PreRender to apply your changes.
Actually I will log a feature request about your requirement so we will try to enhance the HtmlField configurations and implement some permissions.
All the best,
Ivan Dimitrov
the Telerik team
Ivan,
Option - 1
I am looking at the RAD Editor and it does not look like it would meet my requirements.
- I don't see how I would hide the HTML view only for a given role.
- I don't see how I can hide the Tool Strips just for a given role.
- Also, it seems that the only way to edit text is through the front-end not the back-end.
Question: What do you mean by: "...you have to modify the HtmlField control..."
Option - 2
Mapping template for ContentBlock. That sounds more like it. I guess in the Page_Load
event I could check the user's role and map the relevant template accordingly???
I see two fields: 'LayoutTemplate' and 'LayoutTemplatePath' in the Content Block control.
Would me creating this template and specifying it there work?
The problem is that I am not too up-to-speed with this whole process and so putting things
in a simpler way (step-by step) would help me greatly.
Thanks,
Andrei
Hi Andrei,
There are several lines of code, which are related to the RadEditor API, so they show how to remove buttons or set the RadEditor mode.
LayoutTemplatePath will set the public template, but not the template of the control designer you need. Mapping the designer could be done from the configuration only.
Regards,
Ivan Dimitrov
the Telerik team
Ivan,
This is turning into a pestering session, sorry about that. It is just that it's quite important that
I get this working and my understanding about these things is not too great at the moment.
"...There are several lines of code, which are related to the RadEditor API..."
Which lines? Where? Are you implying that I can use the RAD Editor to edit text in the back-end
and have it being displayed on the front-end as plain text?
"...LayoutTemplatePath will set the public template, but not the template of the control designer you need..."
Ok, I don't want to change the public template. I want to change the designer, so that's out.
"...Mapping the designer could be done from the configuration only..."
Would that change it then for everyone and every role? If yes, then not good either.
Sorry, but I am still not following you. Can you break it down for me into steps. Assume I
don't know much about Sitefinity 4.0. Perhaps a quick video or some code examples.
Sorry about that and thanks for your help,
Andrei
Hi Andrei,
I can give you a little example.
LinkBoxDesigner.ascx :
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers" TagPrefix="sf" %>
<
sf:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
JavaScriptLibrary
=
"JQuery"
/>
<
sf:ResourceFile
Name
=
"Styles/Window.css"
/>
</
sf:ResourceLinks
>
<
sf:FormManager
ID
=
"formManager"
runat
=
"server"
/>
<
div
style
=
"width: 660px; overflow: hidden;"
>
<
sf:TextField
ID
=
"textEditor"
Width
=
"99%"
runat
=
"server"
DisplayMode
=
"Write"
Rows
=
"1"
Title
=
"Box Title"
>
<
ValidatorDefinition
Required
=
"true"
ExpectedFormat
=
"Custom"
MessageCssClass
=
"sfError"
/>
</
sf:TextField
>
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
DisplayMode
=
"Write"
EditorContentFilters
=
"DefaultFilters"
EditorStripFormattingOptions
=
"MSWord,Css,Font,Span,ConvertWordLists"
EditorToolsConfiguration
=
"Custom"
EditorToolsConfigurationKey
=
"LinkTools"
FixCursorIssue
=
"True"
Height
=
"550px"
HtmlFieldEditModes
=
"Design"
Width
=
"99%"
/>
</
div
>
<
script
type
=
"text/javascript"
>
$("body").addClass("sfLinkBoxDesigner");
</
script
>
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
Telerik.Sitefinity.Web.UI;
using
Telerik.Sitefinity.Web.UI.ControlDesign;
using
System.Web.UI;
using
Telerik.Web.UI;
using
System.Xml;
using
Telerik.Sitefinity.Configuration;
using
Telerik.Sitefinity.Web.Configuration;
using
Telerik.Sitefinity.Web.UI.Fields;
using
Telerik.Sitefinity.Web.Utilities;
using
Telerik.Sitefinity.Modules.Libraries.Web.UI.Designers;
using
Telerik.Sitefinity.Libraries.Model;
namespace
Sitefinity.Box.Link
/// <summary>
/// Designer control for the <see cref="LinkBox"/> control.
/// </summary>
public
class
LinkBoxDesigner : ControlDesignerBase
#region Properties
/// <summary>
/// Gets the name of the embedded layout template.
/// </summary>
/// <value></value>
/// <remarks>
/// Override this property to change the embedded template to be used with the dialog
/// </remarks>
protected
override
string
LayoutTemplateName
get
return
LinkBoxDesigner.layoutTemplateName;
#endregion
#region Control references
/// <summary>
/// Gets the reference to the <see cref="HtmlField"/> control that is used
/// for editing the HTML content of <see cref="LinkBox"/> control.
/// </summary>
protected
virtual
HtmlField HtmlEditor
get
return
this
.Container.GetControl<HtmlField>(
"htmlEditor"
,
true
);
/// <summary>
/// Gets the reference to the <see cref="TextField"/> control that is used
/// for editing the HTML content of <see cref="LinkBox"/> control.
/// </summary>
protected
virtual
TextField TextEditor
get
return
this
.Container.GetControl<TextField>(
"textEditor"
,
true
);
#endregion
#region Overridden methods
/// <summary>
/// Initializes the controls.
/// </summary>
/// <param name="container"></param>
/// <remarks>
/// Initialize your controls in this method. Do not override CreateChildControls method.
/// </remarks>
protected
override
void
InitializeControls(GenericContainer container)
base
.DesignerMode = ControlDesignerModes.Simple;
base
.AdvancedModeIsDefault =
false
;
if
(
this
.PropertyEditor !=
null
)
this
.HtmlEditor.UICulture =
this
.PropertyEditor.PropertyValuesCulture;
/// <summary>
/// Gets the script descriptors.
/// </summary>
/// <returns></returns>
public
override
IEnumerable<ScriptDescriptor> GetScriptDescriptors()
var scriptDescriptors =
new
List<ScriptDescriptor>(
base
.GetScriptDescriptors());
var descriptor = (ScriptControlDescriptor)scriptDescriptors.Last();
descriptor.AddComponentProperty(
"textEditor"
,
this
.TextEditor.ClientID);
descriptor.AddComponentProperty(
"htmlEditor"
,
this
.HtmlEditor.ClientID);
scriptDescriptors.Add(descriptor);
return
scriptDescriptors.ToArray();
/// <summary>
/// Gets the script references.
/// </summary>
/// <returns></returns>
public
override
IEnumerable<ScriptReference> GetScriptReferences()
string
assembly =
typeof
(LinkBoxDesigner).Assembly.FullName;
var scripts =
new
List<ScriptReference>(
base
.GetScriptReferences());
var designerScript =
new
ScriptReference(LinkBoxDesigner.designerScriptName, assembly);
scripts.Add(designerScript);
return
scripts.ToArray();
protected
override
HtmlTextWriterTag TagKey
get
//we use div wrapper tag to make easier common styling
return
HtmlTextWriterTag.Div;
#endregion
#region Private fields
private
const
string
layoutTemplateName =
"Sitefinity.Box.Link.Designers.LinkBoxDesigner.ascx"
;
private
const
string
designerScriptName =
"Sitefinity.Box.Link.Script.LinkBoxDesigner.js"
;
#endregion
Type.registerNamespace(
"Sitefinity.Box.Link"
);
// ------------------------------------------------------------------------
// LinkBoxDesigner class
// ------------------------------------------------------------------------
Sitefinity.Box.Link.LinkBoxDesigner =
function
(element)
this
._propertyEditor =
null
;
this
._htmlEditor =
null
;
this
._textEditor =
null
;
Sitefinity.Box.Link.LinkBoxDesigner.initializeBase(
this
, [element]);
Sitefinity.Box.Link.LinkBoxDesigner.prototype =
/* ************************* set up and tear down ************************* */
initialize:
function
()
Sitefinity.Box.Link.LinkBoxDesigner.callBaseMethod(
this
,
'initialize'
);
,
dispose:
function
()
Sitefinity.Box.Link.LinkBoxDesigner.callBaseMethod(
this
,
'dispose'
);
,
/* ************************* public methods ************************* */
applyChanges:
function
()
var
textEditor =
this
._textEditor._editControl;
if
(textEditor)
textEditor.set_mode(1);
this
.get_propertyEditor().get_control().HtmlTitle =
this
._textEditor.get_value();
var
editor =
this
._htmlEditor._editControl;
if
(editor)
editor.set_mode(1);
this
.get_propertyEditor().get_control().Html =
this
._htmlEditor.get_value();
,
refreshUI:
function
()
var
texte =
this
.get_propertyEditor().get_control().HtmlTitle;
if
(texte)
this
._textEditor.set_value(texte);
var
html =
this
.get_propertyEditor().get_control().Html;
if
(html)
this
._htmlEditor.set_value(html);
,
/* ************************* properties ************************* */
// gets the reference to the propertyEditor control
get_propertyEditor:
function
()
return
this
._propertyEditor;
,
// sets the reference fo the propertyEditor control
set_propertyEditor:
function
(value)
this
._propertyEditor = value;
,
// gets the reference to the rad editor control used to edit the
// html content of the LinkBox control
get_htmlEditor:
function
()
return
this
._htmlEditor;
,
// gets the reference to the rad editor control used to edit the
// html content of the LinkBox control
set_htmlEditor:
function
(value)
this
._htmlEditor = value;
,
// gets the reference to the rad editor control used to edit the
// text content of the LinkBox control
get_textEditor:
function
()
return
this
._textEditor;
,
// gets the reference to the rad editor control used to edit the
// text content of the LinkBox control
set_textEditor:
function
(value)
this
._textEditor = value;
;
Sitefinity.Box.Link.LinkBoxDesigner.registerClass(
'Sitefinity.Box.Link.LinkBoxDesigner'
, Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase);
I forgot a little part:
xml configuration for tools :
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
root
>
<
tools
name
=
"MainToolbar"
enabled
=
"true"
>
<
tool
name
=
"LinkManager"
shortcut
=
"CTRL+K"
/>
<
tool
name
=
"Unlink"
shortcut
=
"CTRL+SHIFT+K"
/>
</
tools
>
</
root
>
Hi,
It's just the backend of the widget for editing content. For the moment I do not administer rights on the widget.
On the frontend visible on page LinkBox.ascx :
<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sitefinity" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<
ul
class
=
"linkBox"
>
<
li
>
<
div
class
=
"lBoxTitle"
runat
=
"server"
>
<
asp:Literal
ID
=
"titleContentHtml"
runat
=
"server"
/>
</
div
>
</
li
>
<
li
>
<
div
id
=
"itemsContainer"
runat
=
"server"
>
<
asp:Literal
ID
=
"contentHtml"
runat
=
"server"
></
asp:Literal
>
<
sf:BrowseAndEditToolbar
ID
=
"browseAndEditToolbar"
runat
=
"server"
Mode
=
"Edit"
></
sf:BrowseAndEditToolbar
>
</
div
>
</
li
>
</
ul
>
<
sitefinity:Pager
id
=
"pager"
runat
=
"server"
></
sitefinity:Pager
>
namespace
Sitefinity.Box.Link
/// <summary>
/// CoverFlow widget class that inherits from SimpleView that is registered in Sitefinity's toolbox.
/// </summary>
[ControlDesigner(
typeof
(LinkBoxDesigner))]
public
class
LinkBox : SimpleView, ICustomWidgetVisualization, IBrowseAndEditable
.........
Ok Nicolas,
I am just playing with it now. Will let you know how I get on.
Stay subscribed.
Thanks,
Andrei
Nicolas,
I renamed the Control "BasicText" and placed it in the Controls folder.
I have one entry under EditorConfigurations: ~/Controls/BasicText.ascx
How do I get it on a page now in the way that your image shows?
Cheers,
Andrei
Hi,
Sorry I made a error in my explanation, for configuration in EditorConfigurations.
In Designer.ascx parts you have :
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
DisplayMode
=
"Write"
EditorContentFilters
=
"DefaultFilters"
EditorStripFormattingOptions
=
"MSWord,Css,Font,Span,ConvertWordLists"
EditorToolsConfiguration
=
"Custom"
EditorToolsConfigurationKey
=
"LinkTools"
FixCursorIssue
=
"True"
Height
=
"550px"
HtmlFieldEditModes
=
"Design"
Width
=
"99%"
/>
Ok, I see. Now all my Content Blocks look as per the template.
Now I need to find a way to switch between templates according to user privileges.
Let me know if you have any ideas.
Many thanks,
Andrei
If I'm not wrong, you can drag a ContentBlock in a page and when you edit it (in backend) you obtains designer form corresponding to the ascx register in "Administration>Settings>Advanced>Controls>ViewMap".
I don't use this method but It's referenced in the thread and it seem works.
Regards
Nicolas
I take my time to respond :-).
You can in your LinkBoxDesigner.cs get your users rights.
In LinkBoxDesigner.ascx :
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
DisplayMode
=
"Write"
EditorContentFilters
=
"DefaultFilters"
EditorStripFormattingOptions
=
"MSWord,Css,Font,Span,ConvertWordLists"
EditorToolsConfiguration
=
"Custom"
EditorToolsConfigurationKey
=
"LinkTools"
FixCursorIssue
=
"True"
Height
=
"550px"
HtmlFieldEditModes
=
"Design"
Width
=
"99%"
/>
First I want to thank Nicolas & Andrei for blazing this trail. I suspect this thread will end up helping a lot of people and, eventually, be converted into a "How To" guide.
However, my question is less about "How?" and more related to "Why?". If a customer wants to modify the ToolsFile.xml file then it means Sitefinity's default editor isn't suited to whatever they are trying to do. Why? I'm trying to figure out if there is a user story here that we need to act on. Or is this a on-off customization that is not widely applicable? Either way, we need to have a solution, but it's always ideal if Sitefinity simply does the right thing.
As I look through this thread, I see the following user story:
As a web site administrator, I want to prevent some backend editors (based on roles) from directly modifying the HTML used in the RichText editor. Users that are prevented from modifying the HTML should not see the HTML option in RadEditor. This will prevent editors from introducing HTML problems that might otherwise break the web site or create bad end-user experiences.
Can you tell I've been spending too much time with TeamPulse?
--
Are there other user stories that we should be aware of related to this thread?
Gabe Sumner
Telerik | Sitefinity CMS
Hi Gabe,
I'd like to give my input to this topic. For me there are four main issues with RadEditor, or HtmlField as it is called in Sitefinity V4 - my points do go slightly wider than the content block editor, but all very related.
1) In V4 is has become very hard to define which tools I want included, and the standard configuration is dangerous at best. As website designers/developers we want to provide just enough control to the end users so that they can manage their content in a controlled environment. As standard in V4, tools such as font style, insert flash, font size, etc are available and I cannot turn them off. With all due respect, the only step more dangerous than this is handing my client a copy of Dreamweaver. Now all of the hard work we put into structuring the content and presenting it correctly via Css can be overridden. I would like to see it possible to define which tools the content block uses, but I would also like to see it made possible that all modules or a particular module can use a different configuration. For example, it may be acceptable that on the news module the user can insert an image, but that may be unacceptable on the events module. Again it goes back to the fact that as designers we have spent a lot of time assessing which content per page/section should be displayed, and how it should be displayed - if we cannot enforce those rules we cannot guarantee the website will look as we intended in the long term.
I accept that client training, along with a design guide (which we always provide) will mitigate some of the risk in point 1 - but that doesnt mean I wont one day come into the office to find comic sans plastered across one of my clients websites!
2) The "view advanced tools" button is actually a bit of a hindrance in my opinion. For starters I may not want the client to have access to these advanced options, on top of that, if I do want to include basic and advanced tools, I would like to be able to define what they are. So when considering point 1, I would also like to see an option for disabling the "advanced" button.
3) I agree with the comments of Andrei and Nicolas. I do believe it should be possible to specify the configuration of the HtmlField based on users roles. I find it worrying that end-users have access to the HTML view (i'm just waiting for one of them to add a scroling marquee!). I do not currently have a situation where I think it would be useful to restrict access to some users seeing the "insert image" button, but then again other people may. Why not allow the complete configuration to be set based on a membership role.
4) I've entered into several conversations on these forums about how I would like to be able to replace RadEditor with an editor of my choice. It appears I have hit a brick wall on this - in a way I can understand why, it would be a heck of a lot of work to replace it and then manipulate the output HTML to show correct image paths/hyperlinks etc - but not impossible!. But then I ask myself why do I want to be able to do this - RadEditor has a nice interface, its easy to use, its configurable, so why re-invent the wheel? IMHO the Wysiwyg in ANY CMS is the weakest part, or riskiest part - you're providing a tool to end-users that allows them to create HTML, but there is absolutely no choice - they have to be able to write HTML. The point is if you're going to make this functionality available it has to be flawless. HTML is such a messy and unstructured language really, and provides no feedback to an end user as to why something has rendered incorrectly. Unfortunately I experience this all the time with Sitefinity RadEditor - I have clients on the phone asking why this extra line break has appeared, or why this whole block of text is a hyperlink, or my monthly HTML Valid reports which I run on my clients websites will show some pretty horrific HTML. Sometimes it has to be said, the clients have copied and pasted badly, and frankly lets not get into that - I warn them, RadEditor tries to clean it up, but frankly no Wysiwyg handles that very well. So let me stop waffling and get to the point - I actually dont care which Wysiwyg is part of Sitefinity, and I mean this with no disrespect, but RadEditor is buggy. It performs very poorly across different browsers. Some of the bugs I have previously reported are such simple ones that I find it hard to believe they werent picked up. RadEditor needs some serious testing and bug-fixing, its a project on its own and whilst Im sure plenty of issues have been fixed, there are still far too many. I reported some myself at www.sitefinity.com/.../radeditor-has-issues-when-i.aspx, but I never really received any feedback as to whether they were being considered, which frankly puts me off doing any more testing for free. If I knew the issues were going to be considered and scheduled, I, and most probably the wider Sitefinity community would be more than happy to flush out all the bugs - but I just don't see it getting any priority. Personally I feel its a big enough product to put into PITS on its own - why not encourage users to find the bugs, run a competition, offer better Telerik points - just anything to get it to the level it needs to be at. Afterall, not only will the wider sitefinity community be much happier, it will be a better product that rivals the likes of CKEditor and TinyMCE. Please take from this point, that my only goal is to make RadEditor a better product, and in turn improve sitefinity. If you would like to discuss anything you can either contact me personally, or happy to discuss further on this thread.
Regards,
higgsy
Gabe,
I see higgsy has got quite a story, and a valid one too. I have not got the time to read through it
at the moment so I will just state the "WHY?" I need this feature. My company uses Sistefinty
in some critical environments, and last Tuesday when I was demonstrating to the customer a new
project, - the customer picked up on that straight-away. He said, whilst in other environments you
have time to rectify problems, in this one you don't. So the measure you take is preventative rather
than corrective. You don't want administrators editing pages, but a restricted user who has no clue.
Hence, what I am trying to achieve is an editor that can be customized according to a users expertise,
whilst still having all the bits available for an experienced user.
To be honest, I use the HTML view more than the actual text view. I could not do without an HTML view,
but giving access to a standard user is asking for trouble. The things I would like to see conditional are:
- The editing options (I want to define everything in CSS so no need for the standard user to apply any formatting at all). There is me trying hard in CSS to make it look nice, and a user decides that Bold will look better and ruins it all at a lick of a button.
- The Advanced button. A normal user must not be allowed in at any cost.
- The HTML view. That will scare them, but also, they may mistakenly think they
are in the normal view and decide that the text has all gone funny and promptly
set about putting it right.
Unfortunately, it looks like for this particular project I am gonna have to work-around if I can, but the feature will be most welcome in the future.
Hope it makes sense.
Andrei
Hi Andrei,
We are in process of creating simple UI, for configuring every instance of the RadEditor in Sitefinity - both in modules and comments. We will do the improvement for sure in Q2, so hopefully, we will have this feature by the end of July, beginning of August at latest.
Greetings,Georgi,
That is very good news. I look forward to using it.
Does that mean that the feature request logged by Ivan earlier in the thread:
"...Actually I will log a feature request about your requirement so we will try to enhance the HtmlField configurations and implement some permissions..."
has been approved???
Many thanks,
Andrei
Hi Andrei,
Yes this feature is logged on our Sitefinity 4.2 plan.
Kind regards,
Radoslav Georgiev
the Telerik team
Radoslav,
A very strong smell of points has just come into my office. I
think it might be this feature request that has been approved, but I am not sure.
Many thanks,
Andrei
Hello Andrei,
Granted.
Regards,
Radoslav Georgiev
the Telerik team
@higgsy
"Personally I feel its a big enough product to put into PITS on its own -
why not encourage users to find the bugs, run a competition, offer
better Telerik points - just anything to get it to the level it needs to
be at. Afterall, not only will the wider sitefinity community be much
happier, it will be a better product that rivals the likes of CKEditor
and TinyMCE. Please take from this point, that my only goal is to make
RadEditor a better product, and in turn improve sitefinity. If you would
like to discuss anything you can either contact me personally, or happy
to discuss further on this thread."
I cannot agree MORE. There was an old thread on this and most issues I believe were resolved...but they keep coming back, or others keep showing up.
Seems like everytime I think it's working well again...I go to edit content and get stuck wondering WTF is going on. Yesterday I just tried to do something simple like put my cursor at the end of a link (<a>) and hit enter.
Expected result: <a href="...">LINK</a><br/><CURSOR>
....actual result:
Expected result: <a href="...">LINK<br/><CURSOR></a>
1 step forward, 10 steps back every release with the RadEditor
Here's a video of trying to wrap text in paragraphs: http://www.screencast.com/t/VKzF7MiQOzvO
That content was cut\pasted from another site to migrate into SF4.
Hello,
I also customized the rad editor. It works in SF 4.0 but after upgrading to 4.1. It does not work. I got the following error:
Telerik.Sitefinity.Web.UI.TemplateException: A required control was not found in the template for "~/UserControls/Wysiwyg/EditorTools.ascx". The control must be assignable from type "Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector" and must have ID "sharedContentSelector".
Hi Gabe,
I realise that the last week or so has been busy with the release of Q1 and the upcoming SDK - but could I ask whether you are still involved in this thread? You asked a question to which a few of us have taken the time to answer so it would be nice to know it was for a reason?
Thanks
higgsy
?? Still no response!
I am getting the same error as well.
"A required control was not found in the template for "~/EditorTools.ascx". The control must be assignable from type "Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector" and must have ID "sharedContentSelector"."
I only wanted to move around a few of the options to the main toolbar so that the user does not need to click on the "more formating options" button. I want to modify this sitewide so that the editor options are the same everywhere. I am using Sitefinity 4.1.
I created the toolsfile.xml, the editortools.ascx:
<%@ Control Language="C#" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.Fields" TagPrefix="sf" %>
<
sf:ResourceLinks
id
=
"resourcesLinks"
runat
=
"server"
>
<
sf:ResourceFile
Name
=
"CSS/myCSS.css"
/>
</
sf:ResourceLinks
>
<
sf:FormManager
ID
=
"formManager"
runat
=
"server"
/>
<
div
style
=
"width: 660px; overflow: hidden;"
>
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
Width
=
"99%"
Height
=
"370px"
EditorContentFilters
=
"DefaultFilters"
EditorStripFormattingOptions
=
"MSWord,Css,Font,Span,ConvertWordLists"
DisplayMode
=
"Write"
FixCursorIssue
=
"True"
EditorToolsConfiguration
=
"Custom"
EditorToolsConfigurationKey
=
"tools"
> <%--This key has to be the same as the key you add in AppearanceConfig.config--%>
</
sf:HtmlField
>
</
div
>
<
script
type
=
"text/javascript"
>
$("body").addClass("sfContentBlockDesigner");
</
script
>
<
controlsConfig
xmlns:config
=
"urn:telerik:sitefinity:configuration"
xmlns:type
=
"urn:telerik:sitefinity:configuration:type"
config:version
=
"4.1.1339.0"
>
<
viewMap
>
<
viewSettings
layoutTemplatePath
=
"~/EditorTools.ascx"
hostType
=
"Telerik.Sitefinity.Modules.GenericContent.Web.UI.ContentBlockDesigner"
/>
</
viewMap
>
</
controlsConfig
>
@Nidhi
That view changed since they added in the new shared content selector controls...
Have a look here
Thanks Steve,
Your solution fixed my problem!
hey is the snippets feature still implemented in the text editor for 4.1 because i dont see it anywhere.
this was very useful in 3.7 and i'd like to add it back to 4.1 if possible. please let me know how.
thanks.
Hi ,
HtmlField was not extended for 4.1 released. There will be some new features with Q2 release.
Greetings,
Ivan Dimitrov
the Telerik team
I am getting the below error
Server Error in '/' Application.
A required control was not found in the template for
"~/Templates/ContentBlockDesignerTemplate.ascx". The control must be
assignable from type
"Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector" and must have
ID "sharedContentSelector".
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: Telerik.Sitefinity.Web.UI.TemplateException:
A required control was not found in the template for
"~/Templates/ContentBlockDesignerTemplate.ascx". The control must be
assignable from type
"Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector" and must have
ID "sharedContentSelector".
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[TemplateException: A required control was not found in the template for "~/Templates/ContentBlockDesignerTemplate.ascx". The control must be assignable from type "Telerik.Sitefinity.Web.UI.ControlDesign.ContentSelector" and must have ID "sharedContentSelector".]
Telerik.Sitefinity.Web.UI.GenericContainer.ThrowException(Type requiredType, String controlId) +74
Telerik.Sitefinity.Web.UI.GenericContainer.GetControl(String id, Boolean required) +262
Telerik.Sitefinity.Modules.GenericContent.Web.UI.ContentBlockDesigner.InitializeControls(GenericContainer container) +129
Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +82
System.Web.UI.Control.EnsureChildControls() +182
System.Web.UI.Control.PreRenderRecursiveInternal() +60
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Hello,
Do you have the control of type ContentSelector with the ID sharedContentSelector in your template? The error says that this control is not in your template.
Regards,
Ivan Dimitrov
the Telerik team
I did not see Apply Css Class in the Content Editor tool box for Sitefinity 4.1. Is it there?
Thanks
Venkat
Hi,
The dropdown was removed from the configuration file. We are working on an implementation that will allow to change the xml from the UI.
All the best,
Ivan Dimitrov
the Telerik team
Ivan,
I am trying
this.HideAdvancedMode = true;
this.DisableAdvancedMode();
But it is not working. It says that "it does not contain a definition..."
I have a new User Control and trying to hide the advanced button.
Many thanks,
Andrei
Hello Andrei,
Try hiding the button from the client
var data = this._propertyEditor.get_control();
$(this._propertyEditor.get_advancedModeButton()).hide();
Best wishes,
Ivan Dimitrov
the Telerik team
Ivan,
I don't want to resurrect that ticket again, so will post here instead.
My attempts to force the width of the content block did not work.
refreshUI: function ()
var p = this.get_propertyEditor();
jQuery(p.get_advancedModeButton()).hide();
var html = this.get_propertyEditor().get_control().Html;
if (html)
this._htmlEditor.set_value(html);
dialogBase.setWndWidth(800);
,
_ClearAllTextfields: function ()
var html = this.get_propertyEditor().get_control().Html;
if (html)
var pattern = ">.+?<\/td>";
var re = new RegExp(pattern, "gim");
while ((matches = re.exec(html)) != null)
for (i = 0; i <
matches.length
; i++)
html
= html.replace(matches[i], '> </
td
>');
this._htmlEditor.set_value(html);
dialogBase.setWndWidth(800);
,
Hello Andrei,
The problem is that inside PropertyGrid and its pageLoaded we call dialogBase.resizeToContent(); which overrides the settings that resize the window.You need to create a client component that is not based on
Telerik.Sitefinity.Web.UI.ControlDesign.ControlDesignerBase or disable /override the pageLoaded
Regards,
Ivan Dimitrov
the Telerik team
Ivan,
Overriding the pageLoaded event seems a bit easier and quicker to achieve. Do you foresee any major issues if I do that? All I will ever have on it is a table.
Also, is it a question of just adding another event during the Load time:
_handlePageLoad: function (sender, args)
var contentEditor = this.get_htmlEditor();
this._wrappedEditor.attachEventHandler("onkeydown", this._editorCursorChangeDelegate);
this._wrappedEditor.attachEventHandler("onmouseup", this._editorCursorSelectDelegate);
this._wrappedEditor.attachEventHandler("pageloaded", this._editorFullyLoaded);
,
Hello Andrei,
You will not be able to access the load of the PropertyGrid directly. The property grid is wrapped inside ControlDesignerBase and send to the client component. There does not seem to be a straight way to access the load of the PropertyGrid. You will need a class that inherits from PropertyGrid, then wrap your custom PropertyGrid in a custom ControlDesignerBase class and finally use the custom ControlDesigner base component on the client. This seems to be an usability issue and the solution looks quite complex for this change. If you can apply css to it, this would be easiest way.
Regards,
Ivan Dimitrov
the Telerik team
Ivan,
I have made the width a set number of pixels, as below:
<
sf:FormManager
ID
=
"formManager"
runat
=
"server"
/>
<
div
id
=
"editView"
class
=
"sfContentBlocksDesignerWrp"
>
<
sf:HtmlField
ID
=
"htmlEditor"
runat
=
"server"
Width
=
"700px"
Height
=
"400px"
EditorContentFilters
=
"DefaultFilters"
EditorStripFormattingOptions
=
"MSWord,Css,Font,Span,ConvertWordLists"
DisplayMode
=
"Write"
FixCursorIssue
=
"True"
>
</
sf:HtmlField
>
</
div
>
Hello Andrei,
Add the CSS from below to your backend theme in order to resize Content designers.
.sfContentBlocksDesignerWrp
overflow: hidden;
padding-bottom: 20px;
width: 660px;
Katia,
I have quite a few CSS files in my Back-end Theme. Which one do I put it in?
Many thanks for the suggestion.
Andrei
Hi Andrei,
You should have Reset.css and Layouts.css files in the backend them which have to change.
Kind regards,
Ivan Dimitrov
the Telerik team
Ivan,
Thanks for your reply. But as I mentioned in one of my previous replies "... it looses the ability to auto-resize when the margin is dragged wider..." It does invoke it as wider, but now when I drag the margin of the Editor,
the editing area stays the same. That means that I can only have one size now and that's it.
I still can't get why does this Theme which was the Telerik University theme does not work. All I changed was a couple of images and that's about it.
I need the ability to auto resize, because when I have a table to edit and some cells are completely empty, they come up as collapsed. They do not redraw themselves properly until I don't drag the margin so that they can redraw themselves again.
Many thanks,
Andrei
Hi Andrei,
I sent a reply to one of your support tickets about the auto resize - resizeToContent function. This function is called from the base and it is always set to the base value, which means that you cannot easily use
setWidth and setHeight function of the designerBase - they get overridden.
Regards,
Ivan Dimitrov
the Telerik team
Yeah I know Ivan, I just thought Katia knew a different way. I guess she was not aware of the ticket.
I am thinking to re-download one of the Themes and start again from scratch on them. Why would it bring it like that I cannot think of anything. I will change one thing at a time and so hopefully, I can get a theme working fine.
Can you suggest a theme that is crrently working ok that I can start with?
Many thanks,
Andrei
Hi Andrei,
Rad Editor does not resize when you resize Content block window by dragging its margins. This is not implemented. However, we have added Toggle full screen button which will maximize the whole window like shown in the screenshot.
The theme I suggest is Default backend theme.
Regards,
Katia
the Telerik team
Come one Sitefinity! A CMS system with such a bad editor integration I do not understand! Telerik who develop this editor should be ashamed! Peter
Katia,
Thank you very much for your reply. I appreciate the Toggle button. It is a very useful feature. I shall give it a go, although the issue is the initial view (at load time).
You are suggesting the Basic theme, but can I change it as easily and as extensively as I can..., lets say the University one? I want to change quite a few things in it, and I was under the impression that the Basic theme was embedded.
Thank you very much for all your help.
Andrei
Hi Andrei,
The Default backend theme is embedded but I have attached it and you can try using it. We will consider the option to make it easier to add CSS which will override some specific rules of backend theme.
Let us know if you need further help.
Greetings,
Katia
the Telerik team
Katia,
I am using the Default Theme now and the Content block control comes up as normal,
but it seems that the white area where the editing happens does not resize when I drag
the margin any more (see attached image). Is that down to the theme or the actual
version of Sitefinity that I am using? I want the Content block to come up in its proper size
as well as the resizing functionality. Is that not possible?
Many thanks again,
Andrei
Hi Andrei,
The resize of the editor when the window is being resized has nothing to do with the theme. Actually this functionality is not implemented. We have plans to improve Content block widget user experience. Our idea is that the size of the Content block widget window should be percentage of the browser window. We will consider your case as well.
Let us know if you need further help.
Kind regards,
Katia
the Telerik team
Katia,
The resize of the editor when the window is being resized has nothing to do with the theme.
When I use the old theme I had, the white area is resizing as I drag one of the sides (see attached).
When I use your new (Default) theme it does not (as per my previous image). This points to the theme
if using one theme, teh white area resizes and using teh other theme it does not.
Thanks,
Andrei
Hello Andrei,
I have logged the issue in PITS. You can vote for it and follow its status here.
Greetings,
Katia
the Telerik team