Panduan Pengguna Batal

Work with text

 

 

Learn how add and format text in Live view, Code view, or by extracting text and the associated properties from PSD files.

Add text to a document

To add text to a Dreamweaver document, you can type text directly in the Document window, or you can cut and paste text. You can also import text from other documents.

When you paste text into a Dreamweaver document, you can use either the Paste or the Paste Special command. The Paste Special command lets you specify the format of pasted text in different ways. For example, if you wanted to paste text from a formatted Microsoft Word document into your Dreamweaver document, but wanted to strip out all of the formatting so that you could apply your own CSS style sheet to the pasted text, you could select the text in Word, copy it to your Clipboard, and use the Paste Special command to select the option that lets you paste text only.

When using the Paste command to paste text from other applications, you can set paste preferences as default options.

Nota:

Control+V (Windows) and Command+V (Macintosh) always paste text only (no formatting) in Code view.

  1. Add text to your document by doing one of the following:
    • Extract text from your PSD compositions using the Extract panel. For detailed information, see Copy text from PSD files.
    • Type text directly into the Document window.
    • Copy text from another application, switch to Dreamweaver, position the insertion point in the Design view of the Document window, and select Edit > Paste or Edit > Paste Special.

    When you select Edit > Paste Special, you can select several paste formatting options.

    You can also paste text using the following keyboard shortcuts:

     

    Paste option

    Keyboard shortcut

    Paste

    Control+V (Windows)

    Command+V (Macintosh)

    Paste Special

    Control+Shift+V (Windows)

    Command+Shift+V (Macintosh)

     

Insert special characters

Certain special characters are represented in HTML by a name or a number, referred to as an entity. HTML includes entity names for characters such as the copyright symbol (©), the ampersand (&), and the registered-trademark symbol (®). Each entity has both a name (such as —) and a numeric equivalent (such as —).

Nota:

HTML uses the angle brackets <> in its code, but you may need to express the special characters for greater than or less than without Dreamweaver interpreting them as code. In this case, use &gt; for greater than (>) and &lt; for less than (<).

Unfortunately, many older browsers don’t properly display many of the named entities.

  1. In the Document window, place the insertion point where you want to insert a special character.
  2. Do one of the following:
    • Select the name of the character from the Insert > HTML > Character.

    • In the HTML category of the Insert panel, click the Characters option and select the character from the pop-up menu.

    Nota:

    There are many other special characters available; to select one of them, select Insert > HTML > Character > Other..., or click the Characters button in the HTML category of the Insert panel and select the Other Characters option. Select a character from the Insert Other Character dialog box, and click OK.

Add space between characters

HTML only allows for one space between characters; to add additional space in a document you must insert a non-breaking space. You can set a preference to automatically add non-breaking spaces in a document.

Insert a non-breaking space

  1. Do one of the following:
    • Select Insert > HTML > Special Characters > Non-Breaking Space.

    • Press Control+Shift+Spacebar (Windows) or Option+Spacebar (Macintosh).

    • From Insert panel, select HTML, click the Characters button and select the Non-Breaking Space option.

Set a preference to add non-breaking spaces

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
  2. In the General category make sure Allow Multiple Consecutive Spaces is checked.

Add paragraph spacing

Dreamweaver works similarly to many word processing application: you press Enter (Windows) or Return (Macintosh) to create a new paragraph. Web browsers automatically insert a blank line of space between paragraphs. You can add a single line of space between paragraphs by inserting a line break.

Add a paragraph return

  1. Press Enter (Windows) or Return (Macintosh).

Add a line break

  1. Do one of the following:
    • Press Shift+Enter (Windows) or Shift+Return (Macintosh).

    • Select Insert > HTML > Special Characters > Line Break.

    • From the Insert panel, select HTML, click the Characters button and select Line Break.

Create bulleted and numbered lists

You can create numbered (ordered) lists, bulleted (unordered) lists, and definition lists from existing text or from new text as you type in the Document window.

Definition lists do not use leading characters like bullet points or numbers and are often used in glossaries or descriptions. Lists can also be nested. Nested lists are lists that contain other lists. For example, you might want an ordered or bulleted list nested within another numbered or ordered list.

You use the List Properties dialog box to set the appearance of an entire list or for an individual list item. You can set number style, reset numbering, or set bullet style options for individual list items or for the entire list.

Create a new list

  1. In the Dreamweaver document, place the insertion point where you want to add a list, then do one of the following:
    • In the HTML Property inspector, click either Ordered List or List Item.

    • Select Insert > HTMl > and select the type of list desired - Unordered List (bulleted list), Ordered List (numbered list).

      The leading character for the specified list item appears in the Document window.

  2. Type the list item text, then press Enter (Windows) or Return (Macintosh) to create another list item.
  3. To complete the list, press Enter twice (Windows) or press Return twice (Macintosh).

