npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ckeditor5-full-screen

v0.0.2

Published

Adds a full screen support similar to the maximize plugin in ckeditor 4.

Downloads

229

Readme

CKEditor 5 full screen plugin

Icon thanks to css.gg.

Description

This plugin provides a full screen mode for ckeditor 5. The plugin adds a button to the editor toolbar which can be used to toggle between the normal ckeditor and the full screen mode. To exit the full screen mode, it is also possible to press escape or click anywhere in the background (See configuration).

Installation

Via npm:

npm i ckeditor5-full-screen

Add the plugin to ckeditor:

If using a predefined build:

import FullScreen from "ckeditor5-full-screen/src/fullscreen";

Editor.builtinPlugins = [
  // ...
  FullScreen,
];

Editor.defaultConfig = {
  toolbar: {
    items: [
      // ...
      "fullscreen", // Add the toolbar button
    ],
  },
};

If building from source:

import FullScreen from "ckeditor5-full-screen/src/fullscreen";

Editor.create(element, {
  plugins: [FullScreen],
  toolbar: ["fullscreen"],
})
  .then((editor) => {
    // ...
  })
  .catch((error) => {
    // ...
  });

More information about installing plugins can be found in the official documentation.

Configuration

| Name | Default value | Description | | -------------------------- | ------------- | -------------------------------------------------------------------------------------- | | fullscreen.closeOnEscape | true | If set to true, exits the full screen mode when escape is pressed. | | fullscreen.closeOnClick | true | If set to true, exits the full screen mode when clicking anywhere in the background. |

Example

Editor.defaultConfig = {
  // ...
  fullscreen: {
    closeOnEscape: true,
    closeOnClick: false,
  },
};
Editor.create(element, {
  // ...
  fullscreen: {
    closeOnEscape: true,
    closeOnClick: false,
  },
});

Development

Ignore this if you just want to use this package.

If you want to run ckeditor locally using e.g. https://github.com/indico/ckeditor, you can install this package directly:

npm install $(npm pack /path/to/the/package | tail -1)

Just using npm install /path/to/the/package doesn't work because npm symlinks the package instead of copying it. This will cause duplicated packages when bundling the editor with webpack (this error). The fix is to create a zipped package with npm pack first and installing that one instead.

Useful SO links:

  • https://stackoverflow.com/a/53215430
  • https://stackoverflow.com/a/45016447