We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40088
    • 708 Posts
    @donshakespeare Here's a tutorial with a short video of the end result.

    https://qreativ.space/tutorials/content-management-system/modx/modx-and-tinymcewrapper-ace-editor.html
      Todd
    • Hi Todd … your video's not currently loading. Love to see what you did.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 40088
        • 708 Posts
        Oops, my apologies Ryan... everyone. This is what happens when you copy/paste.

        It should be good to go now.
          Todd
          • 42562
          • 1,145 Posts
          Thanks for sharing that tut.

          A few things:

          #1
          Important! As of TinymceWrapper v2.3.2 we need to manually change a couple lines of the twAceEditor.js plugin. It’s possible this modification will be included in a future version so before you start changing the plugin please be sure it’s necessary

          TinymceWrapper will always ship with the latest plugins from their github joint.
          https://github.com/donShakespeare/twAceEditor has those JS changes

          #2
          var aceCheck = setInterval(function(){
            if($("style#mainCSSace").length){
              taskCounter++;
            }

          If you nuke the native CSS with twLoadCSS, #mainCSSace will not exist. Best to attach to another ID as signified here
          https://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=30#dis-post-545043
            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
            For ya'll awesome TinymceWrapper users, don't fail to check out a big brother in town...

            Exciting night, last night in Structures Land
            https://modx.com/extras/package/structures

            # Structures 2.0.0-beta2 (September 18, 2016)
            =======================================
            The first release was a mere teaser. Folks, welcome to Structures - one month old!

            # List of exciting features

            + Ability to use Structures to do exactly what you used to do before (new feature - pureContent)
            + Complete intuitive Keyboard shortcut control
            + Addition of two new brilliant themes: Lector and Slate
            + Support for ANY HTML Markup (with refined simplicity)
            + Click or Drag n' Drop from Structures Tree into content
            + Smooth and sleek sorting.
            + Single/Multiple selecting of structures - for rapid management
            + Selective or Complete Clear All
            + Each structure can now have a title

            # Beyond Awesome

            + *Ace* with all its power has been introduced to cater for Markdown syntax highlighting.
            + *Auto Import* of any content to be broken up into several structures or simply compiled into one. Do it manually, or simply open the resource (auto structured and saved) ... voila!
            + *Auto Upload on Image Data Paste or Drag n' Drop* this is pure awesome, period! From clipboard to server in milliseconds ...


            # Roadmap

            + Search/categorize structures - with goto/sendto functionality
            + Complete frontend solution
            + Detail github wiki page
            + Create more fantastic themes for MODX - powered by Structures
            + Create ready-made chunks of HTML structures and editor settings
            + Utilize the power of PHP domdocument in snippet
            + Extend Markdown Parser
              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.
              • 26027
              • 145 Posts
              I was asked by the author to post here my problem with TinyMCE interfacing with theRoxy Filemanager. Here goes:

              =======================================================================================
              I'm a web designer though not a ModX Guru. Our web developer just upgraded our 5 year old version to Rev 2.5. Our editor was TinyMCE but we were upgraded to the current TinyMCE with the Roxy Fileman feature.

              We used to select Template Variable graphics simply by single clicking our selection from the Editor. The new Roxy Fileman presents us with a similar dialogue; I highlight the desired graphic and click the 'Select' button. An alternative would have been to double click the graphic to select it and return to the ModX page.

              When the graphic path is returned, there are two problems. There is no preview and, worse, the path has a leading "/" which, when we save the page, will not show the graphic. In fact it doesn't place the <img> link on the web page. If I remove the "/" from the path and save the page again, the graphic will show on the web page but still no preview in ModX. Finally, if I add the "/" back to the path now it will show the preview. What is especially odd is when I now save the page again the graphic continues to display on the web page. So ... previously the leading "/" prevented the graphic from even being put on the page and now it allows it.

              The last thing I should mention is that the configuration of Roxy Fileman shows "files_root" as "/assets", which the documentation says is correct in that relative paths are not allowed. That by itself makes no sense to me since the web page has a Base URL statement of "http://www.mydoman.org/". I should think that if the graphic's path left out the leading "/" it should still work.

              Oh well, if you're still reading this can you shed any light on my problem? The developer doesn't want to help me, says to use my pathetic workaround (with the extra editing and page saves).

              Thanks very much if someone of you can help me get this working the correct way, by simply clicking the graphic to select it and in return receive a working graphic and a graphic that has its preview showing in ModX.

              With appreciation ... Sam (Gerber)
                • 26027
                • 145 Posts
                Can someone tell me whether Roxy Fileman is problemmatic software, or is my problem described above more likely due to TinyMCE. If Roxy is likely the problem is there a thread here that deals with just that? I'm eager to get this problem fixed. We find it very annoying to endure manual changes to the selected graphic's path and multiple saves to simply achieve what the 5 year old TinyMCE did with one single-click.

                If the fault lies with Roxy am I wasting my time pursuing a fix to it? Does TinyMCE have its own built-in graphic editor/manager?

                Thanks ... from Sam (Gerber)
                  • 42562
                  • 1,145 Posts
                  Currently diagnosing...

                  For your information, Roxy is a nice simple solution to media browsing, but it is the least of the four browsers provided/supported by TinymceWrapper Extra.

                  From top to bottomless pit, here is the grading...
                  3 and 4 are easily swappable, depending on your mood and needs

                  1. - elFinder
                  2. - Responsive FileManager
                  3. - MODX Native Browser
                  4. - Roxy

                  No, TinyMCE does not have a free native browser.
                    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
                    Okay, here is my baked beans:
                    Roxy heard I was coming in with a sledge hammer, and in my temporary localhost setup it started reporting 500 error ... so, no go in that area.

                    The Leading Annoying Disgraceful Forward Slash
                    This behaviour is a type of absolute urling. This is one of the few ways a file browser can accurately and always safely find ya file. So, this issue is actually not an issue.
                    Of course you can tweak a callback to strip the returned url however you want ...

                    If using said browser with said exact tweakage callback, within TinyMCE (Manager-side) for example, then the <img> in your editor would fail, because, assets/myfile.jpg would be a lie.
                    From where you are, site.com/etc/manager, there is no valid relationship to etc/assets/myfile.jpg

                    For this to work, I'll have to make a callback (in next release) to satisfy the idiotic nature of that Image Preview for Template Variables.

                    Why Idiotic?
                    Excerpt: https://forums.modx.com/thread/86192/trying-to-use-mycomponents?page=6#dis-post-541156

                    MODX image TV has an annoying phpthumb script that insists on showing you a thumbnail of your image. This means, you have to get the url right, I mean relatively right, or else there will be a billion error reports in your log.
                    Say you are in site.com/manager/....
                    Your image TV input field, to preview an image in your assets folder must have something like ....(absolutely no absolute URLs here watch out!)
                    assets/component/myExtra/images/bliss.jpg
                    You see, this annoyance builds from a 4 month-old ire

                    samg
                    "files_root" as "/assets", which the documentation says is correct in that relative paths are not allowed. That by itself makes no sense to me since the web page has a Base URL statement of "http://www.mydoman.org/". I should think that if the graphic's path left out the leading "/" it should still work.
                    Did you test it yet? Please inform us of outcome...
                    Remember, Roxy wants to, rightly, be aloof from whatever your Base URL is. It's dealing in PHP paths I would suppose (whatever that means)


                    Soluuutions, people!

                    1. You Love Roxy so much and want to keep using it:
                      change replaceDefaultFileImageTVbutton to NO ...You get to use the browser you admire, and still use MODX native method that you cherished of old

                    2. Beat Roxy over the head and surrender to Modor Completely:
                      change selection in autoFileBrowser to modxNativeBrowser... Now you are own your own, all your problems are solved.

                    3. Wait for DonShakespeare
                      to finish his last 400th Sonnet, then he might have time to write a callback for all the other supported browsers

                    4. Ignore the lack of preview for TV mages sad


                    Where to find ma settings

                    In your Elements Tree (next to Resource Tree button)
                    Scroll to find Plugins -> then find TinymceWrapper -> open to find properties tab
                    There you will find all your settings to change, like the ones I noted in the soluuutions section

                    Be sure to take the necessary precautions to make your changes survive an update.

                    Cheers [ed. note: donshakespeare last edited this post 7 years, 6 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.
                      • 26027
                      • 145 Posts
                      Quote from: donshakespeare at Sep 27, 2016, 07:05 PM
                      Currently diagnosing...

                      For your information, Roxy is a nice simple solution to media browsing, but it is the least of the four browsers provided/supported by TinymceWrapper Extra.

                      From top to bottomless pit, here is the grading...
                      3 and 4 are easily swappable, depending on your mood and needs

                      1. - elFinder
                      2. - Responsive FileManager
                      3. - MODX Native Browser
                      4. - Roxy

                      No, TinyMCE does not have a free native browser.

                      What should I call you? Don? Sir Bard? Maven from Avon?

                      I'm not trying to be finnicky about choosing a file manager (browser). I'm just upset that we paid $$ to upgrade our ModX system and ended up with an editor downgrade. Roxy would have been fine functionally if it weren't broken. I don't know why the developer wasn't aware that it was so flawed.

                      A few quickies please.

                      1. Do you know what browser came with TinyMCE 5 years ago? Whatever it was it was totally acceptable, which makes Roxy triply disappointing.

                      2. I see you rated the ModX native browser above Roxy. How can I try that? Is it already installed with every ModX system or must I install it? Can I try it initially on my own userid without impacting what the others are using or must it apply systemwide? (I'm not experienced installing ModX components and don't want to put my client's system at risk.)

                      3. Do all browsers primarily provide only graphic selection and also other file selection, such as PDFs, while your editor does all the heavy lifting?

                      4. What would your recommendation to me be, unless you prefer not to go there.

                      5. Apparently Roxy isn't just flawed for my client. Are its flaws confined only to its interface with TVs, as in our case? Is it a waste of time for me to find out who the author is and see where s/he stands on the issues?

                      6. Lastly, in your other post on this subject you hinted that you might have a remedy for me in the next version of TinyMCE. I don't know what you have in mind. If we lived with the current manual intervention workaround with Roxy, do you know when a solution may be available?

                      If I've asked you too many questions, could you concentrate on #2 and #4.

                      Thanks for your interest "Don...".