![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I use PLP (http://plp.juerd.nl) so I can use perl inside my HTML, it works in the same manner as PHP. TO insert perl into my HTML I simple do the following: head /head body h1>my web page</h1 : # Perl code goes here my $test = "123"; print $test; : /body I want Dreamweaver to color everything from the <: to the :> in a color of my choice, but I am having a hard time even getting Dreamweaver to even colour a .plp extension file for the HTML. |
#3
| |||
| |||
|
|
Tom, First, you will need to define a Perl doctype for DW. Define your doctype in a separate file, as opposed to editing existing files. This makes it much easier to port and you will never have to re-merge your changes after an upgrade. Here’s a TechNote on doing that: http://www.macromedia.com/support/dreamweaver/ts/documents/add_ext_mx.htm Then take a look at the xml files in the Configuration/CodeColoring folder. The Colors.xml file holds the color/style definitions, all the others hold syntax definitions. Create a new xml file for the syntax. I suggest starting with whatever currently supported language has the syntax closest to Perl. Be sure to make the ids unique to avoid conflicts. Use the doctype you just created. Then edit the keywords, comment delimiters, etc. The documentation is here: http://www.macromedia.com/support/dreamweaver/extend/extensible_code_coloring/ You will need to setup the <blockStart>/<blockEnd> tag pairs for the "<:" and ":>". There are default colors for all the fields hard-coded in the C code. If you don’t like them then you can create a colors file. You can use the builtin editor to do this for you, but you’ll need to manually move the xml from the Colors.xml file to your new file. Also, I suggest removing the “docTypes” attribute so the colors... When you get it working, then you can package it into an extension so you can distribute it more easily and upload it to the Macromedia Exchange. Hope this helps, Randy I use PLP (http://plp.juerd.nl) so I can use perl inside my HTML, it works in the same manner as PHP. TO insert perl into my HTML I simple do the following: head /head body h1>my web page</h1 : # Perl code goes here my $test = "123"; print $test; : /body I want Dreamweaver to color everything from the <: to the :> in a color of my choice, but I am having a hard time even getting Dreamweaver to even colour a .plp extension file for the HTML. |
#4
| |||
| |||
|
|
Tom, First, you will need to define a Perl doctype for DW. Define your doctype in a separate file, as opposed to editing existing files. This makes it much easier to port and you will never have to re-merge your changes after an upgrade. Here’s a TechNote on doing that: http://www.macromedia.com/support/dreamweaver/ts/documents/add_ext_mx.htm Then take a look at the xml files in the Configuration/CodeColoring folder. The Colors.xml file holds the color/style definitions, all the others hold syntax definitions. Create a new xml file for the syntax. I suggest starting with whatever currently supported language has the syntax closest to Perl. Be sure to make the ids unique to avoid conflicts. Use the doctype you just created. Then edit the keywords, comment delimiters, etc. The documentation is here: http://www.macromedia.com/support/dreamweaver/extend/extensible_code_coloring/ You will need to setup the <blockStart>/<blockEnd> tag pairs for the "<:" and ":>". There are default colors for all the fields hard-coded in the C code. If you don’t like them then you can create a colors file. You can use the builtin editor to do this for you, but you’ll need to manually move the xml from the Colors.xml file to your new file. Also, I suggest removing the “docTypes” attribute so the colors... When you get it working, then you can package it into an extension so you can distribute it more easily and upload it to the Macromedia Exchange. Hope this helps, Randy I use PLP (http://plp.juerd.nl) so I can use perl inside my HTML, it works in the same manner as PHP. TO insert perl into my HTML I simple do the following: head /head body h1>my web page</h1 : # Perl code goes here my $test = "123"; print $test; : /body I want Dreamweaver to color everything from the <: to the :> in a color of my choice, but I am having a hard time even getting Dreamweaver to even colour a .plp extension file for the HTML. |
#5
| |||
| |||
|
|
how can I stop the coloured code from appearaing in the design view window and give it a small yellow icon?? |
![]() |
| Thread Tools | |
| Display Modes | |
| |