
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bgoodman/code-edit
Advanced tools
A custom element encapsulating a CodeMirror instance.
npm install @bgoodman/code-edit
yarn add @bgoodman/code-edit
<script type="module" src="./dist/index.js"></script>
<code-edit></code-edit>
mode
Specify code type using a language mode. Options include:
"htmlmixed"
- default (html/css/js)"javascript"
"typescript"
"markdown"
storage-key
If set, allows the editors value to persist accross sessions using window.localStorage
.
Data is stored as key ${window.location.href}-${this.storageKey}
.
If unset, the editor's value will reset each time the component loads.
getValue
Get the current editor content. You can pass it an optional argument to specify the string to be used to separate lines (defaults to "\n").
getValue(seperator?: string): Promise<string>
setValue
Set the editor content.
setValue(code: string): Promise<void>
FAQs
A custom element encapsulating a CodeMirror instance.
The npm package @bgoodman/code-edit receives a total of 2 weekly downloads. As such, @bgoodman/code-edit popularity was classified as not popular.
We found that @bgoodman/code-edit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.