+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Content Block Editor - ToolsFile.xml

Content Block Editor - ToolsFile.xml

71 posts, 0 answered
  1. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    09 Apr 2011
    Link to this post
    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 http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/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
  2. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    11 Apr 2011
    Link to this post
    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
  3. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    12 Apr 2011
    Link to this post
    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
    the Telerik team

  4. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    12 Apr 2011
    Link to this post
    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
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Apr 2011
    Link to this post
    Hi Andrei,

    Yes this feature is logged on our Sitefinity 4.2 plan.

    Kind regards,
    Radoslav Georgiev
    the Telerik team

  6. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    12 Apr 2011
    Link to this post
    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
  7. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Apr 2011
    Link to this post
    Hello Andrei,

    Granted.

    Regards,
    Radoslav Georgiev
    the Telerik team

  8. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    17 Apr 2011
    Link to this post
    @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.
  9. jocelyn payneau
    jocelyn payneau avatar
    51 posts
    Registered:
    07 Dec 2009
    28 Apr 2011
    Link to this post
    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".

    Could you help me please ASAP with this issue (which is only one among all issues with upgrade)?

    Regards,
    Jocelyn
  10. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    28 Apr 2011
    Link to this post
    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
  11. higgsy
    higgsy avatar
    336 posts
    Registered:
    05 Aug 2010
    04 May 2011
    Link to this post
    ?? Still no response!
  12. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    05 May 2011
    Link to this post
    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>

     and also did the mapping so now I have a controlsconfig file that looks like this:
    <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>
  13. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    05 May 2011
    Link to this post
    @Nidhi
      That view changed since they added in the new shared content selector controls...

    Have a look here
  14. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    05 May 2011
    Link to this post
    Thanks Steve,
    Your solution fixed my problem!
  15. Brandon
    Brandon avatar
    50 posts
    Registered:
    30 Jul 2009
    06 May 2011
    Link to this post
    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.
  16. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 May 2011
    Link to this post
    Hi ,

    HtmlField was not extended for 4.1 released. There will be some new features with Q2 release.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  17. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    13 May 2011
    Link to this post
    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
  18. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    13 May 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  19. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    13 May 2011
    Link to this post
    I did not see Apply Css Class in the Content Editor tool box for Sitefinity 4.1. Is it there?

    Thanks
    Venkat
  20. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    17 May 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  21. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    14 Jun 2011
    Link to this post
    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 
  22. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Jun 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  23. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    05 Jul 2011
    Link to this post
    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);
        }
    },

    At start-up when it runs the refreshUI() function it executes the dialogBase.setWndWidth(800); but the width does not get applied. Yet once the content block is fully loaded and I _ClearAllTextfields, the width then is applied. It is very strange. I was thinking if it is possible to detect an event when the content block is fully loaded and do the resizing there. What do you think?

    Many thanks,
    Andrei
  24. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Jul 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  25. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    06 Jul 2011
    Link to this post
    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);
    },

    Thanks,
    Andrei
  26. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Jul 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  27. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    06 Jul 2011
    Link to this post
    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>

    However, it looses the ability to auto-resize when the margin is dragged wider. Would you apply CSS to the sf:FormManager then? I tried to give it a width="800px" but it took no notice of it. sfContentBlocksDesignerWrpapply cannot be found in the project either.
  28. Katia
    Katia avatar
    194 posts
    Registered:
    01 Jul 2016
    12 Jul 2011
    Link to this post
    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;
    }


    Regards,
    Katia
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  29. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    12 Jul 2011
    Link to this post
    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
  30. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    12 Jul 2011
    Link to this post
    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
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
71 posts, 0 answered
1 2 3