Options

Copied text collapses to the left

jwalkerohjwalkeroh Registered Users Posts: 165 Major grins
edited June 24, 2008 in Dgrin Forum Support
How to you copy/paste into a post and have the text NOT collapse to the left? Or NOT loose extra spaces?

Here's a post that did collapse the spaces out of some Javascript that I pasted:
http://www.dgrin.com/showpost.php?p=857198&postcount=8

Comments

  • Options
    darkdragondarkdragon Registered Users Posts: 1,051 Major grins
    edited June 24, 2008
    just wrap it with the CODE tags....click the # symbol button in the format bar in advanced editing . Here's the same example (i think, grabbed it off your home page) that you used in the other thread.

    ******** type="text/javascript">
        (function() {
            var sRes;
    
            if (typeof(screen) == 'object'){
                sRes = screen.width + 'x' + screen.height;
            }
    
            if (readCookie('res') != sRes) {
                createCookie('res', sRes, 365);
            }
        })();
        </********
        ******** type="text/javascript">
            _qacct = "p-33GsugQTR-pOM";
    
            (function() {
                function loadQuantcast() {
                    var s = document.createElement('script');
                    s.src = 'http://edge.quantserve.com/quant.js';
                    document.body.appendChild(s);
    
                    if (typeof quantserve == 'function') {
                        quantserve();
                    }
                }
    
                YE.addListener(window, 'load', loadQuantcast);
            })();
        </********
    
    ~ Lisa
  • Options
    jwalkerohjwalkeroh Registered Users Posts: 165 Major grins
    edited June 24, 2008
    Here's my test...
    // Delete certain galleries from the galleriesBox, meeting the following criteria:
    //   a) None when loggedIn.
    //   b) The galleries listed in the "re" variable, but only on the homepage.
    //   c) All empty galleries.
    // The specific intent here is to delete from the homepage galleriesBox, all of the
    // galleries for a certain category. In this case it is the Portfolio category, so all
    // galleries in that category are listed in the "re" variable.
    function delGallery() {
      if (!YD.hasClass(document.body, 'loggedIn')) {
    
        re = /\/(4958232_STy9F|4946254_R3Qcv|5144031_k2sVq|5144042_7gUQV|5144046_32NsP|5144110_myhEX)$/;
    
        home = YD.hasClass(document.body, 'homepage');
        re_empty = /\/(spacer.gif)$/;
        var oList = YD.getElementsByClassName('miniBox', 'div', this);
        for (i = 0; i < oList.length; i++) {
          if (((re.test(oList[i].getElementsByTagName('a')[0].href)) && (home)) || (re_empty.test(oList[i].getElementsByTagName('img')[0].src))) {
            oList[i].parentNode.removeChild(oList[i]);
          }
        }
      }
    }
    YE.onContentReady('galleriesBox', delGallery);
    
  • Options
    jwalkerohjwalkeroh Registered Users Posts: 165 Major grins
    edited June 24, 2008
    Is that cool or what! Thanks Lisa. I wondered where folks where getting those Code: boxes.
Sign In or Register to comment.