On Jun 10, 2009, at 2:26 PM, Rich Siegel wrote:

>> For a simple example, I would like to select some text, activate the
>> script that would add a <p> tag around this selection.
>
> You can do that today, with Clippings (and in fact there are a
> number of clippings supplied with the standard BBEdit installation).

Another option, if you really want to use PHP, is to implement it as a  
Unix Filter. See page 334 of the BBEdit User Manual.

To get you started, place the following script in:

  ~/Library/Application Support/BBEdit/Unix Support/Unix Filters

Then select some text in BBEdit and run the script from BBEdit's #! ->  
Unix Filters menu. You can add a keyboard shortcut from the Unix  
Filters palette.

Here's the script:

-----

#!/usr/bin/php
<?php
$input = file_get_contents ($argv[1]) or die ($php_errormsg);
print ('<p>' . $input . '</p>');
?>

-----

Hope this helps.

-Dennis



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[email protected]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to