Create a list using existing text

  1. Select a series of paragraphs to make into a list.
  2. Select Insert > HTML > Unordered List or Ordered List or List Item.

Create a nested list

  1. Select the list items that you want to nest.

  2. Right-click and select List > Indent.

    Dreamweaver indents the text and creates a separate list with the original list’s HTML attributes.

  3. Apply a new list type or style to the indented text by following the same procedure used above.

Set list properties for an entire list

  1. In the Document window, create at least one list item. The new style will automatically apply to additional items you add to the list.
  2. With the insertion point in the list item’s text, right-click and select List > Properties. The system displays the List Properties dialog box.

  3. Set the options you want to define the list:

    List Type

    Specifies list properties while List Item specifies an individual item in a list. Use the pop‑up menu to select a bulleted, numbered, directory, or menu list. Depending on the List Type you select different options appear in the dialog box.

    Style

    Determines the style of numbers or bullets used for a numbered or bulleted list. All items in the list will have this style unless you specify a new style for items within the list.

    Start Count

    Sets the value for the first item in a numbered list.

  4. Click OK to set the choices.

Set list properties for a list item

  1. In the Document window, place the insertion point in the text of a list item you want to affect
  2. Right-click and select List > Properties.

  3. Under List Item, set the options you want to define:

    New Style

    Specifies a style for the selected list item. Styles in the New Style menu are related to the type of list displayed in the List Type menu. For example, if the List Item menu displays Bulleted List, only bullet options are available in the New Style menu.

    Reset Count To

    Sets a specific number from which to number list item entries.

  4. Click OK to set the options.

Search for and replace text

For information on finding and replacing text, see Find and Replace text.

Define abbreviations and acronyms

HTML provides tags that let you define the abbreviations and acronyms you use in your page for search engines, spell checkers, language translation programs, or speech synthesizers. For example, you might want to specify that the abbreviation ME in your page stands for mechanical engineer, or the acronym WHO stands for World Health Organization.

  1. Select the abbreviation or acronym in the text of your page.
  2. Select Insert > HTML > Text Objects > Abbreviation, or Insert > HTML > Text Objects > Acronym.
  3. Enter the full text of the acronym or abbreviation.
  4. Enter the language, such as en for English, de for German, or it for Italian.

Set copy and paste preferences

You can set special paste preferences as default options when using Edit > Paste to paste text from other applications. For example, if you always want to paste text as text only, or text with basic formatting, you can set the default option in the Copy/Paste Preferences dialog box.

Nota:

When you paste text into a Dreamweaver document, you can use either the Paste or the Paste Special command. The Paste Special command lets you specify the format of pasted text in different ways. For example, if you wanted to paste text from a formatted Microsoft Word document into your Dreamweaver document, but wanted to strip out all of the formatting so that you could apply your own CSS style sheet to the pasted text, you could select the text in Word, copy it to your Clipboard, and use the Paste Special command to select the option that lets you paste text only.

Nota:

Preferences set in the Copy/Paste Preferences dialog box apply only to material pasted into Design view.

  1. Select Edit > Preferences (Windows) or Dreamweaver Preferences (Macintosh).
  2. Click the Copy/Paste category.
  3. Set the following options and click OK.

    Text Only

    Lets you paste unformatted text. If the original text is formatted, all formatting, including line breaks and paragraphs, will be removed.

    Text With Structure

    Lets you paste text that retains structure, but does not retain basic formatting. For example, you can paste text and retain the structure of paragraphs, lists, and tables, without retaining bold, italics, and other formatting.

    Text With Structure Plus Basic Formatting

    Lets you paste both structured and simple HTML-formatted text (e.g., paragraphs and tables, as well as text formatted with the b, i, u, strong, em, hr, abbr, or acronym tag).

    Text With Structure Plus Full Formatting

    Lets you paste text that retains all structure, HTML formatting, and CSS styles.

    Nota:

    The Full Formatting option cannot retain CSS styles that come from an external style sheet, nor can it retain styles if the application from which you are pasting does not retain styles upon pasting to the Clipboard.

    Retain Line Breaks

    Lets you keep line breaks in pasted text. This option is disabled if you have selected Text Only.

    Clean Up Word Paragraph Spacing

    Select this option if you selected Text With Structure or Text With Structure Plus Basic Formatting, and want to eliminate extra space between paragraphs when you paste your text.

    Convert smart quotes to straight quotes Converts smart quotes to straight quotes.

Dapatkan bantuan dengan lebih pantas dan mudah

Pengguna baharu?