Skip to main content
Participant
June 26, 2008
Question

How to change Edit > Preferences > New Document > Default encoding

  • June 26, 2008
  • 1 reply
  • 567 views
Hi

How do you change Edit > Preferences > New Document > Default encoding in an extension? Code example please if possible.

I am creating a very simple extension and would like to know how to change the document encoding before I create a new document. I will then return the encoding back to what it was prior to running the extension.

Aside from the main question: I have downloaded both the Dreamweaver API Reference and Extending Dreamweaver PDFs and looked at the LiveDocs too, but seem to never find what I want. Is there another resource out there that I'm missing. They seem to explain all the functions but never seem to provide any properties. Maybe I need more time looking through.

all the best
Dave
This topic has been closed for replies.

1 reply

Randy Edmunds
Adobe Employee
Adobe Employee
August 8, 2010

Dave,

How do you change Edit > Preferences > New Document > Default encoding in an extension? Code example please if possible.

I am creating a very simple extension and would like to know how to change the document encoding before I create a new document. I will then return the encoding back to what it was prior to running the extension.

I think the best solution is to create the new document first, and then change the charset on the <meta> tag.

Take a look at the setMetaTag() function defined in Configuration/Inspectors/meta.js for an example.

Randy