New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tiptap/extension-code-block

Package Overview
Dependencies
Maintainers
2
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-code-block - npm Package Compare versions

Comparing version 1.0.0-alpha.2 to 2.0.0-alpha.1

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [2.0.0-alpha.1](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-code-block@1.0.0-alpha.2...@tiptap/extension-code-block@2.0.0-alpha.1) (2020-11-18)
**Note:** Version bump only for package @tiptap/extension-code-block
# [1.0.0-alpha.2](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-code-block@1.0.0-alpha.1...@tiptap/extension-code-block@1.0.0-alpha.2) (2020-11-16)

@@ -8,0 +16,0 @@

10

dist/packages/extension-code-block/src/index.d.ts

@@ -12,5 +12,13 @@ import { Command, Node } from '@tiptap/core';

/**
* Set a code block
*/
setCodeBlock: (attributes?: {
language: string;
} | undefined) => Command;
/**
* Toggle a code block
*/
codeBlock: (attrs?: CodeBlockOptions | undefined) => Command;
toggleCodeBlock: (attributes?: {
language: string;
} | undefined) => Command;
}>;

@@ -17,0 +25,0 @@ export default CodeBlock;

12

dist/tiptap-extension-code-block.cjs.js

@@ -61,6 +61,12 @@ 'use strict';

/**
* Set a code block
*/
setCodeBlock: (attributes) => ({ commands }) => {
return commands.setBlockType('codeBlock', attributes);
},
/**
* Toggle a code block
*/
codeBlock: (attrs) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attrs);
toggleCodeBlock: (attributes) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attributes);
},

@@ -71,3 +77,3 @@ };

return {
'Mod-Shift-c': () => this.editor.commands.codeBlock(),
'Mod-Shift-c': () => this.editor.commands.toggleCodeBlock(),
};

@@ -74,0 +80,0 @@ },

@@ -57,6 +57,12 @@ import { Node } from '@tiptap/core';

/**
* Set a code block
*/
setCodeBlock: (attributes) => ({ commands }) => {
return commands.setBlockType('codeBlock', attributes);
},
/**
* Toggle a code block
*/
codeBlock: (attrs) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attrs);
toggleCodeBlock: (attributes) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attributes);
},

@@ -67,3 +73,3 @@ };

return {
'Mod-Shift-c': () => this.editor.commands.codeBlock(),
'Mod-Shift-c': () => this.editor.commands.toggleCodeBlock(),
};

@@ -70,0 +76,0 @@ },

@@ -60,6 +60,12 @@ (function (global, factory) {

/**
* Set a code block
*/
setCodeBlock: (attributes) => ({ commands }) => {
return commands.setBlockType('codeBlock', attributes);
},
/**
* Toggle a code block
*/
codeBlock: (attrs) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attrs);
toggleCodeBlock: (attributes) => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attributes);
},

@@ -70,3 +76,3 @@ };

return {
'Mod-Shift-c': () => this.editor.commands.codeBlock(),
'Mod-Shift-c': () => this.editor.commands.toggleCodeBlock(),
};

@@ -73,0 +79,0 @@ },

{
"name": "@tiptap/extension-code-block",
"version": "1.0.0-alpha.2",
"version": "2.0.0-alpha.1",
"homepage": "https://tiptap.dev",

@@ -24,3 +24,3 @@ "keywords": [

"peerDependencies": {
"@tiptap/core": "2.0.0-alpha.3"
"@tiptap/core": "^2.0.0-alpha.0"
},

@@ -30,3 +30,3 @@ "dependencies": {

},
"gitHead": "a8a578edb78db7763e2eda83960c25b02e8488c5"
"gitHead": "276118e48eef313fb435088dee3dc58b91363109"
}

@@ -8,3 +8,3 @@ # @tiptap/extension-bode-block

## Introduction
tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich-text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*.
tiptap is a headless wrapper around [ProseMirror](https://ProseMirror.net) – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as *New York Times*, *The Guardian* or *Atlassian*.

@@ -11,0 +11,0 @@ ## Offical Documentation

@@ -78,6 +78,12 @@ import { Command, Node } from '@tiptap/core'

/**
* Set a code block
*/
setCodeBlock: (attributes?: { language: string }): Command => ({ commands }) => {
return commands.setBlockType('codeBlock', attributes)
},
/**
* Toggle a code block
*/
codeBlock: (attrs?: CodeBlockOptions): Command => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attrs)
toggleCodeBlock: (attributes?: { language: string }): Command => ({ commands }) => {
return commands.toggleBlockType('codeBlock', 'paragraph', attributes)
},

@@ -89,3 +95,3 @@ }

return {
'Mod-Shift-c': () => this.editor.commands.codeBlock(),
'Mod-Shift-c': () => this.editor.commands.toggleCodeBlock(),
}

@@ -92,0 +98,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc