User Guide Cancel

Set coding preferences

  1. Dreamweaver User Guide
  2. Introduction
    1. Responsive web design basics
    2. What's new in Dreamweaver
    3. Web development using Dreamweaver - An Overview
    4. Dreamweaver / Common Questions
    5. Keyboard shortcuts
    6. Dreamweaver system requirements
    7. Feature summary
  3. Dreamweaver and Creative Cloud
    1. Synchronize Dreamweaver settings with Creative Cloud
    2. Creative Cloud Libraries in Dreamweaver
    3. Using Photoshop files in Dreamweaver
    4. Work with Adobe Animate and Dreamweaver
    5. Extract web-optimized SVG files from Libraries
  4. Dreamweaver workspaces and views
    1. The Dreamweaver workspace
    2. Optimize Dreamweaver workspace for visual development
    3. Search files based on filename or content | Mac OS
  5. Set up sites
    1. About Dreamweaver sites
    2. Set up a local version of your site
    3. Connect to a publishing server
    4. Set up a testing server
    5. Import and export Dreamweaver site settings
    6. Bring existing websites from a remote server to your local site root
    7. Accessibility features in Dreamweaver
    8. Advanced settings
    9. Set site preferences for transferring files
    10. Specify proxy server settings in Dreamweaver
    11. Synchronize Dreamweaver settings with Creative Cloud
    12. Using Git in Dreamweaver
  6. Manage files
    1. Create and open files
    2. Manage files and folders
    3. Getting and putting files to and from your server
    4. Check in and check out files
    5. Synchronize files
    6. Compare files for differences
    7. Cloak files and folders in your Dreamweaver site
    8. Enable Design Notes for Dreamweaver sites
    9. Preventing potential Gatekeeper exploit
  7. Layout and design
    1. Use visual aids for layout
    2. About using CSS to lay out your page
    3. Design responsive websites using Bootstrap
    4. Creating and using media queries in Dreamweaver
    5. Present content with tables
    6. Colors
    7. Responsive design using fluid grid layouts
    8. Extract in Dreamweaver
  8. CSS
    1. Understand Cascading Style Sheets
    2. Laying out pages using CSS Designer
    3. Using CSS preprocessors in Dreamweaver
    4. How to set CSS Style preferences in Dreamweaver
    5. Move CSS rules in Dreamweaver
    6. Convert inline CSS to a CSS rule in Dreamweaver
    7. Work with div tags
    8. Apply gradients to background
    9. Create and edit CSS3 transition effects in Dreamweaver
    10. Format code
  9. Page content and assets
    1. Set page properties
    2. Set CSS heading properties and CSS link properties
    3. Work with text
    4. Find and replace text, tags, and attributes
    5. DOM panel
    6. Edit in Live View
    7. Encoding documents in Dreamweaver
    8. Select and view elements in the Document window
    9. Set text properties in the Property inspector
    10. Spell check a web page
    11. Using horizontal rules in Dreamweaver
    12. Add and modify font combinations in Dreamweaver
    13. Work with assets
    14. Insert and update dates in Dreamweaver
    15. Create and manage favorite assets in Dreamweaver
    16. Insert and edit images in Dreamweaver
    17. Add media objects
    18. Adding videos in Dreamweaver
    19. Insert HTML5 video
    20. Insert SWF files
    21. Add audio effects
    22. Insert HTML5 audio in Dreamweaver
    23. Work with library items
    24. Using Arabic and Hebrew text in Dreamweaver
  10. Linking and navigation
    1. About linking and navigation
    2. Linking
    3. Image maps
    4. Troubleshoot links
  11. jQuery widgets and effects
    1. Use jQuery UI and mobile widgets in Dreamweaver
    2. Use jQuery effects in Dreamweaver
  12. Coding websites
    1. About coding in Dreamweaver
    2. Coding environment in Dreamweaver
    3. Set coding preferences
    4. Customize code coloring
    5. Write and edit code
    6. Code hinting and code completion
    7. Collapse and expand code
    8. Reuse code with snippets
    9. Lint code
    10. Optimize code
    11. Edit code in Design view
    12. Work with head content for pages
    13. Insert server-side includes in Dreamweaver
    14. Using tag libraries in Dreamweaver
    15. Importing custom tags into Dreamweaver
    16. Use JavaScript behaviors (general instructions)
    17. Apply built-in JavaScript behaviors
    18. About XML and XSLT
    19. Perform server-side XSL transformations in Dreamweaver
    20. Performing client-side XSL transformations in Dreamweaver
    21. Add character entities for XSLT in Dreamweaver
    22. Format code
  13. Cross-product workflows
    1. Installing and using extensions to Dreamweaver
    2. In-App updates in Dreamweaver
    3. Insert Microsoft Office documents in Dreamweaver (Windows only)
    4. Working with Fireworks and Dreamweaver
    5. Edit content in Dreamweaver sites using Contribute
    6. Dreamweaver-Business Catalyst integration
    7. Create personalized email campaigns
  14. Templates
    1. About Dreamweaver templates
    2. Recognizing templates and template-based documents
    3. Create a Dreamweaver template
    4. Create editable regions in templates
    5. Create repeating regions and tables in Dreamweaver
    6. Use optional regions in templates
    7. Define editable tag attributes in Dreamweaver
    8. How to create nested templates in Dreamweaver
    9. Edit, update, and delete templates
    10. Export and import xml content in Dreamweaver
    11. Apply or remove a template from an existing document
    12. Edit content in Dreamweaver templates
    13. Syntax rules for template tags in Dreamweaver
    14. Set highlighting preferences for template regions
    15. Benefits of using templates in Dreamweaver
  15. Mobile and multiscreen
    1. Create media queries
    2. Changing page orientation for mobile devices
    3. Create web apps for mobile devices using Dreamweaver
  16. Dynamic sites, pages and web forms
    1. Understand web applications
    2. Set up your computer for application development
    3. Troubleshoot database connections
    4. Removing connection scripts in Dreamweaver
    5. Design dynamic pages
    6. Dynamic content sources overview
    7. Define sources of dynamic content
    8. Add dynamic content to pages
    9. Changing dynamic content in Dreamweaver
    10. Display database records
    11. Provide and troubleshoot live data in Dreamweaver
    12. Add custom server behaviors in Dreamweaver
    13. Building forms using Dreamweaver
    14. Use forms to collect information from users
    15. Create and enable ColdFusion forms in Dreamweaver
    16. Create web forms
    17. Enhanced HTML5 support for form elements
    18. Develop a form using Dreamweaver
  17. Building applications visually
    1. Build master and detail pages in Dreamweaver
    2. Build search and results pages
    3. Build a record insert page
    4. Build an update record page in Dreamweaver
    5. Building record delete pages in Dreamweaver
    6. Use ASP commands to modify database in Dreamweaver
    7. Build a registration page
    8. Build a login page
    9. Build a page that only authorized users can access
    10. Securing folders in Coldfusion using Dreamweaver
    11. Using ColdFusion components in Dreamweaver
  18. Test, preview, and publish websites
    1. Preview pages
    2. Preview Dreamweaver web pages on multiple devices
    3. Test your Dreamweaver site
  19. Troubleshooting
    1. Fixed issues
    2. Known issues

 

 

