A library of SolidJS primitives to build code editors using CodeMirror 6 @codemirror
MIT License
Bot releases are hidden (Show)
Published by riccardoperra over 1 year ago
Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]@2.2.2
Published by riccardoperra about 2 years ago
Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]@2.1.0
Published by riccardoperra over 2 years ago
This version of solid-codemirror has many breaking changes due to the update to official v6 release and support for compartments. For more detailed informations about CodeMirror6 and extension/compartments, see the official documentation
createCodeMirror
with extension modularity and compartments
supportcreateEditorControlledValue
extension helpercreateEditorFocus
helpercreateEditorReadonly
helperCodeMirror
component (BREAKING!!)
The createCodeMirror
has been refactored removing the setOptions
function which allowed to do a top-level reconfiguration. Instead, it has been relpaced with the createExtension
function which create a compartment for the given extension/s.
const {setOptions} = createCodeMirror();
setOptions({extensions: [
basicSetup(),
EditorView.theme([]),
lineNumbers()
]})
const {createExtension} = createCodeMirror();
// Single-extension compartment
const reconfigurebasicSetup = createExtension(basicSetup());
const reconfigureTheme = createExtension(EditorView.theme([]);
const reconfigureLineNumbers = createExtension(lineNumbers());
// Multi-extension compartment
const configureExtensions = createExtension([
basicSetup(),
EditorView.theme([]),
lineNumbers()
])
Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]
Published by riccardoperra over 2 years ago
Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/v1.0.3...v1.1.0