Copied to clipboard

Flag this post as spam?

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


  • Clickfarm 77 posts 161 karma points
    Jan 19, 2015 @ 23:00
    Clickfarm
    0

    Rich Text Editor and Multiple Media Picker in custom section

    I created a custom section using this article http://www.nibble.be/?p=440 and this example project https://github.com/TimGeyssens/UmbracoAngularBackofficePages but I don't see any examples of how to implement different editors such as the multiple media picker and rich text editor.

    can someone please let me know the best (and current) method of implementing the rich text editor and multiple media picker for custom sections?

    thanks,

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jan 19, 2015 @ 23:23
    Dennis Aaen
    1

    Hi Matt,

    Perhaps, this blog post from Markus Johansson can help you on how to use the rich text editor in a custom section http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section.aspx

    I so think that this documenation could be nice to have http://umbraco.github.io/Belle/#/api/umbraco.services.dialogService for the media picker question in a custom section,in collaboration with the AngularJS Workbook here https://github.com/umbraco/AngularWorkbook this is a guide to create your own property editors,

    Hope this helps,

    /Dennis

  • Clickfarm 77 posts 161 karma points
    Jan 19, 2015 @ 23:25
    Clickfarm
    0

    Hi, i tried all 3 examples in that article but none of them worked. I have no clue what version of umbraco that article was built for but it's not working in Umbraco 7.2

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jan 19, 2015 @ 23:39
    Dennis Aaen
    0

    Hi Matt,

    Perhaps this article from the last year Umbraco advent calendar written by Dave Woestenborghs http://24days.in/umbraco/2014/umbraco-angular-tips/

    Hope this can help you a step further.

    /Dennis

  • Clickfarm 77 posts 161 karma points
    Jan 19, 2015 @ 23:43
    Clickfarm
    0

    Hi, thanks but i checked that article too and it points to the first article you mentioned.

    Is is possible that anyone has any examples at all for how to implement the rich text editor and the multiple media picker in a custom section?

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jan 20, 2015 @ 00:11
    Dennis Aaen
    0

    Hi Matt,

    At the risk of that you already have seen this thread, I try to post this anyway :). Here is a post on how to reuse an Umbraco property editor from the dialog service, hope this can help you in some way

    http://our.umbraco.org/forum/umbraco-7/developing-umbraco-7-packages/55678-How-to-reuse-an-Umbraco-Property-Editor-from-dialogService

    /Dennis

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 20, 2015 @ 09:58
    Dave Woestenborghs
    0

    Hi Matt,

    As Dennis already pointed out I describe this behavior in this article : http://24days.in/umbraco/2014/umbraco-angular-tips/

    You can find the source code for that here : https://bitbucket.org/dawoe/umbukfestival2014/src

    Also my video about building custom sections from the Umbraco UK Festival is up. I talk about this in the video also : http://umbracoukfestival.co.uk/videos

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 21, 2015 @ 18:51
    Clickfarm
    0

    Thanks,

    I've downloaded your umbukfestival2014 project and have it running locally. I'll take a look at how you are adding a richtext editor to the custom section.  Would there be an example in there of how to add a multiple media picker as well?

  • Clickfarm 77 posts 161 karma points
    Jan 22, 2015 @ 20:26
    Clickfarm
    0

    Dave,

    Thanks for your assistance, your example project was a huge help. Could you help point me in the right direction with any of the following?

    1) how do I add format styles to the richtext editor in the custom section?

    2) how do I use other data types such as the mutliple media picker?

    Thanks agin!

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 22, 2015 @ 21:39
    Dave Woestenborghs
    1

    Hi Matt,

    You can add styles to Richt Text editor in the datatype section. Just like you would for your doctypes.

    To load other datatypes is just a matter of calling the api with name of your datatype.

    Here is a example to use the built in Date Picker

    In your controller you will do something like this :

     datatypeResource.getByName('Date Picker').then(function (result) {
                    $scope.dateField= [
                       {
                           alias: 'datefield',
                           label: 'Date',
                           view: result.data.view,
                           config: result.data.config,
                           value: $scope.session.mydate
                       }
                    ];
                });

      $scope.$watch('dateField', function () {
    if ($scope.dateField!= undefined) {
    $scope.session.mydate= $scope.dateField[0].value;
    } }, true);

    And then in your view you will have this

     <div ng-repeat="editor in dateField">
    <umb-editor model="editor"></umb-editor> </div>

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 22, 2015 @ 23:06
    Clickfarm
    0

    Thanks Dave,

    regarding the richtext editor I know how to apply a stylesheet to the richtext editor that is used in normal document type templates, but that doesn't apply for the richtext editor in the custom section. how do i apply the stylesheet specifically for richtext editors inside custom sections?

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 23, 2015 @ 11:37
    Dave Woestenborghs
    0

    You just create a new rich text editor based datatype in the backend.

    In the API call for the datatype use the new RTE datatype name.

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 23, 2015 @ 15:52
    Clickfarm
    0

    Hi Dave, I don't think I'm explaining myself correctly so let me show a couple pics. I'm using the exact same richtext editor in my document types as i am in my custom section, yet the format styles are not being applied in the custom section.

    content page using richtext editor:

    custom section using same richtext editor:

     

    notice the formats dropdown?

    thanks for your help here.

     

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 23, 2015 @ 16:21
    Dave Woestenborghs
    100

    How do you add the rich text editor to your section.

    I have 2 ways in my code from the presentation. You should have the way I use in the session views.

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 23, 2015 @ 18:07
    Clickfarm
    0

    ok, now i've tried implementing the richtext editor the way you did it in both the speakers and now sessions custom sections. niether of those pull in the format styles that are added to my editor in the backoffice.

    are you able to verify on your end that you do have that Format dropdown populated in your richtext editor in either of those custom sections?

    just wondering if maybe it's a bug.

    thanks.

     

    EDIT: disregard last message. I had to update the edit view code as well to look for rteField instead of RichtextEditor. Works great now, thank you for your help!

    Matt

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Jan 26, 2015 @ 10:34
    Dave Woestenborghs
    0

    Nice to see you got it solved.

     

    Dave

  • Zac 239 posts 541 karma points
    Apr 13, 2017 @ 16:37
    Zac
    0

    Awesome work Dave! Thanks for putting this together, this was a big help on integrating some data types into our custom tree.

Please Sign in or register to post replies

Write your reply to:

Draft