We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42562
    • 1,145 Posts
    @sottwell
    Thank you kindly.

    For Mac, seems there is a so-called easy fix...
    but I can't find any admin response to the bug

    http://www.tinymce.com/forum/viewtopic.php?id=16484
    http://www.tinymce.com/develop/bugtracker_view.php?id=4442

    http://www.tinymce.com/develop/bugtracker_view.php?id=7070
    Claims it is not a bug but a middle ground compromise

    You cannot at all with a trackpad produce TinyMCE's contextmenu?
      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.
      • 42562
      • 1,145 Posts
      treigh, is this error happening with only TinymceWrapper?
      open base_dir should not be a problem unless mt is having problem accessing the tinymcewrapper folder in assets.
      Then again, the plugin does not use anything from its folder at initial start up only TinyMCE skin CSS file.

      Are there any JavaScript errors in your dev inspector?
      In your HTML source code, is there TinyMCE loaded? It loads from CDN, so nothing for PHP to open.
      [ed. note: donshakespeare last edited this post 8 years, 7 months ago.]
        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.
        • 30585
        • 833 Posts
        @donshakespeare I doubt this error is caused by TinymceWrapper. Chrome's console isn't printing any errors. I don't see any javascript or CSS files in the source code of tinymcewrapper.html. I'll keep looking and report back if I spot something.
          A MODx Fanatic
          • 30585
          • 833 Posts
          @donshakespeare I have much better news. I installed it on the root level on the same (mt) account and it worked! I just needed to disable the basic TinyMCE plugin and voilà! So my partial conclusion is that TinymceWrapper doesn't work if MODX is installed in a sub folder. I'll need to test this assumption in other environments and report back.

          UPDATE:

          Regarding the subfolder install that isn't working, I checked the source code (in the manager) of TinymceWrapper's sample resource and I can confirm that both JavaScript files aren't loaded. So now the question is: what's preventing these files from loading in a subfolder install. [ed. note: treigh last edited this post 8 years, 7 months ago.]
            A MODx Fanatic
            • 42562
            • 1,145 Posts
            Weird!
            I have my Development/Extra Site in a subfolder.
            Test it out in a localhost subfolder, it should work there.
              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.
              • 30585
              • 833 Posts
              problem solved @donshakespeare! I'd like to report that the whole issue was caused by another custom plugin that was listing to OnParseDocument. I disabled this plugin and things are working fine. So we can definitely rule out (mt) and the sub folder as the cause. My apologies for taking so much of your time. Once again, excellent job -- I'm really loving this new editor.
                A MODx Fanatic
                • 42562
                • 1,145 Posts
                Thanks for reporting. Enjoy.

                Test out thoroughly.
                I need feedback on usage of the custom file browsers, namely elFinder.
                  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.
                  • 30585
                  • 833 Posts
                  In case someone needs to know how to allow HTML5 tags with TinyMceWrapper, I'm sharing some valuable resources:

                  First, TinyMCE valid_elements setting for HTML5.

                  To use any HTML5 tags with TinyMceWrapper, simply add them in the appropriate configuration chunk.

                  For example, the following configuration will allow article, aside, br, figcaption, figure and hr in the TinymceWrapperContent (the chunk containing settings for the resource content textarea) :
                  // Find and update the following line in your TinymceWrapperContent chunk. Repeat this step for all other configuration chunks in which you may need these rules applied.
                  valid_elements: "article,aside,br,figcaption,figure,hr,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]",
                  

                  Any tags added in the valid_element setting will not be stripped by TinyMCE when saving the resource. [ed. note: treigh last edited this post 8 years, 6 months ago.]
                    A MODx Fanatic
                  • I've updated to MIGX 2.9.5 and there is a change, in that I see a check box above my richcopy TV (which is a richtext TV type) but still no Tiny editor. Anyone else get it to work in a standard MIGX (not MIGXdb) setup that uses a TV with richtext as the type?

                      • 42562
                      • 1,145 Posts
                      @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 | link | image | code",
                      setup: function(editor) {
                            editor.on('mouseleave', function(evt) {
                            tinyMCE.activeEditor.save();
                            //console.log("saved");//debug stuff
                          });
                          }
                      });
                      


                      In TinymceWrapper plugin default properties,
                      create this property: migxRichText
                      set type to yes/no
                      set value to true
                      set area to 01 Textareas to transform
                      SAVE PROPERTY SET

                      In TinymceWrapper plugin before last curly bracket, 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>");
                        }
                      
                      SAVE PLUGIN

                      In core/components/migx/elements/tv/tinymcewrapper.tpl, replace content with:
                      <input id="tv{$tv->id}_checkbox" data-tiny="tv{$tv->id}" checked="checked" title="Disable TinyMCE" type="checkbox" class="tinyTVcheck" />
                      <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.
                        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.