
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@uiw/codemirror-extensions-color
Advanced tools
Color Extensions for CodeMirror6.
npm install @uiw/codemirror-extensions-color --save
import CodeMirror from '@uiw/react-codemirror';
import { color, colorView, colorTheme } from '@uiw/codemirror-extensions-color';
function App() {
return (
<CodeMirror
value="body { color: #333; }"
extensions={[color]}
// ------ Or ------
// extensions={[colorView(false), colorTheme]}
height="200px"
/>
);
}
export default App;
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { color } from '@uiw/codemirror-extensions-color';
const state = EditorState.create({
doc: 'body { color: #333; }',
extensions: [color],
});
const view = new EditorView({
parent: document.querySelector('#editor'),
state,
});
import { ViewPlugin, EditorView, ViewUpdate, DecorationSet } from '@codemirror/view';
import { Extension } from '@codemirror/state';
export declare enum ColorType {
rgb = 'RGB',
hex = 'HEX',
named = 'NAMED',
hsl = 'HSL',
}
export interface ColorState {
from: number;
to: number;
alpha: string;
colorType: ColorType;
}
export declare const colorView: (showPicker?: boolean) => ViewPlugin<{
decorations: DecorationSet;
update(update: ViewUpdate): void;
changePicker(view: EditorView, canBeEdited: boolean): void;
}>;
export declare const colorTheme: Extension;
export declare const color: Extension;
As always, thanks to our amazing contributors!
Made with action-contributors.
Licensed under the MIT License.
FAQs
Color Extensions for CodeMirror6.
The npm package @uiw/codemirror-extensions-color receives a total of 4,555 weekly downloads. As such, @uiw/codemirror-extensions-color popularity was classified as popular.
We found that @uiw/codemirror-extensions-color demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.