Closed GoogleCodeExporter closed 9 years ago
> What do I need to use in the "with" box (for "replace ... with") to produce a
newline in the output?
As with most things, the answer is "It depends" ;)
- If you are replacing plain text (or text in a <textarea> or <pre> in an HTML)
what
you would have to do is put a newline character (ASCII 10) in the output
("with")
field. You can do this only if you use the substitution list because you can
import
an XML file with the newlines in the substitutions.
- If you are replacing text in a webpage but the HTML checkbox is unchecked,
then
it's currently impossible with FoxReplace (to get a visible line break you
would have
to insert a <br>, because a simple newline is displayed as a space).
- If you are replacing the source code of a webpage (HTML checkbox checked),
then you
can put <br> or <br/> to create the newline.
I have to address the first case so it is easier to add a newline in plain text
(for
example with \n). The second case is more complex, but I am thinking of it.
Original comment by marc.r...@gmail.com
on 15 Jun 2009 at 11:02
hi -
thank you. it is the first item (replacing plain text in a text area using
"with" in
"Substitutions" section; "URLs" section is empty/unused) - but I can't figure
out how
to enter ASCII 0x0A in the "with" box.
I use linux so can't use the windows alt-nm trick (don't use gnome or kde) but
have
tried "
", "
", "#0D", "#0A", and a couple other variants but I always get the
code in the replacement line, no line breaks.
I've tried each with all 3 "Replace" types.
Original comment by ssehsem...@mailinator.com
on 20 Jun 2009 at 5:39
Hi,
Yes, you can't enter the newline in the textbox, the only way is via the import
feature. For example, you create your substitutions with the editor (without the
newlines), then you export the substitution list; then you open the XML file
with a
text editor and insert the newlines* where you want, save the file, and then
import
it as the new substitution list. This is the only way to do it as of now, but I
will
fix this for the next version (0.12.0) so it can be done without
exporting/importing.
But also, the next version will be compatible only with Firefox 3+ because of
this:
https://developer.mozilla.org/en/Working_with_windows_in_chrome_code#Using_JavaS
cript_code_modules
* You have to do the newlines as literal newlines, for example:
...
<output>"asdf
1234"</output>
...
Original comment by marc.r...@gmail.com
on 21 Jun 2009 at 11:09
sorry, misread what you were saying in the relevant example but I understand
now.
Original comment by ssehsem...@mailinator.com
on 21 Jun 2009 at 4:45
Version 0.12.0 is already released (in the sandbox) and it's easier to write
newlines
and some other especial characters.
Original comment by marc.r...@gmail.com
on 22 Jul 2009 at 5:26
tyvm, I'm going to try it out (upgraded to ffox3 partly for foxreplace :))
Original comment by ssehsem...@mailinator.com
on 22 Jul 2009 at 7:43
Original issue reported on code.google.com by
ssehsem...@mailinator.com
on 14 Jun 2009 at 5:58