Socket
Socket
Sign inDemoInstall

@tiptap/extension-bold

Package Overview
Dependencies
Maintainers
2
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-bold - 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-bold@1.0.0-alpha.2...@tiptap/extension-bold@2.0.0-alpha.1) (2020-11-18)
**Note:** Version bump only for package @tiptap/extension-bold
# [1.0.0-alpha.2](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-bold@1.0.0-alpha.1...@tiptap/extension-bold@1.0.0-alpha.2) (2020-11-16)

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

10

dist/packages/extension-bold/src/index.d.ts

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

/**
* Set a bold mark
*/
setBold: () => Command;
/**
* Toggle a bold mark
*/
bold: () => Command;
toggleBold: () => Command;
/**
* Unset a bold mark
*/
unsetBold: () => Command;
}>;

@@ -18,0 +26,0 @@ export default Bold;

2

dist/tiptap-extension-bold.bundle.umd.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tiptap/core")):"function"==typeof define&&define.amd?define(["exports","@tiptap/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-bold"]={},e["@tiptap/core"])}(this,(function(e,t){"use strict";const s=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/gm,r=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/gm,o=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm,n=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm,a=t.Mark.create({name:"bold",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML:({HTMLAttributes:e})=>["strong",e,0],addCommands:()=>({bold:()=>({commands:e})=>e.toggleMark("bold")}),addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.bold()}},addInputRules(){return[t.markInputRule(s,this.type),t.markInputRule(o,this.type)]},addPasteRules(){return[t.markPasteRule(r,this.type),t.markPasteRule(n,this.type)]}});e.default=a,e.starInputRegex=s,e.starPasteRegex=r,e.underscoreInputRegex=o,e.underscorePasteRegex=n,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tiptap/core")):"function"==typeof define&&define.amd?define(["exports","@tiptap/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@tiptap/extension-bold"]={},e["@tiptap/core"])}(this,(function(e,t){"use strict";const s=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/gm,o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/gm,r=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/gm,n=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/gm,d=t.Mark.create({name:"bold",defaultOptions:{HTMLAttributes:{}},parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML:({HTMLAttributes:e})=>["strong",e,0],addCommands:()=>({setBold:()=>({commands:e})=>e.setMark("bold"),toggleBold:()=>({commands:e})=>e.toggleMark("bold"),unsetBold:()=>({commands:e})=>e.unsetMark("bold")}),addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold()}},addInputRules(){return[t.markInputRule(s,this.type),t.markInputRule(r,this.type)]},addPasteRules(){return[t.markPasteRule(o,this.type),t.markPasteRule(n,this.type)]}});e.default=d,e.starInputRegex=s,e.starPasteRegex=o,e.underscoreInputRegex=r,e.underscorePasteRegex=n,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=tiptap-extension-bold.bundle.umd.min.js.map

@@ -37,7 +37,19 @@ 'use strict';

/**
* Set a bold mark
*/
setBold: () => ({ commands }) => {
return commands.setMark('bold');
},
/**
* Toggle a bold mark
*/
bold: () => ({ commands }) => {
toggleBold: () => ({ commands }) => {
return commands.toggleMark('bold');
},
/**
* Unset a bold mark
*/
unsetBold: () => ({ commands }) => {
return commands.unsetMark('bold');
},
};

@@ -47,3 +59,3 @@ },

return {
'Mod-b': () => this.editor.commands.bold(),
'Mod-b': () => this.editor.commands.toggleBold(),
};

@@ -50,0 +62,0 @@ },

@@ -33,7 +33,19 @@ import { Mark, markInputRule, markPasteRule } from '@tiptap/core';

/**
* Set a bold mark
*/
setBold: () => ({ commands }) => {
return commands.setMark('bold');
},
/**
* Toggle a bold mark
*/
bold: () => ({ commands }) => {
toggleBold: () => ({ commands }) => {
return commands.toggleMark('bold');
},
/**
* Unset a bold mark
*/
unsetBold: () => ({ commands }) => {
return commands.unsetMark('bold');
},
};

@@ -43,3 +55,3 @@ },

return {
'Mod-b': () => this.editor.commands.bold(),
'Mod-b': () => this.editor.commands.toggleBold(),
};

@@ -46,0 +58,0 @@ },

@@ -37,7 +37,19 @@ (function (global, factory) {

/**
* Set a bold mark
*/
setBold: () => ({ commands }) => {
return commands.setMark('bold');
},
/**
* Toggle a bold mark
*/
bold: () => ({ commands }) => {
toggleBold: () => ({ commands }) => {
return commands.toggleMark('bold');
},
/**
* Unset a bold mark
*/
unsetBold: () => ({ commands }) => {
return commands.unsetMark('bold');
},
};

@@ -47,3 +59,3 @@ },

return {
'Mod-b': () => this.editor.commands.bold(),
'Mod-b': () => this.editor.commands.toggleBold(),
};

@@ -50,0 +62,0 @@ },

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

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

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

@@ -8,3 +8,3 @@ # @tiptap/extension-bold

## 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

import {
Command, Mark, markInputRule, markPasteRule,
Command,
Mark,
markInputRule,
markPasteRule,
} from '@tiptap/core'

@@ -46,7 +49,19 @@

/**
* Set a bold mark
*/
setBold: (): Command => ({ commands }) => {
return commands.setMark('bold')
},
/**
* Toggle a bold mark
*/
bold: (): Command => ({ commands }) => {
toggleBold: (): Command => ({ commands }) => {
return commands.toggleMark('bold')
},
/**
* Unset a bold mark
*/
unsetBold: (): Command => ({ commands }) => {
return commands.unsetMark('bold')
},
}

@@ -57,3 +72,3 @@ },

return {
'Mod-b': () => this.editor.commands.bold(),
'Mod-b': () => this.editor.commands.toggleBold(),
}

@@ -60,0 +75,0 @@ },

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