pulpfiction Posted May 1, 2007 Share Posted May 1, 2007 When I copy the text from a CODEBOX and paste in a text editor [to test the code], the line breaks doesnt work properly..... its pasted as a chunk of text, not with line breaks but just tab spaces. it gets really tough to go in and seperate the end of line. guess its nothing to do with the text editor [i use notepad++]. does this happen for anyone else? is there any workaround for this? Link to comment Share on other sites More sharing options...
boen_robot Posted May 1, 2007 Share Posted May 1, 2007 It's not from the editor. And I'm not sure why is it like that. Anyhow, a workaround for it is to start a reply on the topic by quoting the post. You get a nice formatted version in a text box. Copying the text from there results in a fine pasted text. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 1, 2007 Author Share Posted May 1, 2007 workaround for it is to start a reply on the topic by quoting the post. You get a nice formatted version in a text box. Copying the text from there results in a fine pasted textNice idea, worked fine. thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 3, 2007 Share Posted May 3, 2007 It's either the browser or the text editor, I paste from Opera into ConTEXT and everything works fine. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 3, 2007 Author Share Posted May 3, 2007 It's either the browser or the text editor, I paste from Opera into ConTEXT and everything works fine.Thought that it was some thing to do with how codebox is coded..... in IE6 it sometimes even has horizontal scrollbars. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 3, 2007 Share Posted May 3, 2007 As far as I know it's just a div with the overflow set to auto.. I don't think there's anything special about it. testtest <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>test<br /><br />test</div>.codetop,.sqltop,.htmltop{ background: #FDDBCC url(style_images/1/css_img_code.gif) no-repeat right; color: #000; font-weight: bold; margin: 0 auto 0 auto; padding: 3px;}.codemain,.sqlmain,.htmlmain{ background: #FAFCFE; border: 1px dotted #000; color: #465584; font-family: Courier, Courier New, Verdana, Arial; margin: 0 auto 0 auto; padding: 2px;} Link to comment Share on other sites More sharing options...
pulpfiction Posted May 3, 2007 Author Share Posted May 3, 2007 Oh Im not asking about CODE, that fine. but CODEBOX is the problem. Try copying the code below into a text editor. <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>test<br /><br />test</div>.codetop,.sqltop,.htmltop{ background: #FDDBCC url(style_images/1/css_img_code.gif) no-repeat right; color: #000; font-weight: bold; margin: 0 auto 0 auto; padding: 3px;}.codemain,.sqlmain,.htmlmain{ background: #FAFCFE; border: 1px dotted #000; color: #465584; font-family: Courier, Courier New, Verdana, Arial; margin: 0 auto 0 auto; padding: 2px;} Link to comment Share on other sites More sharing options...
Anders Moen Posted May 3, 2007 Share Posted May 3, 2007 Works fine here Link to comment Share on other sites More sharing options...
pulpfiction Posted May 3, 2007 Author Share Posted May 3, 2007 Works fine hereBrowser and text editor you used? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 3, 2007 Share Posted May 3, 2007 Oh Im not asking about CODE, that fine. but CODEBOX is the problem. Try copying the code below into a text editor.The box with the test text in it is a codebox, the following box shows the HTML and CSS for the codebox. There's nothing special about it, the line breaks are still <br> tags. In fact, the style attribute on the div is the only difference between codebox and code:<div class='codemain' style='height:200px;white-space:pre;overflow:auto'> Link to comment Share on other sites More sharing options...
jesh Posted May 3, 2007 Share Posted May 3, 2007 Oh Im not asking about CODE, that fine. but CODEBOX is the problem. Try copying the code below into a text editor.I lose indentation when I paste that text into either Notepad.exe or Visual Studio 2005. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 3, 2007 Share Posted May 3, 2007 I don't lose anything, the pasted text looks just like it does in the page. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 4, 2007 Author Share Posted May 4, 2007 When I copy and paste the above code into notepad it looks like this.. so its something to do with browser.<div class='codemain' style='height:200px;white-space:pre;overflow:auto'>test<br /><br />test</div>.codetop,.sqltop,.htmltop{ background: #FDDBCC url(style_images/1/css_img_code.gif) no-repeat right; color: #000; font-weight: bold; margin: 0 auto 0 auto; padding: 3px;}.codemain,.sqlmain,.htmlmain{ background: #FAFCFE; border: 1px dotted #000; color: #465584; font-family: Courier, Courier New, Verdana, Arial; margin: 0 auto 0 auto; padding: 2px;} Link to comment Share on other sites More sharing options...
Anders Moen Posted May 4, 2007 Share Posted May 4, 2007 I get the same in phpBB, the line breaks don't work so I have to copy them over but I think that's because of how you save the file (like UTF-8, ASCI and those others) Link to comment Share on other sites More sharing options...
justsomeguy Posted May 4, 2007 Share Posted May 4, 2007 Notepad works great with Windows-style text, the Windows line endings and everything. For everything else, it doesn't work so great. That's why I use ConTEXT for everything involving text, if I paste something into Notepad and it looks butchered, sure enough I just open ConTEXT, paste the same thing and it comes out fine. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 4, 2007 Author Share Posted May 4, 2007 justsomeguy are you using IE 6? cos I tried copying the text into ConTEXT and it appears the same way as mentioned earlier. no line breaks nothing...... Link to comment Share on other sites More sharing options...
justsomeguy Posted May 4, 2007 Share Posted May 4, 2007 No, I use Opera. Link to comment Share on other sites More sharing options...
pulpfiction Posted May 4, 2007 Author Share Posted May 4, 2007 So this is happening cos of the browser [iE 6]? Link to comment Share on other sites More sharing options...
Anders Moen Posted May 4, 2007 Share Posted May 4, 2007 I don't think it's because of IE itself, but hey! You should start using Opera instead. At least try...maybe the line-breaks work then? Link to comment Share on other sites More sharing options...
pulpfiction Posted May 4, 2007 Author Share Posted May 4, 2007 Cant use opera or FF at work, strictly IE. Also this CODEBOX is not that big a problem. just wanted to know why it happens like that.. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 7, 2007 Share Posted May 7, 2007 Well, the browser would be the application that sends the text to the clipboard when you copy, so that would be likely. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.