erm, not sure what the problem is here... On FF106/winxp I can ctrl the code in and all the formatting, line breaks etc is preserved properly. The 'code' button doesn't work, but one wonders why you would need it in the first place if ctrl-v works. Cheers, Stephan.
Quote: The 'code' button doesn't work, but one wonders why you would need it in the first place if ctrl-v works. Cheers, Stephan.
Why doesn't the "source" button perserve the formatting? If i write it in the source i want it to look that way...reason for writing it in the source view.
Basically the only difference between the "code" button and the "source" button is that the "code" button puts all the contents in between code tags
<code> </code>
on server side i preg_replace whats inbetween the code tags and perform the actual highlighting. The reason for this is to seperate the content -code - from how it is presented on the screen. When a user needs to modify the code he should just be able to change it without having to worry about messing up the presentation of it.
RE: Allow pasting from clipboard?
Cheers,
Stephan
RE: Allow pasting from clipboard?
I'm having a problem having newlines perserved from copied plain text. (notepad)
i've looked in the html source to double check to see if the new lines were perserved but..no they aren't
example try inserting some text using the green button (code button) with new lines. YOu see everything will still wrap
Is there a way to keep newlines from copied text?
http://leblanc.blogsyndrome.com/b/How+t ... +On+A+Page
RE: Allow pasting from clipboard?
RE: Allow pasting from clipboard?
Quote:
The 'code' button doesn't work, but one wonders why you would need it in the first place if ctrl-v works. Cheers, Stephan.
Why doesn't the "source" button perserve the formatting? If i write it in the source i want it to look that way...reason for writing it in the source view.
Basically the only difference between the "code" button and the "source" button is that the "code" button puts all the contents in between code tags
<code> </code>
on server side i preg_replace whats inbetween the code tags and perform the actual highlighting.
The reason for this is to seperate the content -code - from how it is presented on the screen. When a user needs to modify the code he should just be able to change it without having to worry about messing up the presentation of it.
Hopefully it makes sense.
-Leblanc
RE: Allow pasting from clipboard?
also allows me to add javascript to display line numbering.
RE: Allow pasting from clipboard?
That will be a very nice feature.
Regards.
RE: Allow pasting from clipboard?
FCK.Commands.GetCommand( 'Paste' ).Execute();
should do it.