Learn how to set coding preferences, code themes, format, and code rewriting preferences in Dreamweaver.

You can set coding preferences such as code formatting and coloring, among others, to meet your specific needs.

Note:
  • To set advanced preferences, use the Tag Library editor (see Managing tag libraries).
  • Dreamweaver supports formatting for CSS, JS, and PHP file types. For information on how to customize PHP, CSS, JS code formatting, see Format code.

Set the code appearance

You can set word wrapping, display line numbers for the code, set syntax coloring for code elements, set indenting, and show hidden characters from the View > Code View Options menu.

  1. View a document in Code view or the Code inspector.
  2. Select View > Code View Options.

  3. Select or deselect any of the following options:

    Word Wrap

    Wraps the code so that you can view it without scrolling horizontally. This option doesn’t insert line breaks; it just makes the code easier to view.

    Line Numbers

    Displays line numbers along the side of the code.

    Hidden Characters

    Displays special characters in place of white space. For example, a dot replaces each space, a double chevron replaces each tab, and a paragraph marker replaces each line break.

    Note:

    Soft line breaks that Dreamweaver uses for word wrapping are not displayed with a paragraph marker.

    Syntax Coloring

    Enables or disables code coloring. For information on changing the coloring scheme, see Set the code colors.

    Auto Indent

    Makes your code indent automatically when you press Enter while writing code. The new line of code indents to the same level as the previous line. For information on changing the indent spacing, see the Tab Size option in Change the code format.

Change the code format

You can change the look of your code by specifying formatting preferences such as indentation, line length, and the case of tag and attribute names.

All the Code Format options, except the Override Case Of option, are automatically applied only to new documents or additions to documents that you subsequently create.

