Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@accordproject/markdown-editor
Advanced tools
[![downloads](https://img.shields.io/npm/dm/@accordproject/markdown-editor)](https://www.npmjs.com/package/@accordproject/markdown-editor) [![npm version](https://badge.fury.io/js/%40accordproject%2Fmarkdown-editor.svg)](https://badge.fury.io/js/%40accord
This repository contains a WYSIWYG editor for markdown that conforms to the CommonMark specification.
The editor is based on React, Slate, and the Accord Project markdown-transform
project.
npm install @accordproject/markdown-editor @accordproject/markdown-slate slate slate-history slate-react semantic-ui-react
import React, { useState, useCallback } from 'react';
import ReactDOM from 'react-dom';
import { SlateTransformer } from '@accordproject/markdown-slate';
import { MarkdownEditor } from '@accordproject/markdown-editor';
const slateTransformer = new SlateTransformer();
const defaultMarkdown = `This is text. You can edit it.`;
const App = () => {
const [slateValue, setSlateValue] = useState(() => {
const slate = slateTransformer.fromMarkdown(defaultMarkdown);
return slate.document.children;
});
const onSlateValueChange = useCallback((slateChildren) => {
localStorage.setItem('slate-editor-value', JSON.stringify(slateChildren));
const slateValue = { document: { children: slateChildren } };
setSlateValue(slateValue.document.children);
}, []);
return (<MarkdownEditor readOnly={false} value={slateValue} onChange={onSlateValueChange} />);
}
ReactDOM.render(<App />, document.getElementById('root'));
While Storybook is running, if you make a change in a package that you want to see reflected in the demo, in a new terminal:
cd packages/markdown-editor
npm run build
Storybook will reload with the applied changes.
Accord Project is an open source, non-profit, initiative working to transform contract management and contract automation by digitizing contracts. Accord Project operates under the umbrella of the Linux Foundation. The technical charter for the Accord Project can be found here.
The Accord Project technology is being developed as open source. All the software packages are being actively maintained on GitHub and we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code.
Find out what’s coming on our blog.
Join the Accord Project Technology Working Group Slack channel to get involved!
For code contributions, read our CONTRIBUTING guide and information for DEVELOPERS.
Using Accord Project? Add a README badge to let everyone know:
[![accord project](https://img.shields.io/badge/powered%20by-accord%20project-19C6C8.svg)](https://www.accordproject.org/)
Accord Project source code files are made available under the Apache License, Version 2.0. Accord Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).
Copyright 2018-2019 Clause, Inc. All trademarks are the property of their respective owners. See LF Projects Trademark Policy.
FAQs
[![downloads](https://img.shields.io/npm/dm/@accordproject/markdown-editor)](https://www.npmjs.com/package/@accordproject/markdown-editor) [![npm version](https://badge.fury.io/js/%40accordproject%2Fmarkdown-editor.svg)](https://badge.fury.io/js/%40accord
The npm package @accordproject/markdown-editor receives a total of 262 weekly downloads. As such, @accordproject/markdown-editor popularity was classified as not popular.
We found that @accordproject/markdown-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.