🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more
Socket
Book a DemoInstallSign in
Socket

@squiz/formatted-text-editor

Package Overview
Dependencies
Maintainers
67
Versions
479
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/formatted-text-editor

This repo contains the necessary code to develop and publish an NPM package for creating formatted text editors for use in Squiz products.

latest
npmnpm
Version
2.6.7
Version published
Weekly downloads
146
-83.43%
Maintainers
67
Weekly downloads
 
Created
Source

DXP Formatted text editor component

This repo contains the necessary code to develop and publish an NPM package for creating formatted text editors for use in Squiz products.

The formatted text editor is using the Remirror React library.

Requirements

  • Volta
  • Node/NPM

Working locally

Provided you have Volta installed as soon as you are in the formatted-text-editor directory you should be on the correct Node version. See the package.json for the specific version.

Now run the following commands from the packages/formatted-text-editor/ directory.

npm i
npm run dev

This will expose http://localhost:5173/ and this can be viewed in the browser.

TIP: Make sure you have already installed the node modules at the root level of the repo.

WIP: Contributing

Testing

Tests must be written when contributing to this package. Tests are automatically run in CI and test failure will result in unmerged code.

Unit testing

This package using Jest to perform Unit testing. In addition to Jest we are using a few Testing Library utilities:

Tests should be co-located with componentry and should strive for maximum coverage.

To run tests locally you can run:

npm run test

Or if you'd like to "watch" for changes:

npm run test:watch

When testing text input in the text editor, it is recommended to use the <MockEditor /> component, which is a simple wrapper around the Remirror component that provides additional functionality for testing (supplying text into the editor).

Test coverage

Test coverage is enforced globally in this package. You can run the test coverage script from the package root:

npm run test:coverage

Coverage will also run as part of the normal test script. Please see ./jest.config.ts for the currently configured thresholds.

End to end testing

This package uses Cypress for end to end testing.

To run tests locally you can run:

npm run test:e2e

Cypress is configured to look at a preview dev environment on http://localhost:8080.

FAQs

Package last updated on 13 May 2025

Did you know?

Socket

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.

Install

Related posts