Adobe Dreamweaver API Reference CS5 Manuale Utente Pagina 335

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 533
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 334
330
DREAMWEAVER API REFERENCE
Page content
Last updated 8/27/2013
Meta
Navigation
Text
Snippet files are XML documents, so you can specify the encoding in the XML directive, as shown in the following
example:
<?XML version="1.0" encoding="utf-8">
The following sample shows a snippet file:
<snippet name="Detect Flash" description="VBscript to check for Flash ActiveX control"
preview="code" factory="true" type="wrap" >
<insertText location="beforeSelection">
<![CDATA[ ------- code --------- ]]>
</insertText>
<insertText location="afterSelection">
<![CDATA[ ------- code --------- ]]>
</insertText>
</snippet>
Snippet tags in CSN files have the following attributes:
You can use the following methods to add Snippets panel functions to your extensions.
dreamweaver.snippetPalette.getCurrentSnippetPath()
Availability
Dreamweaver MX 2004.
Description
Returns the path to the snippet that is currently selected in the Snippets panel.
Arguments
None.
Returns
The path, relative to the Snippets folder, to the snippet selected in the Snippets panel. Returns an empty string if no
snippet is selected.
Attribute Description
name
Name of snippet
description
Snippet description
preview
Type of preview: "code" to display the snippet in preview area or "design" to display the snippet
rendered in HTML in the Preview area.
type
If the snippet is used to wrap a user selection, "wrap"; if the snippet should be inserted before the
selection,
"block".
Vedere la pagina 334
1 2 ... 330 331 332 333 334 335 336 337 338 339 340 ... 532 533

Commenti su questo manuale

Nessun commento