Copy link to clipboard
Copied
Copy link to clipboard
Copied
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