To reformat existing HTML documents, open the document, and select Edit > Code > Apply Source Formatting.

  1. Select Edit > Preferences.
  2. Select Code Format from the Category list on the left.
  3. Set any of the following options:

    Indent

    Indicates whether code generated by Dreamweaver should be indented (according to the indentation rules specified in these preferences) or not.

    Note:

    Most of the indentation options in this dialog box apply only to code generated by Dreamweaver, not to code that you type. To make each new line of code that you type indent to the same level as the previous line, select View > Code View Options Auto-Indent option. For more information, see Set the code appearance.

    With

    (Text box and pop‑up menu) Specifies how many spaces or tabs Dreamweaver should use to indent code that it generates. For example, if you type 3 in the box and select Tabs in the pop‑up menu, then code generated by Dreamweaver is indented using three tab characters for every level of indentation.

    Tab Size

    Determines how many characters wide each tab character appears in Code view. For example, if Tab Size is set to 4, then each tab is displayed in Code view as a four-character-wide blank space. If, additionally, Indent With is set to 3 Tabs, then code generated by Dreamweaver is indented using three tab characters for every level of indentation, which appears in Code view as a twelve-character-wide blank space.

    Note:

    Dreamweaver indents using either spaces or tabs; it doesn’t convert a run of spaces to a tab when inserting code.

    Emmet

    Select this option if you plan to use Emmet abbreviations as you code. Selecting this option ensures that when you press Tab, Dreamweaver converts the Emmet abbreviation into full HTML or CSS code. For more information on using Emmet, see Use the Emmet toolkit with Dreamweaver.

    Line Break Type

    Specifies the type of remote server (Windows, Macintosh, or UNIX) that hosts your remote site. Choosing the correct type of line break characters ensures that your HTML source code appears correctly when viewed on the remote server. This setting is also useful when you are working with an external text editor that recognizes only certain kinds of line breaks. For example, use CR LF (Windows) if Notepad is your external editor, and use CR (Macintosh) if SimpleText is your external editor.

    Note:

    For servers that you connect to using FTP, this option applies only to binary transfer mode; the ASCII transfer mode in Dreamweaver ignores this option. If you download files using ASCII mode, Dreamweaver sets line breaks based on the operating system of your computer; if you upload files using ASCII mode, the line breaks are all set to CR LF.

    TD Tag: Do Not Include A Break Inside The TD Tag

    Addresses a rendering problem that occurs in some older browsers when white space or line breaks exist immediately after a <td> tag, or immediately before a </td> tag. When you select this option, Dreamweaver does not write line breaks after a <td> or before a </td> tag, even if the formatting in the Tag Library indicates that the line break should be there.

    Advanced Formatting

    Lets you set formatting options for individual tags and attributes in the Tag Library Editor.

    White Space Character

    (Japanese version only) Lets you select either &nbsp; or Zenkaku space for HTML code. The white space selected in this option will be used for empty tags when creating a table and when the “Allow Multiple Consecutive Spaces” option is enabled in Japanese Encoding pages.

    Minimum code folding size

    The default code folding size is two lines. With this default setting, all code fragments that have at least two lines of code are collapsible. Code fragments that are lesser than two lines can be collapsed only by selecting the code. For more information on code folding, see Collapse and expand code.

Set the code rewriting preferences

Use the code rewriting preferences to specify how and whether Dreamweaver modifies your code while opening documents, when copying and pasting form elements, and when entering attribute values and URLs using tools such as the Property inspector. These preferences have no effect when you edit HTML or scripts in Code view.

If you disable the rewriting options, invalid-markup items are displayed in the Document window for HTML that it would have rewritten.

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
  2. Select Code Rewriting from the Category list on the left.
  3. Set any of the following options:

    Fix Invalidly Nested and Unclosed Tags

    Rewrites overlapping tags. For example, <b><i>text</b></i> is rewritten as <b><i>text</i></b>. This option also inserts closing quotation marks and closing brackets if they are missing.

    Rename Form Items When Pasting

    Ensures you don’t have duplicate names for form objects. This option is enabled by default.

    Note:

    Unlike the other options in this preferences dialog box, this option does not apply when you open a document, only when you copy and paste a form element.

    Remove Extra Closing Tags

    Deletes closing tags that have no corresponding opening tag.

    Warn When Fixing Or Removing Tags

    Displays a summary of technically invalid HTML that Dreamweaver attempted to correct. The summary notes the location of the problem (using line and column numbers) so that you can find the correction and ensure that it’s rendering as intended.

    Never Rewrite Code: In Files With Extensions

    Allows you to prevent Dreamweaver from rewriting code in files with the specified filename extensions. This option is particularly useful for files that contain third-party tags.

    Encode <, >, &, And " In Attribute Values Using &

    Ensures that attribute values that you enter or edit using Dreamweaver tools such as the Property inspector contain only legal characters. This option is enabled by default.

    Note:

    This option and the following options do not apply to URLs that you type in Code view. Also, they do not cause existing code already in a file to change.

    Do Not Encode Special Characters

    Prevents Dreamweaver from changing URLs to use only legal characters. This option is enabled by default.

    Encode Special Characters In URL Using &#

    Ensures that when you enter or edit URLs using Dreamweaver tools such as the Property inspector, those URLs contain only legal characters.

    Encode Special Characters In URL Using %

    Operates the same way as the preceding option, but uses a different method of encoding special characters. This encoding method (using the percent sign) may be more compatible with older browsers, but doesn’t work as well with characters from some languages.

