The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTML Editor V 11

Discussion in 'General Discussion' started by SBS2003, May 7, 2007.

  1. SBS2003

    SBS2003 Member

    Joined:
    Aug 14, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I just upgraded to the new version - like it and all - but for some reason the HTML Editor under the new file manager isn't working.

    I click on the link and nothing happens. I click on any of the editor links and all is fine - it is only the link for the new HTML Editor.

    Any ideas?

    Mark
     
  2. SBS2003

    SBS2003 Member

    Joined:
    Aug 14, 2004
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Bump

    I have installed version 11 on 2 more servers and still the same problem. Logging into the new File Manager, choosing a file, then clicking on HTML Editor - nothing at all. Like a null javascript object or something. Everything else seems to work, but this doesn't.

    Is everyone else experiencing the same thing? Is nobody experiencing this? Any ideas?
     
  3. kernow

    kernow Well-Known Member

    Joined:
    Jul 23, 2004
    Messages:
    865
    Likes Received:
    9
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Yep, we have the same problem, though it sometimes works on files that have previously been edited with the html editor.
     
  4. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    Better to use a different editor like www.snippetmaster.com or something like that then rely on the built-in cpanel wysiwyg that doesn't work reliably...
     
  5. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    Same problem....

    Have you guys been able to resolve the problem?

    Thanks,
    Mike
     
  6. epoch

    epoch Registered
    PartnerNOC

    Joined:
    Apr 9, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    This is due to the code that is being used to check if the file is an html file before sending it to the editor. The fix is to perform the following:

    First make a copy of /usr/local/cpanel/base/frontend/x3/js/filemanager_optimized.js

    Next copy filemanager.js over filemanager_optimized.js in the same directory.

    Now edit /usr/local/cpanel/base/frontend/x3/js/filemanager_optimized.js

    Now make the htmledit function in that which is:

    htmledit:{
    contextmenuitem:4,
    handler:function() {
    editFiles(2);
    },
    test:function(fileList) {
    if (fileList && fileList[0]) {
    if (!fileList[0].childNodes[3]) { return 0; }
    var type = fileList[0].childNodes[3].firstChild.nodeValue;
    var size = fileList[0].childNodes[2].firstChild.nodeValue;

    if ( ( cwd.match(phtmldir) || cwd.match(wwwdir) ) && size.match(/Bytes|KB/i) && type.match(/html/i)
    && !(type.match("-directory") || type == "mail" || type == "publichtml" || type == "publicftp")
    ) {
    return 1;
    }
    }
    }
    },






    look like this:



    htmledit:{
    contextmenuitem:4,
    handler:function() {
    editFiles(2);
    },
    // test:function(fileList) {
    // if (fileList && fileList[0]) {
    // if (!fileList[0].childNodes[3]) { return 0; }
    // var type = fileList[0].childNodes[3].firstChild.nodeValue;
    // var size = fileList[0].childNodes[2].firstChild.nodeValue;
    //
    // if ( ( cwd.match(phtmldir) || cwd.match(wwwdir) ) && size.match(/Bytes|KB/i) && type.match(/html/i)
    // && !(type.match("-directory") || type == "mail" || type == "publichtml" || type == "publicftp")
    //
    test:function(fileList) {
    if (fileList && fileList[0]) {
    if (!fileList[0].childNodes[3]) { return 0; }
    var type = fileList[0].childNodes[3].firstChild.nodeValue;
    var size = fileList[0].childNodes[2].firstChild.nodeValue;
    if ( size.match(/Bytes|KB/i) && type.match(/text|data|empty|perl|ruby|php/i)
    && !(type.match("-directory") || type == "mail" || type == "publichtml" || type == "publicftp")
    ) {
    return 1;
    }
    }
    }
    },


    Its too bad the forums are removing the tabs.
     
  7. Daroch

    Daroch Registered

    Joined:
    May 21, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    You are Great, epoch!!:)

    I was starting to worry
    I have put the code-patch and all it´s OK

    See you
     
  8. mungai

    mungai Registered

    Joined:
    Jan 7, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hiw do I acesss the file above ie filemanager_optimized.js
     
  9. glaukas

    glaukas Registered

    Joined:
    Jan 7, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page