Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Steffen Agger 3 posts 44 karma points
    Feb 18, 2014 @ 10:43
    Steffen Agger
    0

    Umbraco RTE missing Image Max size?

    Is the RTE in Umbraco 7.0.3 missing this feature?

    Or has it simply been moved?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 18, 2014 @ 12:35
    Jeroen Breuer
    0

    Some things have changed in v7. Maybe these issues can help:

    http://issues.umbraco.org/issue/U4-4212

    http://issues.umbraco.org/issue/U4-4069

    Jeroen

  • Steffen Agger 3 posts 44 karma points
    Feb 19, 2014 @ 11:13
    Steffen Agger
    0

    Ok, I'm not sure that explains my question, but what if I wan't to insert an Image witout restrictions in the RTE?

    How would i go about it in Umbraco 7..?

  • syn-rg 282 posts 425 karma points
    Feb 20, 2014 @ 06:36
    syn-rg
    0

    I'd like to know the answer to this too. The max-width seems to be fixed to 500px.

    I'd be happy to just be able to change this value, within the js file that controls the rte. I'd just need to know which file I need to amend, as I want my width to be 680px.

    Cheers, JV

  • syn-rg 282 posts 425 karma points
    Feb 20, 2014 @ 07:16
    syn-rg
    0

    I thought I'd found the script in the Umbraco/Js/umbraco.services.js file But when I update the value from 500 to 680 nothing happens in the rte.

    createMediaPicker: function (editor, $scope) {
                editor.addButton('umbmediapicker', {
                    icon: 'custom icon-picture',
                    tooltip: 'Media Picker',
                    onclick: function () {
                        dialogService.mediaPicker({
                            onlyImages: true,
                            scope: $scope, callback: function (img) {
    
                                if (img) {
                                    var imagePropVal = imageHelper.getImagePropertyValue({ imageModel: img, scope: $scope });
                                    var data = {
                                        alt: "Some description",
                                        src: (imagePropVal) ? imagePropVal : "nothing.jpg",
                                        id: '__mcenew'
                                    };
    
    
                                    editor.insertContent(editor.dom.createHTML('img', data));
    
                                    $timeout(function () {
                                        var imgElm = editor.dom.get('__mcenew');
                                        var size = editor.dom.getSize(imgElm);
    
                                        var newSize = imageHelper.scaleToMaxSize(680, size.w, size.h);
                                        var s = "width: " + newSize.width + "px; height:" + newSize.height + "px;";
                                        editor.dom.setAttrib(imgElm, 'style', s);
                                        editor.dom.setAttrib(imgElm, 'rel', newSize.width + "," + newSize.height);
                                        editor.dom.setAttrib(imgElm, 'id', null);
    
                                    }, 680);
                                }
                            }
                        });
                    }
                });
            }
    
  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Feb 20, 2014 @ 09:21
    Jeroen Breuer
    1

    That's probably because the cache wasn't cleared. Check this post to see how to clear the cache: http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/48392-Custom-Dashboard-(UkFest-AngularJS-Demo)?p=0#comment173036

    Jeroen

  • syn-rg 282 posts 425 karma points
    Feb 21, 2014 @ 00:23
    syn-rg
    0

    Thanks Jeroen,

    I cleared the cache and set the compilation debug="true” in web.config, both steps are necessary, as I'd tried just emptying the cache to no avail.

    Cheers, Jv

Please Sign in or register to post replies

Write your reply to:

Draft