We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37105
    • 194 Posts
    Quote from: donshakespeare at Sep 28, 2015, 11:31 AM
    In 2.1.1, core.modx.php should not even exist. Everything was moved to MODx snippet.

    Go to responsivefilemanagerConnector snippet - properties,
    find rfmUserGroups [Comma-separated list of Who can access RFM]

    Use noAccessMessage to customize the message

    Just tested it again, it works!

    Found the setting but I am not able to change setting of standard property set. Seems to be read only. When changing the value it's been resetted on save. I did create a custom property set, but I don't know where to tell Responsive Filemanager to use my custom property set.

    About the core.modx.php: my mistake, meant to write config.modx.php smiley [ed. note: donquicky last edited this post 8 years, 6 months ago.]
      Codeplaza Webdesign: for professional websites at low cost
      • 42562
      • 1,145 Posts
      It is locked but not readonly.
      Default can be changed, but changes will be lost if you upgrade.

      Sometimes MODx Manager resets a field when you use mouse scroll wheel. It is very very very annoying.

      What I do:
      1. change field
      2. click safely outside of field
      3. make sure my changes are still there
      4. save property set
      5. save snippet

      To use your own Custom Property Set in RFM (see TinymceWrapper sample resource for brief mention)
      Add pset=yourCustomPSet parameter to your RFM url wherever and however you access it.

      If you access RFM in MODx Manager, there are two ways (which you already know)
      Manager Top Nav
      Through Rich Text Editor

      Both urls are found in the TinymceWrapper plugin properties (of course create your own property set for this main plugin )
      Carefully edit
      1. responsivefilemanagerBrowserRTEurl
      MODx.config.assets_url+"components/tinymcewrapper/responsivefilemanager/filemanager/dialog.php?type=0&popup=1"
      change to
      MODx.config.assets_url+"components/tinymcewrapper/responsivefilemanager/filemanager/dialog.php?type=0&popup=1&pset=yourCustomPSet"

      2. responsivefilemanagerBrowserTopNAVurl
      MODx.config.assets_url+\'components/tinymcewrapper/responsivefilemanager/filemanager/dialog.php?type=0\'
      change to
      MODx.config.assets_url+\'components/tinymcewrapper/responsivefilemanager/filemanager/dialog.php?type=0&pset=yourCustomPSet\'
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 37105
        • 194 Posts
        DonShakespear, thanks for your clear answer. When changing values in grid I always use context menu to update record. Just to be sure the value has been updated succesful. Even then the property set won't update.

        It has to be something in upgrading one of the earlier versions. I just uninstalled latest version and reinstalled it and now I am able to set custom property sets and also it recognises the suffix for the chunks right out the box smiley

        Thanks again!
          Codeplaza Webdesign: for professional websites at low cost
          • 42562
          • 1,145 Posts
          You are welcome.
          Glad you got it sorted.
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 14919
            • 19 Posts
            Hi, I have most of the TinyMCE Wrapper working. Great job! I am running into two issues.

            1) I need to add videos and make them responsive.

            I have the media plugin added.

            When I add an iframe for video it puts a <p> tag around it and strips the height and width from the element.

            I tried to switch the tag to a <div> but it reverts to a <p> tag.

            This is the site and the page and you can see when I embed an iframe with height and width like on other sites it removes them.
            http://fl01.toastserver.com/~episcopa/index.php?id=19


            Guessing it is something I need to allow in the file TinymceWrapperContent (which I have probably butchered trying to allow iframes inside divs - but not really understanding it fully)

            tinymce.init({
            selector : "#ta",
            [[+commonTinyMCECode]]
            statusbar: true,
            menubar: true,
            content_css: "assets/css/ECMN-style.css",
            plugins: "autoresize,contextmenu,media,preview,paste,image,wordcount,fullscreen,code,link,charmap,searchreplace,textpattern,emoticons,insertdatetime",
            paste_word_valid_elements: "a,div,b,strong,i,em,h1,h2,h3,p,blockquote,ol,ul,pre",
            valid_elements: "iframe[*],object[*],audio[*],div[*],-span[!title|!class<test test2],a[href|target|class|rel|title|data-ajax|data-iframe],strong,div[src|data-iframe],b,-p[class<text-align-left?text-align-center?text-align-right],br,-h1[class|data-ajax|data-iframe],-h2[class|data-ajax|data-iframe],-h3[class|data-ajax|data-iframe],-img[!src|!alt|!class=round_img|data-ajax|data-iframe],em,-blockquote,pre[class],-ol,-ul,-li,-code[class]",
            valid_children: "-li[ul],-li[ol],-li[div],-strong[*],-em[*],-h1[*],-h2[*],-h3[*],-div[*],-a[strong|em|h1|h2|h3|p|div],blockquote[p|ol|ul|div],div[data-iframe]",
            resize:true,
            autoresize_min_height:100,
            toolbar: "newdocument | undo redo | blockquote | bold | italic | bullist numlist | link unlink | media | image responsivefilemanager | styleselect | searchreplace | charmap | fullscreen | code",
            contextmenu: "fullscreen | bold | italic | bullist | removeformat | link | image | code"
            });




            2) On another note: I see you have an option for adding classes to links and images. I would love the ability to add a menu in the editor that has classes that can apply to a <p> tag or other elements (for example the ability to make a single word red).

            Any help is appreciated as I am not a heavy duty programmer!

            Jean
              • 42562
              • 1,145 Posts
              1. For more iframe attributes, add this line
              extended_valid_elements:"iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]",

              http://www.tinymce.com/wiki.php/Configuration:extended_valid_elements
              Height and width are better off put in CSS, hence they are not considered in the default.

              Check TWcommonCode chunk for (or add what works)
              forced_root_block : 'p' //change to div if you want, or leave quotes empty
              //risky, because it affects all your document from then on

              TinyMCE will wrap in a root element all other elements it semantically considers inline (iframe is by default an inline element)

              To keep the div from being stripped out
              remove the -div[*] from valid_children
              that phrase removes all divs that have children
              valid_children: "-li[ul],-li[ol],-li[div],-strong[*],-em[*],-h1[*],-h2[*],-h3[*],-a[strong|em|h1|h2|h3|p|div],blockquote[p|ol|ul|div],div[data-iframe]",


              2. You want to make a word red with inline CSS style or CSS class?
              What you are asking is quite simple and many ways exist to achieve exactly what you want.
              For a start see http://www.tinymce.com/wiki.php/Configuration:style_formats
              Let me know if you can't make tail or head of it.

              Cheers
                TinymceWrapper: Complete back/frontend content solution.
                Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • Thanks. These changes made it work, even after the latest version of MIGX. Will there be a coming together of minds on getting these 2 to work together or will this be required to be done during each update?

                Quote from: donshakespeare at Sep 21, 2015, 04:51 PM
                @rx2
                I see that too.
                This is what I am doing in the meantime until Bruno checks it out. (not sure about MIGXdb)

                In TinymceWrapperMIGX chunk, replace content with:
                tinymce.init({
                mode : "specific_textareas", //DO NOT TOUCH
                editor_selector : "migx-richtext", //DO NOT TOUCH
                [[+commonTinyMCECode]]
                plugins:"autoresize,preview,paste,contextmenu,image,wordcount,fullscreen,code,link,charmap,searchreplace,textpattern,emoticons,insertdatetime",
                paste_word_valid_elements: "a,div,b,strong,i,em,h1,h2,h3,p,blockquote,ol,ul,pre",
                valid_elements: "iframe[*],object[*],audio[*],-span[!title|!class<test test2],a[href|target|class|rel|title|data-ajax|data-iframe],strong,b,-p[class<text-align-left?text-align-center?text-align-right],br,-h1[class|data-ajax|data-iframe],-h2[class|data-ajax|data-iframe],-h3[class|data-ajax|data-iframe],-img[!src|!alt|!class="round_img|data-ajax|data-iframe],em,-blockquote,pre[class],-ol,-ul,-li,-code[class]"," valid_children:="" "-li[ul],-li[ol],-li[div],-strong[*],-em[*],-h1[*],-h2[*],-h3[*],-a[strong|em|h1|h2|h3|p|div],blockquote[p|ol|ul],pre,div",="" resize:true,="" autoresize_min_height:100,="" autoresize_max_height:400,="" toolbar:="" "newdocument="" |="" fullscreen="" preview="" undo="" redo="" blockquote="" bold="" italic="" aligncenter="" bullist="" numlist="" link="" unlink="" image="" styleselect="" charmap="" emoticons="" insertdatetime="" searchreplace",="" contextmenu:="" "removeformat="" code",="" setup:="" function(editor)="" {="" editor.on('mouseleave',="" function(evt)="" tinymce.activeeditor.save();="" console.log("saved");="" debug="" stuff="" });="" }="" [="" code]="" in="" tinymcewrapper="" plugin="" default="" properties,="" create="" this="" property:="" [b]migxrichtext[="" b]="" set="" type="" to="" [b]yes="" no[="" value="" [b]true[="" area="" [b]01="" textareas="" transform[="" [b]save="" property="" set[="" [u][b]before="" last="" curly="" bracket[="" b][="" u],="" paste:="" ="" $migxrichtext="$modx-">getOption('migxRichText', $sp);
                $migx = '';
                $migxChunk = $modx->getChunk('TinymceWrapperMIGX' . $suffix, array('commonTinyMCECode'=>$commonCode));

                if ($migxChunk) {
                $migx = $migxChunk;
                }
                if ($migxRichText == 1){
                //do not load these twice when resources are being edited
                if ($modxEventName == 'OnManagerPageInit') {
                if ($jQuerySrc) {
                $modx->regClientStartupHTMLBlock("<script src="" . $jQuerySrc . ""></script>");
                }
                if ($tinySrc) {
                $modx->regClientStartupHTMLBlock("<script src="" . $tinySrc . ""></script>");
                }
                }
                $migxTinyMCE = '
                $(document).on("mouseenter", "div[id^=modx-window-mi-grid]", function() {
                '.$migx.'
                })
                ';
                $modx->regClientStartupHTMLBlock("<script>" . $browserFunctions . $migxTinyMCE . "</script>");
                }
                [b]SAVE PLUGIN[/b] In [b]core/components/migx/elements/tv/tinymcewrapper.tpl[/b], replace content with:
                <input id="tv{$tv->id}_checkbox" data-tiny="tv{$tv->id}" checked="checked" title="Disable TinyMCE" class="tinyTVcheck" type="checkbox">
                <textarea rows="15" style="width:99%;" id="tv{$tv->id}" name="tv{$tv->id}" class="modx-richtext rtf-tinymcetv tv{$tv->id} migx-richtext" {literal}onchange="MODx.fireResourceFormChange();" {="" literal}="">{$tv->get('value')|escape}</textarea>
                <script>
                $(".tinyTVcheck").on("mouseup",function() {
                autoSaveTextAreas($(this).attr("data-tiny"));
                if (this.checked) {
                tinymce.get($(this).attr("data-tiny")).hide();
                $(this).trigger("change").attr("title","Enable TinyMCE");
                }
                else{
                tinymce.get($(this).attr("data-tiny")).show();
                $(this).trigger("change").attr("title","Disable TinyMCE");
                }
                });
                </script>
                I hope this is clear enough.</test>[/quote]
                  • 42562
                  • 1,145 Posts
                  rx2 that my solution is now extinct.
                  http://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=10#dis-post-532302
                  http://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=10#dis-post-532327

                  Just update your MIGXtv chunk with the suggested one.
                  tinymce.init({
                  mode: "exact",
                  elements: "tv[[+tv_id]]",
                  [[$TinymceWrapperCommonCode]]
                  plugins:"autoresize,preview,paste,contextmenu,image,wordcount,fullscreen,code,link,charmap,searchreplace,textpattern,emoticons,insertdatetime",
                  paste_word_valid_elements: "a,div,b,strong,i,em,h1,h2,h3,p,blockquote,ol,ul,pre",
                  valid_elements: "iframe[*],object[*],audio[*],-span[!title|!class<test test2],a[href|target|class|rel|title|data-ajax|data-iframe],strong,b,-p[class<text-align-left?text-align-center?text-align-right],br,-h1[class|data-ajax|data-iframe],-h2[class|data-ajax|data-iframe],-h3[class|data-ajax|data-iframe],-img[!src|!alt|!class=round_img|data-ajax|data-iframe],em,-blockquote,pre[class],-ol,-ul,-li,-code[class]",
                  valid_children: "-li[ul],-li[ol],-li[div],-strong[*],-em[*],-h1[*],-h2[*],-h3[*],-a[strong|em|h1|h2|h3|p|div],blockquote[p|ol|ul],pre,div",
                  resize:true,
                  autoresize_min_height:100,
                  autoresize_max_height:400,
                  toolbar: "newdocument | fullscreen preview | undo redo | blockquote | bold | italic | aligncenter | bullist numlist | link unlink | image | styleselect | charmap emoticons insertdatetime | searchreplace",
                  contextmenu: "removeformat | link | image | code",
                  setup: function(editor) {
                        editor.on('mouseleave', function(evt) {
                        tinyMCE.activeEditor.save();
                        //console.log("saved");//debug stuff
                      });
                      }
                  });

                  Bruno17 has already supported TinymceWrapper in 2.9.6 +

                  Thanks for the feedback
                    TinymceWrapper: Complete back/frontend content solution.
                    Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                    5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                    • 36549
                    • 572 Posts
                    @donshakespeare - Just want to say thanks for all your work on this plugin, it's a triumph smiley
                      www.9thwave.co.uk
                         WEB | DESIGN | PRINT
                      • 36549
                      • 572 Posts
                      Hi,
                      I am having trouble getting a TV to display a richtext area. This is just a standard richtext TV which currently just displays a small text area. Is there something i should do to enable this?
                      thanks
                        www.9thwave.co.uk
                           WEB | DESIGN | PRINT