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

Forums / General Discussions / How to enlarge the size of text editor in modal

How to enlarge the size of text editor in modal

3 posts, 0 answered
  1. Erhan
    Erhan avatar
    7 posts
    Registered:
    03 Nov 2015
    17 Feb
    Link to this post

    When adding a news item, the modal window containing the text editor is opened at a narrow width.

    We are using 1920 px wide screen. We would like to use the text editor spaciously. I couldn't find a way to overwrite the witdh of .sfContentBlocksDesignerWrp class which is stated in the dynamically created Telerik Library CSS file.

    The page containing the text editor seems to be /Sitefinity/Dialog/PropertyEditor page. Where is this file, that I can write a media style rule in this file to overwrite the width of that class. Or where can I find a CSS file that I can write a rule to overwrite the style again. There is no CSS file referred in this PropertyEditor page.

     

    Regards.

  2. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    01 Dec 2016
    22 Feb
    Link to this post
    Hello,

    One option for achieving this behavior would be to override the default template of the HtmlField and use some jQuery to change the size of the whole iFrame.

    Adding the following code at the bottom of the template should do the trick:

    <script>
        setTimeout(function () {
            $('iframe').attr('style', 'width: 1500px; height: 439px; margin: 0px; padding: 0px;');
        }, 100)
    </script>

    The default template for your version of Sitefinity can be found here: https://github.com/Sitefinity-SDK/SitefinityResources/releases

    To instruct Sitefinity to use the custom template instead of the default one navigate to Administration -> Settings -> Advanced -> Controls -> View Map -> Create new:

    HostType:
    Telerik.Sitefinity.Web.UI.Fields.HtmlField, Telerik.Sitefinity
    LayoutTemplatePath: ~/CustomHtmlField.ascx (Relative path to the custom template)

    Regards,
    Velizar Bishurov
    Telerik
     
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Erhan
    Erhan avatar
    7 posts
    Registered:
    03 Nov 2015
    24 Feb in reply to Velizar Bishurov
    Link to this post

    Hi Velizar,

    Thank you for your explanations. I have done it by writing CSS rules in the HtmlField.ascx files like below:

    <style type="text/css">
                        .sfNewContentForm {
                            width: 1150px;
                        }
                        body.sfreContentArea{
                            max-width:initial;
                        }
                        .sfNewContentForm .sfTxt{
                            width:100%;
                        }
                    </style>

    Of course it would be better to write it in media rules for the proper size.

    I dont't think it is a proper way to make this by javascript. CSS is more convenient.

    On the other hand, it was a bit hard to complete the procedures beacuse I didn't know which ascx file to edit. I have found it by searching it and spent so much time for this.

    Best regards.

    Erhan Saydam

3 posts, 0 answered