Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

"Wrap Long Lines" Solution

New Here ,
Feb 16, 2011 Feb 16, 2011

Hi Folks,

I'm looking for a extension that will automatically place <br> in long lines according to a width I specifiy.

I'm not looking for a table or div. I want the extension to put a <br> at the desired text width.

Basically I'm looking for something to do in dreamweaver what this site does:

http://www.formatit.com/

Does anything like this exist?

Thanks

TOPICS
Extensions
849
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 17, 2011 Feb 17, 2011
LATEST

I'm not aware of such an extension, but you can do something similar with Find and Replace (assuming that the content is "pure" text, that is without html tags within the text).

1. Select the text you want to work with.

2. Open the Find and Replace dialog (CTRL+F).

3. Choose "Selected Text" in the "Find in" list

4. In "Find" enter (change 10 to whatever number you want to break after):

([\w\W]{10})

5. In "Replace" enter:

$1<br />

6. At the end of the replace text, hit SHIFT+Enter if you want to have a acual line break inserted after the BR tag

7. Check the "Use Regular Expression"  box.

8. Click the "Replace All" button.

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