We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4018
    • 1,131 Posts
    Looks like the guys over at fckeditor.net have released a final version of FCKeditor 2.0....just thought you’d like to know! smiley I’m gonna work on integrating it in and see how it goes. wink
      Jeff Whitfield

      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
      • 4018
      • 1,131 Posts
      Went ahead and modified the existing FCK plugin to accomodate the new version. Attached is the new plugin files. I also made a few minor edits to the plugin code itself too. The developers added an upload ability for files, images, and flash...but I disabled it for the moment since there will need to be some changes made to the config file for uploads. The Resource Manager can handle everything else though. Hope this little bit helps! smiley

      Jeff
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 25663 MODX Staff
        • 12,272 Posts
        Thanks so much Jeff!
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 8634
          • 56 Posts
          When will you enable the upload ability as this is one of the advantages using a proper WYSIWYG editor?
            • 25663 MODX Staff
            • 12,272 Posts
            FCK Editor has a pretty big flaw in Firefox on Mac and PC.

            Assume all you want to do is to delete a single word or extra letter after seeing it on a published page. No problem you assume, right? WRONG!

            Page loads. Offending word/letter highlighted. Delete button pressed. And again. And again... NOTHING!

            Click any of the other buttons, or add a letter or space first, and it works fine though.

            That’s why I prefer Tiny MCE. wink
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 32963
              • 1,732 Posts
              Ryan,

              Are you talking about the FCK 2.0 released July 18?



                xWisdom
                www.xwisdomhtml.com
                The fear of the Lord is the beginning of wisdom:
                MODx Co-Founder - Create and do more with less.
                • 4018
                • 1,131 Posts
                Quote from: rthrash at Jul 19, 2005, 06:00 PM

                That’s why I prefer Tiny MCE. wink

                Yeah, yeah, yeah...we all know how good TinyMCE is! wink LOL! I agree though, FCK isn’t without it’s quirks. Then again, none of the editors (TinyMCE, FCK, and Xinha) are perfect. But at least having the option to use any of the three is certainly a plus.

                Regarding the upload ability, this was just introduced in the new 2.0 final. All it does is add a new tab to the Image, Link, and Flash Property windows. You can still use the ’Browse Server’ button to upload and manage files with the Resource Manager. I just chose to disable the new tabs at the moment till I can work out how to get the path variables into the new upload scripts for the Upload tabs in the property windows. Shouldn’t be too difficult...it’ll just take a little time is all.

                Now for another quirk. With the MCPUK Resource Browser, I’ve always noticed that "out of the box" it has a problem refreshing the window whenever a file is uploaded. I’ve played around with this for several months. The solution is fairly simple...just assign a full directory path to the connector for the call to the resource browser. Looking at the code for the FCKeditor plugin, you’ll see a few lines like this:

                			var FCKImageBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Type=images&Connector=connectors/php/connector.php&ServerPath=';
                			var FCKLinkBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Connector=connectors/php/connector.php&ServerPath=';
                			var FCKFlashBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Type=flash&Connector=connectors/php/connector.php&ServerPath=';
                			var FCKCustomToolbarSet = {$tbCustomSet};
                


                With the code above, you simply add a similar path as the call to the browser.html file. The resulting code would look like this:

                			var FCKImageBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Type=images&Connector={$base_url}manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=';
                			var FCKLinkBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Connector={$base_url}manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=';
                			var FCKFlashBrowserURL = '{$base_url}manager/media/browser/mcpuk/browser.html?Type=flash&Connector={$base_url}manager/media/browser/mcpuk/connectors/php/connector.php&ServerPath=';
                			var FCKCustomToolbarSet = {$tbCustomSet};
                


                With a full path to the connector, the Resource Browser should refresh and show newly uploaded files without the need to force a refresh. However, there is a downside to this...another bug is introduced! The new bug has to do with the Image Editor. It seems that whenever you upload a new image and try to click on the Edit icon for an image, a ’Not Found’ error happens. Weird part is that if you force a refresh then the edit icon works just fine. Hmm...looks a bit like a JavaScript issue in the frmresourceslist.html for the mcpuk browser...but I’ll be damned if I can figure it out at the moment. Perhaps an extra button for manual refreshing is in order on the mcpuk browser?

                Well...that’s the jist for now. More to come I’m sure. smiley

                Jeff
                  Jeff Whitfield

                  "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                  • 32963
                  • 1,732 Posts
                  Jeff,

                  There’s check done inside the FCKEditor plugin to see if the Resource Browser is enabled ($use_browser). If it is then the Browse button is enabled. You could use the same for the Instant uploads.

                  PS. Also Remember that Resource Browsing can be turned off for individual users. See the User Settings.
                    xWisdom
                    www.xwisdomhtml.com
                    The fear of the Lord is the beginning of wisdom:
                    MODx Co-Founder - Create and do more with less.
                    • 4018
                    • 1,131 Posts
                    Quote from: xwisdom at Jul 20, 2005, 10:55 AM

                    Jeff,

                    There’s check done inside the FCKEditor plugin to see if the Resource Browser is enabled ($use_browser). If it is then the Browse button is enabled. You could use the same for the Instant uploads.

                    PS. Also Remember that Resource Browsing can be turned off for individual users. See the User Settings.


                    Well ahead of ya, chief! smiley I’m currently working on the instant uploads feature...but I’m stuck on one area at the moment. Although I can easily pass most of the variable for uploads, I can’t seem to get the file path to stick. Here’s where I’m at:

                    As a test, I modified the main fckconfig.js file to turn on just ImageUpload as such:

                    FCKConfig.ImageUpload = true ;
                    //FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/asp/upload.asp?Type=Image' ;
                    FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/upload/php/upload.php?Type=images&uploadpath=/modx/assets/' ;
                    FCKConfig.ImageUploadAllowedExtensions	= ".(jpg|gif|jpeg|png)$" ;		// empty for all
                    FCKConfig.ImageUploadDeniedExtensions	= "" ;							// empty for no one
                    


                    Now, notice that I’ve added on a variable for the upload path. I’ve modified the upload script so that it looks for this variable via a $_GET statement, similar to the way it already gets the Type. I also modified the script so that it uses the Type variable to determine which directory in Assets the uploaded file goes. At this point, everything works great. I can see the Upload tab in the Image Properties window, upload an image, and all works as advertised. Now for the part I’m stuck on...

                    At this point, I set the FCKConfig.ImageUpload variable to false in the config file. Then, I added the parameters I needed directly into the FCKeditor plugin code as such in the appropriate spots:

                    					"$fckInstanceObj.Config['ImageUpload'] = ".($use_browser==1 ? "true":"false").";".
                    					"$fckInstanceObj.Config['ImageUploadURL'] = FCKImageUploadURL;".
                    


                    			var FCKImageUploadURL = '{$base_url}assets/plugins/fckeditor/filemanager/upload/php/upload.php?Type=images&uploadpath={$base_url}assets/';
                    


                    Now, you would think that all would work as it did when the variables were hardcoded in the main config file, right? Umm...nope! The ImageUpload parameter works...but not ImageUploadURL. For one reason or another, it seems that the ImageUploadURL variable isn’t being picked up right and the upload script can’t seem to get the querystring variables properly. Sigh! I’ve definitely reached brainfry at the moment! LOL! Any ideas?

                    Jeff
                      Jeff Whitfield

                      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                      • 34162
                      • 1 Posts
                      yes as with anything else grab firefox make sure you have the javascript debugger turned on or installed I should say. They call it venkman i think. Anyway then visit your page and try it out with the debugger window open. It has helped me to troubleshoot many things before.