Copied to clipboard

Flag this post as spam?

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


  • Horst Sterr 171 posts 133 karma points
    Dec 18, 2013 @ 20:05
    Horst Sterr
    0

    Umbraco 7 Compatibility

    Hi Jon,

    do you have any plans making MySnippets compatible with Umbraco 7?

  • Jon Dunfee 199 posts 468 karma points
    Dec 18, 2013 @ 20:49
    Jon Dunfee
    0

    Yep, what I will be doing over the holidays.  There are a number of features I'm considering adding (snippets for nearly all the editors, not just wysiwyg, sorting, config in the configs folder).  Are there any suggestions you would like to see?

  • Horst Sterr 171 posts 133 karma points
    Dec 24, 2013 @ 14:36
    Horst Sterr
    0

    No special wishes at the moment. But good to hear that it's going on.

    /horst 

  • Jon Dunfee 199 posts 468 karma points
    Mar 21, 2014 @ 16:23
    Jon Dunfee
    0

    I finally had an opportunity to install MySnippets on 7.1.0 RC today to assess what needs to be done.  Looks like everything seems to be working except the most important piece: adding the actual icon to the toolbar on the editor. 

  • Jonas Henriksen 32 posts 90 karma points
    Jul 02, 2014 @ 08:57
    Jonas Henriksen
    0

    Hi Jon. Have you had the time to fix this last important issue? And have you tested MySnippets on the newest versions of Umbraco? Good work! :-)

  • Jon Dunfee 199 posts 468 karma points
    Jul 02, 2014 @ 15:38
    Jon Dunfee
    0

    I'm really close, it "almost" works as-is but doesn't meld well with TinyMCE which is where I'm at.  I will get it, just been really busy as of late.  Future looks good in the next week or so especially since I'm working on a U7 site now.

  • Jonas Henriksen 32 posts 90 karma points
    Jul 04, 2014 @ 10:47
    Jonas Henriksen
    0

    Thanks Jon! Looking forward to a new version for u7 :-)

  • Jonas Henriksen 32 posts 90 karma points
    Jul 22, 2014 @ 11:02
    Jonas Henriksen
    0

    Hi Jon! How far are you with the solution for u7? I understand if you're almost melting in the summer heat :-)

  • horsted 74 posts 136 karma points
    Oct 10, 2014 @ 14:27
    horsted
    0

    Hi Jon,

    I wonder if you ever finished the v7 compatible version, as we are in need of the exact functionality?

    Thans in advance :-)

  • Jon Dunfee 199 posts 468 karma points
    Oct 10, 2014 @ 15:34
    Jon Dunfee
    0

    I've started it.  All works currently except the actual selection modal.  I'm rewriting it to utilize the Angular benefits of 7.  The next version will not be backwards compatible with previous versions of Umbraco.

  • Sanjay Sen 33 posts 97 karma points
    Mar 09, 2015 @ 14:37
    Sanjay Sen
    0

    Hi Jon,

    Is there any update about v7 compatible version of mysnippets. I really need this kind of functionality in one of my projects. Would be great if you can update about it.

    Many thanks in Advance.

    Sanjay

     

     

     


  • Sanjay Sen 33 posts 97 karma points
    Mar 10, 2015 @ 13:53
    Sanjay Sen
    0

    Hi Jon,

    Any update about new release compatible witn v7 Umbraco.

    Thanks

    Sanjay

     

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Aug 14, 2015 @ 15:52
    Tom Fulton
    1

    Hi Jon,

    Not sure how far you got on this, but I had a client who really wanted to keep this functionality after a v6 upgrade and I think I managed to get it all working. Let me know if you'd like to collab on getting a new release out!

    Thanks, Tom

  • Jon Dunfee 199 posts 468 karma points
    Aug 14, 2015 @ 18:10
    Jon Dunfee
    0

    I'd love to see what you came up with. The source is in open https://bitbucket.org/blitzjon/umbraco.mysnippets

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Aug 14, 2015 @ 21:34
    Tom Fulton
    0

    Looks like that repo is private ;). If you want to open it up I can send a pull request with what I've done so far.

  • Gerty Engrie 130 posts 489 karma points c-trib
    Mar 02, 2016 @ 16:42
    Gerty Engrie
    0

    Hi all,

    for all of you who are waiting patiently on the v7 update. I've made some adjustments... So, install the package. Copy (or move, living on the edge) the folder in \umbraco_client\Tinymce3\Plugins\mysnippets to \umbraco\lib\tinymce\plugins\mysnippets In tinymce.config you'll also want to change the url to the image if you moved the folder. I also put the mysnippets on priority 75.

    <command>
          <umbracoAlias>mysnippets</umbracoAlias>
          <icon>lib/tinymce/plugins/mysnippets/img/insSnippet.gif</icon>
          <tinyMceCommand value="" userInterface="false" frontendCommand="mcemysnippets">mysnippets</tinyMceCommand>
          <priority>75</priority>
        </command>
    

    Delete the editor...js files. Put a plugin.min.js in place and drop the following code in that file. (note: i deleted the preview folder. It had no use in our case) It will probably not be as good as the original but it's a good start for a v7 one. I kept the rest as original it does not look that good in the developer section & it has a few quirks but it works. Would be nice to have an open source repo :-)

     tinymce.PluginManager.add('mysnippets', function(editor,url) {
    
        function getNoCacheSnippetUrl() {
            var d = new Date();
            return "/config/mysnippets.xml?d=" + d.getTime(); // don't cache
        }
    
        function showDialog() {
            var win, data = {}, dom = editor.dom;
            var width, height;
            var snippets = new Array();
            var availableSnippets = new Array();
            availableSnippets.push({text:'Choose snippet', value:''});
            var generalFormItems = [];
    
            $.ajax({
                type: "GET",
                url: getNoCacheSnippetUrl(),
                dataType: "xml",
                success: function(xml) {
                    $(xml).find("MySnippet").each(function()
                    {
                        var id = snippets.length; //$(this).find('id').text();
                        var nm = $(this).find('Name').text();
                        var cd = $(this).find('Snippet').text();
                        availableSnippets.push({text:nm, value:id});
                        snippets[id] = cd;
                    });
    
                    generalFormItems =  [       
                    {
                        type: 'listbox',
                        label: 'Snippet',
                        name: 'snippet',
                        minWidth: 200,
                        values: availableSnippets,
                        autofocus: true
                    }];
                    win = editor.windowManager.open({
                        title: 'Insert snippet',
                        body: generalFormItems,
                        onSubmit: onSubmitForm
                    });
                }
            });
    
            function onSubmitForm() {
        editor.insertContent(snippets[win.find('#snippet').value()]);
                editor.nodeChanged();
            };
        }
    
        editor.addButton('mcemysnippets', {
            icon: 'custom icon-books',
            tooltip: 'Insert snippet',
            onclick: showDialog
        });
    
    });
    
  • Jon Dunfee 199 posts 468 karma points
    Mar 02, 2016 @ 19:19
    Jon Dunfee
    0

    Yeah, it would be nice if there was an open repo... oh wait, that's up to me. I've had some life and career events happen so I've been MIA. I'm in a pursuit to push Sitefinity out in favor of Umbraco so I look to pick this stuff back up now.

  • Gerty Engrie 130 posts 489 karma points c-trib
    Mar 02, 2016 @ 20:21
    Gerty Engrie
    0

    Hehe, that would be awesome, thanks! :-)

  • Dan 43 posts 72 karma points
    Feb 01, 2017 @ 09:44
    Dan
    0

    I was looking for this functionality too and found this...

    http://www.wiliam.com.au/wiliam-blog/adding-enhanced-styling-to-the-umbraco-tinymce-editor

    Works great. Some great posts on that blog.

Please Sign in or register to post replies

Write your reply to:

Draft