Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
govspeak-visual-editor
Advanced tools
This repo demonstrates how [ProseMirror] could be used to build a visual editor for [Govspeak].
This repo demonstrates how ProseMirror could be used to build a visual editor for Govspeak.
Govspeak is a flavour of Markdown used for publishing content on GOV.UK.
Clone this repo
Install dependencies
npm install
Run the development server
npm run dev
Open the example editor
Run tests
npm run test
npm run e2e-test
The editor implements a schema based on the prosemirror-schema-basic and prosemirror-schema-list modules, extended with some Govspeak-specific nodes (such as callouts).
It also builds upon the prosemirror-example-setup package which provides a basic editor UI and some useful configuration defaults.
You'll find custom Govspeak-specific nodes defined in the src/nodes directory.
Each 'node' file in that directory defines a few things:
buildMenu
function which can add custom buttons to the toolbar menu provided by the prosemirror-example-setup module.You should keep track of relevant unreleased changed by adding to the "Unreleased" section of the CHANGELOG.md
.
Checkout main and pull latest changes.
Create and checkout a new branch (release-[version-number]
).
The version number is determined by looking at the current "Unreleased" changes in CHANGELOG and updating the previous release number depending on the kind of entries:
Breaking changes
corresponds to a major
(1.X.X) change.New features
corresponds to a minor
(X.1.X) change.Fixes
corresponds to a patch
(X.X.1) change.For example if the previous version is 2.3.0
and there are entries for Breaking changes
then the new release should be 3.0.0
.
See Semantic Versioning for more information.
Update CHANGELOG.md
"Unreleased" heading with the new version number and review the latest commits to make sure the latest changes are correctly reflected in the CHANGELOG).
Update package.json
version with the new version number.
Run npm install
to ensure you have the latest dependencies installed.
Commit changes. These should include updates in the following files:
Create a pull request and copy the changelog text for the current version in the pull request description.
Once the pull request is approved, merge into the main
branch. This action will trigger the CI to publish the new version to NPM. A dependabot pull request will automatically be raised in relevant applications.
The following events are emitted from the Visual Editor. Add event listeners to any parent wrapper to implement behaviour in response to these actions (e.g. for tracking purposes.)
visualEditorButtonClick
- emitted when a button is clicked in the toolbar. Details sent with the event can be accessed via:
event.detail.buttonText
which returns the title of the selected buttonvisualEditorSelectChange
- emitted when select values change on dropdowns in the toolbar. Details sent with the event can be accessed via:
event.detail.selectText
which returns the text of the selected option in the dropdownFAQs
This repo demonstrates how [ProseMirror] could be used to build a visual editor for [Govspeak].
The npm package govspeak-visual-editor receives a total of 32 weekly downloads. As such, govspeak-visual-editor popularity was classified as not popular.
We found that govspeak-visual-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.