Highlighted

Escaping Chunks of HTML (and other code)

Community Beginner ,
Jun 08, 2019

Copy link to clipboard

Copied

Hi,

I'm blogging and inserting snippets of code (HTML, JavaScript, Java).  This code usually includes angle brackets, <>.

Is there a plugin, macro, or other technique that will let me highlight a chunk of code and replace the < with &lt; and > with &gt;?  Right now, I'm doing a search and replace in Sublime text and pasting the result.  I didn't see a Find and Replace in Selection in DW.

Thanks,

Carl

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Copy code and paste into DW Design view.  The resulting code will contain the HTML entities you want.

Another option is to use CodePen or JS Fiddle to embed code directly into your blog post.  See CSS Tricks for an example.

https://css-tricks.com/snippets/css/stack-of-paper/

Views

46

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

Escaping Chunks of HTML (and other code)

Community Beginner ,
Jun 08, 2019

Copy link to clipboard

Copied

Hi,

I'm blogging and inserting snippets of code (HTML, JavaScript, Java).  This code usually includes angle brackets, <>.

Is there a plugin, macro, or other technique that will let me highlight a chunk of code and replace the < with &lt; and > with &gt;?  Right now, I'm doing a search and replace in Sublime text and pasting the result.  I didn't see a Find and Replace in Selection in DW.

Thanks,

Carl

Adobe Community Professional
Correct answer by Nancy OShea | Adobe Community Professional

Copy code and paste into DW Design view.  The resulting code will contain the HTML entities you want.

Another option is to use CodePen or JS Fiddle to embed code directly into your blog post.  See CSS Tricks for an example.

https://css-tricks.com/snippets/css/stack-of-paper/

Views

47

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
Jun 08, 2019 0
Adobe Community Professional ,
Jun 08, 2019

Copy link to clipboard

Copied

Copy code and paste into DW Design view.  The resulting code will contain the HTML entities you want.

Another option is to use CodePen or JS Fiddle to embed code directly into your blog post.  See CSS Tricks for an example.

https://css-tricks.com/snippets/css/stack-of-paper/

Nancy O'Shea, ACP
Alt-Web.com

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...
Jun 08, 2019 1