Highlighted

How to Batch Insert Specific Line Breaks in Code (View)?

Community Beginner ,
Oct 31, 2018

Copy link to clipboard

Copied

I'd like to insert a line break after <p>, before </p>, and after each <img> tag. Is there a way I could batch insert line breaks in these specific spots?

For example:

Unformatted:

Screen Shot 2018-10-31 at 12.15.11 PM.png

Formatted, what I'm looking to achieve:

Screen Shot 2018-10-31 at 12.15.28 PM.png

Adobe Community Professional
Correct answer by B i r n o u | Adobe Community Professional

depending if you want to physically add a back return into the code, of if you want to only format the display of the code, you will have to apply different solution

1 if you want to change the code... search and replace using reg exp

search (<p[^+>]*>)|(<\/p>)|(<img[^+>]*>)

replace by $1$2$3<br>

2 if you want to display code format differently

go on edition > bibliotheque de balises...

search for you concerned tag and edit the line retun pop up

Views

277

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to Batch Insert Specific Line Breaks in Code (View)?

Community Beginner ,
Oct 31, 2018

Copy link to clipboard

Copied

I'd like to insert a line break after <p>, before </p>, and after each <img> tag. Is there a way I could batch insert line breaks in these specific spots?

For example:

Unformatted:

Screen Shot 2018-10-31 at 12.15.11 PM.png

Formatted, what I'm looking to achieve:

Screen Shot 2018-10-31 at 12.15.28 PM.png

Adobe Community Professional
Correct answer by B i r n o u | Adobe Community Professional

depending if you want to physically add a back return into the code, of if you want to only format the display of the code, you will have to apply different solution

1 if you want to change the code... search and replace using reg exp

search (<p[^+>]*>)|(<\/p>)|(<img[^+>]*>)

replace by $1$2$3<br>

2 if you want to display code format differently

go on edition > bibliotheque de balises...

search for you concerned tag and edit the line retun pop up

Views

278

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 31, 2018 0
Adobe Community Professional ,
Oct 31, 2018

Copy link to clipboard

Copied

depending if you want to physically add a back return into the code, of if you want to only format the display of the code, you will have to apply different solution

1 if you want to change the code... search and replace using reg exp

search (<p[^+>]*>)|(<\/p>)|(<img[^+>]*>)

replace by $1$2$3<br>

2 if you want to display code format differently

go on edition > bibliotheque de balises...

search for you concerned tag and edit the line retun pop up

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 31, 2018 2
Community Beginner ,
Nov 06, 2018

Copy link to clipboard

Copied

Thank you!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2018 0
Adobe Community Professional ,
Nov 06, 2018

Copy link to clipboard

Copied

you're welcome

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2018 0
Adobe Community Professional ,
Oct 31, 2018

Copy link to clipboard

Copied

But before you do any of that, please fix the file paths to images and rename images without spaces or special characters.

On the web, this is an invalid file name.

halloween/ 1/ 5.gif

Change it to this without spaces:

halloween/01/05.gif

Judging by the path to file:///Users/Kristy/..... on your computer, I'm guessing you are not working within a defined local site folder.  Or if you are, you have not saved and named your document.  To define a site, go to Site > New Site and give it a name and choose a folder on your hard drive.  For example, C:\MyTestSite\

CC-localsite.jpg

Image paths should resolve to your site's images folder.

CC-StarterPageAssets.jpg

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 31, 2018 2
LEGEND ,
Oct 31, 2018

Copy link to clipboard

Copied

Good eye, Nancy.  I completely glossed over the path/name issues.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 31, 2018 0
Community Beginner ,
Oct 31, 2018

Copy link to clipboard

Copied

The naming's on purpose. I used Mac's batch renaming -> format feature.

I don't intend to make this a website. This is just for personal use.

Thank you, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 31, 2018 0
LEGEND ,
Nov 01, 2018

Copy link to clipboard

Copied

kristys71903467  wrote

I don't intend to make this a website. This is just for personal use.

Regardless of whether this is going "live" or not, URLs should not have spaces in them.  The spaces should be replaced (both folders and files) with either an underscore _ or %20.  Funky things can happen.

V/r,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 01, 2018 1
Adobe Community Professional ,
Oct 31, 2018

Copy link to clipboard

Copied

'bibliotheque de balises.' sounds soooo much better than 'Tag Library Editor'

Paul-M, ACP

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 31, 2018 0