Changing the contents of the new HTML file template?

120 views
Skip to first unread message

Cerebus

unread,
Sep 9, 2018, 2:24:59 PM9/9/18
to bbe...@googlegroups.com
I suspect this is in the manual, but I'm away from my Mac.

Can I change the contents of the HTML template that is used for the new HTML file file menu? Or do I have to do something like attach a script to the menu command?

--
ADVANCE TO THE REAR!

Rich Siegel

unread,
Sep 9, 2018, 2:31:48 PM9/9/18
to bbe...@googlegroups.com
On 9/9/18 at 1:47 PM, kr...@kreme.com (Cerebus) wrote:

>Can I change the contents of the HTML template that is used for the
>new HTML file file menu? Or do I have to do something like attach a
>script to the menu command?

Neither. :-) The default "template" is a hardwired behavior, but
you can add your own templates to the "HTML Templates" support
folder, and they will appear in the "New HTML Document" dialog box.

When you're back in front of your Mac, the user manual will
describe how.

R.
--
Rich Siegel Bare Bones Software, Inc.
<sie...@barebones.com> <http://www.barebones.com/>

Someday I'll look back on all this and laugh... until they
sedate me.

@lbutlr

unread,
Sep 9, 2018, 4:59:14 PM9/9/18
to BBEdit Talk
On 09 Sep 2018, at 12:31, Rich Siegel <sie...@barebones.com> wrote:
> On 9/9/18 at 1:47 PM, kr...@kreme.com (Cerebus) wrote:
>
>> Can I change the contents of the HTML template that is used for the
>> new HTML file file menu? Or do I have to do something like attach a
>> script to the menu command?
>
> Neither. :-) The default "template" is a hardwired behavior,

Oh dear. I know that was the case 15 years ago, but didn’t imagine it was still the case.

> but you can add your own templates to the "HTML Templates" support folder, and they will appear in the "New HTML Document" dialog box.
>
> When you're back in front of your Mac, the user manual will describe how.

That’s unfortunate, I hit ⌘-N to create a new HTML document and retraining to do something else… well, I might as well keep doing that I am doing now, keeping a scratch document with my skeleton in it and pasting it in.

The manual seems short not he directions on how to creat a stationery item, btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder to mark the file as a stationary pad, doesn’t show up. I removed the .html file extension, doesn’t show up.

--
The wages of sin is death, but so is the salary of virtue, and at least
the evil get to go home early on Fridays. --Witches Abroad


@lbutlr

unread,
Sep 9, 2018, 5:02:10 PM9/9/18
to BBEdit Talk
On 09 Sep 2018, at 14:59, @lbutlr <kre...@kreme.com> wrote:
> That’s unfortunate, I hit ⌘-N to create a new HTML document and retraining to do something else… well, I might as well keep doing that I am doing now, keeping a scratch document with my skeleton in it and pasting it in.

Brain Cloud. I can reassign the key to the stationary file.

> The manual seems short not he directions on how to creat a stationery item, btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder to mark the file as a stationary pad, doesn’t show up. I removed the .html file extension, doesn’t show up.

Oddly, this required quitting BBEdit for it to refresh. Sorry for the noise.

--
"Is that a star?" "Nah, that's Ted Danson.”

Christopher Stone

unread,
Sep 9, 2018, 5:18:46 PM9/9/18
to BBEdit-Talk
On 09/09/2018, at 15:59, @lbutlr <kre...@kreme.com> wrote:
The manual seems short not he directions on how to creat a stationery item, btw. I saved a BBEdit file in the folder, doesn’t show up. I used the Finder to mark the file as a stationary pad, doesn’t show up. I removed the .html file extension, doesn’t show up.


Hey Lewis,

User manual: Templates p. 273

“A template is a simple text file that contains boilerplate text or HTML content that will form the foundation for the document you are creating. Template files must have the file name suffix “.tmpl” in order to be recognized.”

--
Best Regards,
Chris

@lbutlr

unread,
Sep 9, 2018, 7:41:42 PM9/9/18
to BBEdit Talk
On 09 Sep 2018, at 15:18, Christopher Stone <listm...@suddenlink.net> wrote:
> “A template is a simple text file that contains boilerplate text or HTML content that will form the foundation for the document you are creating. Template files must have the file name suffix “.tmpl” in order to be recognized.”

Which does not mention stationery at all and is not accurate for stationery files either.

My stationary file is named “HTML Skel” with no extension. It is in the Stationery folder and is marked in the info panel as “Stationery Pad”.

The stationery is superior for my purposes to the HTML template since it is in the menus and therefore can have a command key assigned to it. The template is in a drop down menu on the New HTML Document window and x==can’t be, AFAICS, directly hot-keyed.

Still, no harm having the skeleton files in both places.

As it stands now, ⌘-N immediately opens a new HTML document with my scripts and meta tags in place and no intervening windows, which is even better than I’d hoped.


--
There are many reasons for being friends with someone. The fact that
he's pointing a deadly weapon at you is among the top four. --The Last
Continent






Rich Siegel

unread,
Sep 9, 2018, 7:44:10 PM9/9/18
to bbe...@googlegroups.com
On 9/9/18 at 4:59 PM, kre...@kreme.com (@lbutlr) wrote:

>>but you can add your own templates to the "HTML Templates" support
>>folder, and they will appear in
>the "New HTML Document" dialog box.
>>
>>When you're back in front of your Mac, the user manual will describe
>>how.
>
>That’s unfortunate, I hit ⌘-N to create a new HTML document and
>retraining to do something else… well, I might as well keep doing that
>I am doing now, keeping a scratch document with my skeleton in it and
>pasting it in.

Since the "New HTML Document" dialog remembers your template
selection, how would it be any different from what you're doing now?
Reply all
Reply to author
Forward
0 new messages