Set code hints preferences

Use the code hint preferences to configure how you want code hints to work for you. 

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).

    Set code hints preferences

  2. Select Code Hints from the category on the left.

  3. Set any of the following options:

    Close tags

    Specify how you want Dreamweaver to close tags.

    • After typing "</" - 
    • After typing the open tag's ">" - Select this option if you want Dreamweaver to automatically add a closing tag after you close the opening tag.
    • Never - Set this option if you don't want Dreamweaver to automatically add closing tags.

    Enable code hints

    Select this option to enable or disable code hinting and code completion in Dreamweaver. For more information on Dreamweaver's code hinting and code completion features, see Code hinting and code completion.

    Enable description tooltips

    Select this option to enable descriptions to appear with your code hints. These descriptions provide additional information about the code you are writing.

    Auto-insert braces  When checked,  closing brace is automatically inserted whenever user types an opening brace. When unchecked, closing brace is not inserted when user types opening brace. Applies to all types of braces and all file types (html, php,css, js).

    Auto-insert quotes  When checked, closing quote Is automatically inserted whenever user types an opening quote. When unchecked, closing quote is not inserted when user types opening quote. Applies to both single and double quotes and all file types (html, php,css, js).

Set preference for auto completion of codes

You can enable and disable the auto closing of brackets and quotes by performing the following steps:

  1. Open the brackets.json file from the following location:

    • Win: %appdata%\Adobe\Dreamweaver CC 2018\en_US\Configuration\Brackets\
    • Mac: ~/Library/Application Support/Adobe/Dreamweaver CC 2018/en_US/Configuration/Brackets/
       
  2. To disable auto closing of brackets and parantheses, set autoCloseBraces to False.

  3. To disable auto insertion of matching quotes, set autoCloseQuotes to Flase.

    If you want to enable auto closing of brackets, and matching quotes, set the above mentioned values to true.

    Set preference for auto completion of code in Dreamweaver
    Set preference for auto completion of code in Dreamweaver

  4. Save the .json file, and launch Dreamweaver.

Set PHP preferences

You can set the PHP coding development environment you want to work in. You can do this on a site-specific basis for individual sites you work on, or on a general basis for all PHP files saved outside Dreamweaver sites.

Dreamweaver sets up the code hints, and linting checks for the selected PHP language version.

To set PHP code version preferences for non site-specific files, complete the following steps:

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).

  2. Set PHP from the category list on the left.

  3. Choose a PHP version from the PHP Version drop-down list and click Apply.

To set the PHP version for a specific site, complete the following steps:

  1. In the Site Setup dialog box, under Advanced Settings, select PHP.

  2. Choose a PHP version from the PHP Version drop-down list and click Save.

    Set PHP preferences on a site-specific basis
    Set PHP preferences on a site-specific basis

Set color themes and code themes

You can choose a color theme according to your preferences when you start Dreamweaver. You can also change this preference any time.

  1. Select Edit > Preferences (Windows) or Dreamweaver > Preferences (Macintosh).
  2. Select Interface from the Category list on the left.

  3. Choose a theme from the Color Themes list. 

  4. After setting the interface theme, set the code theme.

    You can choose between a light or dark code theme.

  5. Click Apply to save the changes.

    You can choose to further customize the code coloring according to your requirements. For more information, see Customize code coloring.

Use an external editor

You can specify an external editor to use for editing files with specific filename extensions. For example, you can start a text editor such as BBEdit, Notepad, or TextEdit from Dreamweaver to edit JavaScript (JS) files.

You can assign different external editors for different filename extensions.

Set an external editor for a file type

  1. Select Edit > Preferences.
  2. Select File Types/Editors from the Category list on the left, set the options, and click OK.

    Open In Code View

    Specifies the filename extensions that automatically open in Code view in Dreamweaver.

    Reload Modified Files

    Specifies the behavior when Dreamweaver detects that changes were made externally to a document that is open in Dreamweaver.

    Save On Launch

    Specifies whether Dreamweaver should always save the current document before starting the editor, never save the document, or prompt you to ask whether to save or not each time you start the external editor.

    Fireworks

    You can connect Fireworks with Dreamweaver by providing the path to the application here.

 Adobe

Dapatkan bantuan lebih cepat dan lebih mudah

Pengguna baru?

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online