Jump to content

text not pasting correctly


Recommended Posts

hey guys,

 

want to comment on something that I have noticed recently.. When I copy paste a users code, it spans it across the entire text box, when before it was more of an nl2br() effect.. where if the user has newlines in there code, it would create a newline when i pasted the code.. however now it does not..?

 

thanks..

Link to comment
Share on other sites

well, we haven't made any changes to the forum software, haven't done any software upgrade since v2 RC5 a couple months ago, nor have we added any mods in a couple months soo...if this is something "new" then you changed something on your end.  Different browser/OS (version)?  Also, screenshots help.  Also...you should be reporting this on the SMF community board...even if it is a bug, we don't make the SMF software!

Link to comment
Share on other sites

well, we haven't made any changes to the forum software, haven't done any software upgrade since v2 RC5 a couple months ago, nor have we added any mods in a couple months soo...if this is something "new" then you changed something on your end.  Different browser/OS (version)?  Also, screenshots help.  Also...you should be reporting this on the SMF community board...even if it is a bug, we don't make the SMF software!

ha! CV you crack me up.. I'm at work so I will make a quick example.. say someone has this code..

 

print "test";
print "test";
print "test";
print "test";

 

now before, I would copy this and paste it between php tags and it would paste just like that.. with newlines.. however now I find that it is doing this..

 

print "test";       print "test";      print "test";      print "test";

 

CV I will let SMF know as well..

Edit: not a huge deal with short amounts of code.. however quite a pain with large amounts..

Link to comment
Share on other sites

Where are you pasting it to? If the code was written in 'Unix format', only "\n" as the new line character, and you paste into a Windows format editor, "\n\r" as new line, then the text will appear all on one line as Windows doesnt recognise it as a proper new line. This is also why you see an extra line between code when written in Windows format and pasted into a Unix format editor. Should be able to configure it within your editor's options.

Link to comment
Share on other sites

Where are you pasting it to? If the code was written in 'Unix format', only "\n" as the new line character, and you paste into a Windows format editor, "\n\r" as new line, then the text will appear all on one line as Windows doesnt recognise it as a proper new line. This is also why you see an extra line between code when written in Windows format and pasted into a Unix format editor. Should be able to configure it within your editor's options.

im copying a users code that they put on here, and simply pasting it into the reply textarea..

Link to comment
Share on other sites

Copied from the example you gave:

 

PHP tags:

print "test";
print "test";
print "test";
print "test";

 

Code tags:

print "test";
print "test";
print "test";
print "test";

Link to comment
Share on other sites

yeah, I have noticed that it pastes it correctly for me about 70% of the time.. not sure why the 30% is happening

So it's intermittent?  Regardless, it's still an SMF bug.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.