If you select Edit|Paste when the Window clipboard holds textual data then that text is inserted into the active file at the current position of the text cursor. If EditPad is in overwrite mode, and you’re not pasting whole lines (see below), the pasted text overwrites the text after the cursor, as if you had typed in the text. Pressing the Insert key on the keyboard or clicking the Insert/Overwrite indicator on the status bar toggles between insert and overwrite modes.

This command is always invoked on whichever editor is showing the text cursor (vertical blinking bar), regardless of whether you use the main menu, a toolbar button, or a keyboard shortcut.

If the text was copied by EditPad or another Just Great Software application then it will be on the clipboard in EditPad’s own data format. This format supports all the same encodings, line break styles, and even binary data that EditPad supports. If the file you are pasting into uses the same encoding as the file you copied from then all characters and even any invalid bytes the text may contain are pasted unchanged. If the file you are pasting into uses a different encoding, then EditPad converts the pasted text to the file’s encoding.

If the text was copied by another application then EditPad pastes unformatted Unicode text. This is the most basic Windows clipboard format that all applications are supposed to support. If the file you are pasting into is not a Unicode file, then EditPad converts the pasted text to the file’s encoding.

If you paste in characters that are not supported by the file’s encoding, then EditPad has no way to convert those characters into bytes to store them into the file. Such characters will be lost. They are permanently changed into question marks to indicate the actual characters you tried to paste could not be represented. In order to paste the actual characters, first use Edit|Undo to remove the question marks. Then use Convert|Text Encoding with the “encode original data with another character set” option. Select a Unicode transformation or any encoding that supports the characters you want to paste, as well as those already present in the file. EditPad then changes the bytes in the file to represent the same characters in the new encoding. Now you can paste your text again and get the actual characters. Note that you have to undo pasting the question marks. Changing the encoding does not magically restore the characters. Since EditPad Pro uses the file’s actual encoding for in-memory storage rather than Unicode, newly entered or pasted characters that cannot be represented cannot be stored.

EditPad’s own clipboard data format can store line breaks of any style. Unformatted Unicode text is supposed to use only Windows-style line breaks. Regardless of which is being pasted, EditPad makes sure that you don’t accidentally mix up the line break style of your file. Any line breaks in the pasted text that use a line break style that is not used at all by the file you’re editing are converted into the file’s dominant line break style. So if you copy from a Windows text file and paste into a UNIX text file, for example, the Windows-style line breaks that you copied are pasted as UNIX-style line breaks.

If you want to paste a block of text from another application as a rectangular selection, first make a rectangular selection in EditPad, and then paste. EditPad will then interpret the text on the clipboard as a rectangular block and replace the selection with it. Text copied from EditPad Pro is always pasted in the way (linear or rectangular) you had it selected when you cut or copied it.

In EditPad Pro, the option “paste whole lines when lines are copied as a whole“ affects how text is pasted if you copied complete lines to the clipboard. Copying a complete line means to copy everything from the start of the line to the end of the line, including the line break at the end of the line. Copying multiple lines completely means copying everything from the start of the first line in the block until the end of the last line in the block, including the line break at the end of the last line. When the option “paste whole lines when lines are copied as a whole” is on, lines that were copied as a whole are always pasted as if the cursor were at the start of the line when you’re pasting. Thus, lines copied as a whole are always pasted as a whole before the line that the cursor is on when pasting. This makes it easy to move blocks of lines around without worrying about the horizontal position of the text cursor. If this option is off, text is always pasted at the exact spot the text cursor is at, even when whole lines were copied. Only whole lines copied in EditPad can be pasted as whole lines. EditPad cannot determine whether text copied from other applications is a whole line or not. EditPad Lite does not have this option and always pastes at the exact spot the text cursor is at.

In hexadecimal mode, if the clipboard contains a hexadecimal representation of characters, the effect of the Paste command depends on whether the text cursor is in the hexadecimal section at the left, or the ASCII section at the right. If you paste into the hexadecimal section, EditPad pastes the bytes represented by the text on the clipboard. If you paste into the ASCII section, EditPad will paste the text on the clipboard “as is”. If the clipboard holds “74657374”, for example, then pasting into the hex section inserts “test”, while pasting into the ASCII section inserts “74657374” into the file.

If the text on the clipboard is not text with hexadecimal values, EditPad pastes the text regardless of whether the cursor is in the text or hexadecimal section. If the clipboard holds something you copied in hexadecimal mode in EditPad, then EditPad always pastes the bytes that you copied, even if you switched the cursor between the ASCII and hex sections. If you copied text from a file in EditPad that you’re editing in text mode, then the hex interpretation described in the previous paragraph does take place.

If you copy and paste between EditPad and another hex editing application, you may need to switch EditPad to hexadecimal mode and place the cursor in the hexadecimal section of the editor to get the results you expect. The Windows clipboard does not have a standard format for binary data. So most hex editors copy the hexadecimal representation of the selected bytes.

See Also

Edit menu
Edit|Swap with Clipboard
Block|Rectangular Selections