Copied to clipboard

Flag this post as spam?

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


  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Feb 21, 2017 @ 13:05
    Jeffrey Schoemaker
    0

    Add a preview device

    Hi,

    does anyone know if it's possible to add a device to the list of devices in the previewmode (left sidebar)?

    enter image description here

    Jeffrey

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 21, 2017 @ 14:07
    Lee Kelleher
    100

    Hi Jeffrey,

    I was curious about this too, but unfortunately they are currently hardcoded in the angular controller...

    https://github.com/umbraco/Umbraco-CMS/blob/dev-v7/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js#L17

    Cheers,
    - Lee

  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Feb 21, 2017 @ 14:42
    Jeffrey Schoemaker
    1

    Hi Lee,

    thanks for the answer and I already thought this was the only place :(...

    Cheers, Jeffrey

  • MarcC 49 posts 356 karma points
    Jun 01, 2018 @ 12:58
    MarcC
    0

    Hey guys, not sure when this came into umbraco but in recent versions you can add your own device in the Umbraco/js/umbraco.canvasdesigner.js file.

    If you want to add a custom CSS style that the canvas designer will use you can add it into Umbraco/assets/css/canvasdesigner.css

    Example :

    canvasdesigner.css

    .desktop-sm {
        width: 1280px;
        height: 768px;
    }
    

    umbraco.canvasdesigner.js Ln 24..+

     $scope.devices = [
            { name: "desktop",
              css: "desktop",
              icon: "icon-display",
              title: "Desktop" 
            },
            { name: "small desktop",
              css: "desktop-sm border",
              icon: "icon-laptop",
              title: "Small Desktop" },
           ...
    

    Cheers,

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft