Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from upstream #2

Open
wants to merge 20 commits into
base: pr
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.tern-port
/dist
/notes.txt
webpack.config.js
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
## 1.4.0 (2024-01-30)

### New features

Input rules now take an `inCode` option that controls whether they should apply inside nodes marked as code.

## 1.3.0 (2023-11-16)

### New features

Input rules can now be set to be non-undoable, preventing `undoInputRule` from rolling them back.

## 1.2.1 (2023-05-17)

### Bug fixes

Include CommonJS type declarations in the package to please new TypeScript resolution settings.

## 1.2.0 (2022-05-30)

### New features

Include TypeScript type declarations.

## 1.1.3 (2020-09-16)

### Bug fixes

Fix crash when undoing input rules when the rule was triggered without inserting text.

## 1.1.2 (2019-11-20)

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2015-2017 by Marijn Haverbeke <[email protected]> and others
Copyright (C) 2015-2017 by Marijn Haverbeke <[email protected]> and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# prosemirror-inputrules

[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-inputrules/blob/master/CHANGELOG.md) ]
[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-inputrules/blob/master/CHANGELOG.md) ]

This is a [core module](https://prosemirror.net/docs/ref/#inputrules) of [ProseMirror](https://prosemirror.net).
ProseMirror is a well-behaved rich semantic content editor based on
Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
"name": "prosemirror-inputrules",
"version": "1.1.2",
"version": "1.4.0",
"description": "Automatic transforms on text input for ProseMirror",
"main": "dist/index.js",
"module": "dist/index.es.js",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"sideEffects": false,
"license": "MIT",
"maintainers": [
{
"name": "Marijn Haverbeke",
"email": "[email protected]",
"email": "[email protected]",
"web": "http://marijnhaverbeke.nl"
}
],
Expand All @@ -21,13 +28,9 @@
"prosemirror-transform": "^1.0.0"
},
"devDependencies": {
"rollup": "^2.26.3",
"@rollup/plugin-buble": "^0.21.3"
"@prosemirror/buildhelper": "^0.1.5"
},
"scripts": {
"test": "true",
"build": "rollup -c",
"watch": "rollup -c -w",
"prepare": "npm run build"
"prepare": "pm-buildhelper src/index.ts"
}
}
14 changes: 0 additions & 14 deletions rollup.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ This module defines a plugin for attaching _input rules_ to an editor,
which can react to or transform text typed by the user. It also comes
with a bunch of default rules that can be enabled in this plugin.

@cn 本模块定义了一个编辑器插件用来附加 _input rules(输入规则)_,它可以响应或者转换用户输入的文字。
本模块还带有一些默认的规则,可以通过本插件启用。

@InputRule
@inputRules
@undoInputRule

The module comes with a number of predefined rules:

@cn 本模块还带有一些预定义的规则:

@emDash
@ellipsis
@openDoubleQuote
Expand All @@ -19,5 +24,7 @@ The module comes with a number of predefined rules:
These utility functions take schema-specific parameters and create
input rules specific to that schema.

@cn 下列这些工具函数接受一个特定于 schema 的参数,并创建一个特定于 schema 的输入规则。

@wrappingInputRule
@textblockTypeInputRule
File renamed without changes.
117 changes: 0 additions & 117 deletions src/inputrules.js

This file was deleted.

Loading