Copied to clipboard

Flag this post as spam?

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


  • John Churchley 272 posts 1258 karma points c-trib
    Mar 24, 2015 @ 13:26
    John Churchley
    2

    Grid Colorpicker Prevalue Editor

    Hi,

    Does anyone know why the colour picker prevalue editor is not included in the prevalueeditors folder? I've noticed it exists in umbraco/Views/propertyeditors/colorpicker/colorpicker.prevalues.html the controller looks good. I've tested it and seems fine it's a great addition if you need to allow content editors the ability to set background colours.

    For anyone interested I simply added the file to umbraco/Views/prevalueeditors folder removing prevalues from the file name. Then added the following JSON config to the datatype grid under styles

     {
        "label": "Set a background colour",
        "key": "background-colour",
        "view": "colorpicker",
        "modifier": "textstring"
      }
  • Tove 15 posts 35 karma points
    May 10, 2015 @ 10:16
    Tove
    0

    Great help. Thanks! :-)

  • Wade 1 post 21 karma points
    May 29, 2015 @ 16:22
    Wade
    0

    I apologize but I am not sure where you added the JSON config. Do you mean you updated the grid.default.config.js under Views/propertyeditors/grid/config/?

  • schlubadub 102 posts 617 karma points
    Jun 23, 2016 @ 05:37
    schlubadub
    0

    You probably already know the answer, but for anyone else reading this the JSON config goes into the Umbraco admin:

    • Navigate to the Developer section
    • Expand Data Types
    • Find your Grid datatype (e.g. Grid TextPage) and select it
    • Scroll down until you see "Styles" (after Settings)
    • Click Edit in the Styles section
    • Copy-Paste the provided JSON underneath the other JSON that is displayed
    • Click Save to save the new JSON.
    • "Set a background colour" should appear in the Styles list
    • Click Save to apply to the Data Type.
  • Amir Khan 1282 posts 2739 karma points
    Dec 01, 2015 @ 20:58
    Amir Khan
    0

    Any ideas on how to get this with the approved color datatype?

  • Pawel Bres 39 posts 160 karma points c-trib
    Sep 15, 2016 @ 19:38
    Pawel Bres
    0

    If anyone will be looking for ColorPicker editor for Grid DataType Settings\Styles I've prepared gist with the editor file and usage instructions

    You can find it here: https://gist.github.com/pbres/a5f58be8debf98b29f6f81ad3f0f5ed5

  • Bjarne Fyrstenborg 1280 posts 3990 karma points MVP 7x c-trib
    Dec 08, 2016 @ 13:09
    Bjarne Fyrstenborg
    0

    I submitted a few months ago this PR https://github.com/umbraco/Umbraco-CMS/pull/1503 to support a color prevalue editor.

    /Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft