5 Star 36 Fork 12

Gitee 极速下载 / ProseMirror

标签名
描述
提交信息
操作

Version 0.10.1

Bug fixes

Fixes a problem where the DOM parser would produce corrupted documents
in some corner cases.

Makes the editor useable on IE again by not assuming document has a
contains method.

2016-09-12 18:03

Version 0.10.0

Bug fixes

Fixed several issues in the handling of clicks on and near leaf nodes.

Fix bug where
liftTarget would
produce false positives.

Improve support for using ProseMirror in a shadow DOM.

New features

The
ProseMirror.on.domPaste
event can now be used to entirely override the handling of paste
events.

The new
ProseMirror.root
property returns the document or shadow DOM root that the editor is
part of.

New method
PosMap.forEach to
easily iterate over the changed ranges in a position map.

Marked ranges
now support an elementBefore option to insert a DOM node before the
range.

2016-08-26 18:33

Release 0.9.1

Bug fixes

Fix DOM node leak in the creation of menu SVG icons.

Fix regression where clickOn and doubleClickOn handlers weren't
called on clicked leaf nodes.

Fix crash in DOM parser when parsing a DOM change.

2016-07-29 22:57

Release 0.9.0

Bug fixes

Pasting a single leaf node (a node that doesn't allow content) works
again.

Parsing Markdown text with code blocks (indented or fenced) works again.

Fixes a bug where clicking a selectable leaf node would create a
selection before that node.

Fix the way requestAnimationFrame is called to please Internet
Explorer.

New features

Mouse-related event handlers (click, clickOn, doubleClick,
doubleClickOn, contextMenu) are now passed the original DOM event.

Adds a new module schema-tables, that exports node types and
commands for tables, along with a way to easily add them to your
schema.

2016-07-26 20:05

Version 0.8.3

Bug fixes

When pasting text, assign some basic structure to it by inserting
<p> and <br> tags.

Fix a bug in EditorTranform.selection.

Disable the setBlockType command for non-textblock blocks.

Make splitBlock handle content restrictions better.

2016-06-28 17:52

Release 0.8.2

Bug fixes

Fix OrderedMap.append and OrderedMap.prepend to allow raw-object
arguments.

Fix bug where Node.textContent didn't actually return a value.

Make the wrapInList command more robust in the face of schema
constraints.

2016-06-21 15:52

Release 0.8.1

Bug fixes

Fixes addActiveMark and removeActiveMark ignoring marks from the
document, and thus accidentally resetting the set of marks when used.

Properly export the parser, serializer, and state classes from the
markdown module.

2016-06-16 18:33

Version 0.8.0

Breaking changes

The src/ directory no longer uses ES6 modules, and is now
CommonJS-based instead. With ES6 support—except for modules—being
pretty much complete in browsers and node, that was the only thing
holding us back from running the code directly, without compilation.

There is no longer a default schema in the model module. The new
schema-basic module exports the schema, node
types, and mark types that used to make up the default schema.

The schema option is no longer optional (though
it is implied if you pass a doc option).

The Command abstraction was entirely removed. When the docs talk
about commands now, they refer to plain functions that take an
editor instance as argument and return a boolean indicating whether
they could perform their action.

Keymaps now map keys to such command functions. The basic keymap for
an editor is no longer inferred from commands, but is now determined
by the keymap option. The
default value contains a minimal set of bindings not
related to any schema elements.

Defining new options is no longer a thing. Modules that used to use
defineOption now export plugins.

Changing options at run-time through setOption is no longer
supported, since the remaining built-in options don't require this.

The docFormat option, getContent/setContent editor methods, and
the format module have been dropped. You need to explicitly convert
between formats yourself now.

The DOM parsing and serializing from the format module was moved
into the model module, as the toDOM and
parseDOM methods.

The conversions to and from text and HTML were dropped. HTML can be
done by going through the DOM representation, the text format
conversions were never very well defined to begin with.

Declaring the way a node or mark type is parsed or serialized was
simplified. See the new toDOM,
matchDOMTag and
matchDOMStyle properties.

The SchemaItem class, along with the register and updateAttrs
static methods on that class, have been removed. NodeType and
MarkType no longer share a superclass, and registering values on
such types is no longer a thing.

Textblock is no longer a class that you derive node type classes
from. Just use Block, and the isTextblock getter will return the
right value based on the node type's content.

Event handlers are no longer registered with node-style on methods,
but attached to specific values representing an event source. The
subscription module
is used for this. The event emitters for an editor instance are
grouped in its on property. So now you'd say
pm.on.change.add(...) to register a change handler.

The event-like node type methods handleClick, handleDoubleClick,
and handleContextMenu are no longer supported. Instead, you're
expected to use the click,
clickOn,
doubleClick,
doubleClickOn, and
contextMenu event emitters.

The removed event on marked ranges was replaced by
an onRemove option.

The apply method on an editor now always
returns the transform, whereas it used to return false if no change
was made. Its scroll property (containing a commonly used options
object) was removed.

The checkPos method on editor objects was removed.

The rank argument to addKeymap was
renamed priority and its meaning was inverted.

The setMark method on editor instances was removed. Its role is
mostly taken over by the toggleMark
command.

The functionality from the ui/update module was moved into the
edit module and is now available through the
scheduleDOMUpdate,
unscheduleDOMUpdate, and
updateScheduler methods.

Selection objects now contain resolved
positions, because that's what you need 99% of the time when you
access them. Their old properties are still there, in addition to
$from, $to, $anchor, and $head properties. The constructors of
the selection classes expect resolved positions now.

The findDiffStart and findDiffEnd functions were moved to
methods on Fragment.

Some transformation methods are now less vague in their
parameters. wrap requires the range to wrap and
the entire set of wrappers as argument, lift
expects a range and target depth.

The findWrapping and liftTarget
functions are used to compute these before trying to apply the
transformation. They replace canWrap and canLift.

The structure of the markdown parser and serializer was
changed to no longer rely on SchemaItem.register. Adjusting the
parser and serializer now works differently (you explicitly create an
object rather than relying on information attached to node types).

The autoinput module was removed. The inputrules
module now exports a plugin that can be used to add input rules, along
with a number of basic input rules and helper functions to create
schema-specific input rules.

The menu module is now a single module, which exports the
menu primitives along with the menuBar and
tooltipMenu plugins.

Menu construction is no longer entangled with command definitions. The
MenuCommand class was replaced with a MenuItem
class, which directly declares the things it would previously get from
a command. The concept of a MenuGroup was dropped (we just use
arrays, since they are always static). Some helper functions for
creating menu items, along with some basic icons, are exported from
the menu module.

The ui module is now a single module, which exports the
Tooltip class and the prompt-related
functionality. Now that command parameters no longer exist, the
interface for creating a prompt was also changed.

The events emitted by the collab module (which now
exports a plugin) are now
subscriptions on the
plugin state object, named mustSend and
receivedTransform.

Step.register was renamed to Step.jsonID.

All non-essential CSS rules were removed from the core.

Bug fixes

Several issues where the code didn't properly enforce the content
constraints introduced in 0.7.0 were fixed.

When pasting content into an empty textblock, the parent node it was
originally copied from is now restored, when possible.

Several improvements in the handling of composition and input events
(mostly used on mobile platforms). Fixes problem where you'd get a
strange selection after a complex composition event.

Make by-word deletion work properly on astral plane characters.

Fix leaked spacer node when the menu bar was disabled while it was
floating.

New features

Plugins are objects used to attach (and detach) a specific
piece of functionality to an editor. Modules that extend the editor
now export values of this type. The plugins
option is the easiest way to enable plugins.

The contextAtCoords method provides
more precise information about a given position (including the exact
nodes around the position) than the existing posAtCoords method.

The EditorTransform abstraction is now more
closely integrated with the editor selection, and you can call
setSelection on it to update the
selection during a transform.

The new applyAndScroll method on
editor transforms provides a convenient shortcut for the common case
of applying a transformation and scrolling the selection into view.

The new methods addActiveMark and
removeActiveMark provide explicit
control over the active stored marks.

The edit module now exports an object commands containing a number
of command functions and functions that produce command functions.
Most of the old command objects have an equivalent here.

The forEach method on nodes and fragments now also
passes the node's index to its callback.

Nodes now have a textBetween method that
retrieves the text between two positions.

A new NodeRange abstraction (created with the
blockRange method on positions) is used
to specify the range that some of the transformation methods act on.

Node types got two new variants of their create
method: createChecked, which raises an
error if the given content isn't valid (full) content for the node,
and createAndFill, which will
automatically insert required nodes to make the content valid.

The fixContent method on node types was removed.

You can now pass a second argument to the Schema
constructor, and access its value under the schema object's data
property, to store arbitrary user data in a schema.

The transform module now exports an insertPoint
function for finding the position at which a node can be inserted.

The OrderedMap class received a new method,
addBefore.

A new module, example-setup provides a plugin
that makes it easy to set up a simple editor with the
basic schema and the key bindings, menu items, and
input rules that used to be the default.

The list node types in the basic schema now require the
first child of a list item to be a regular paragraph. The list-related
commands are now aware of this.

2016-06-15 21:24

Version 0.7.0 (2016-05-19)

Breaking changes

The following properties on node types have lost their meaning:
kind, contains, canBeEmpty and containsMarks. The NodeKind
type is also gone.

The information they used to encode is now put in a
content expression,
which is part of the schema spec, not the node. Such
expressions can refer directly to other nodes in the schema (by name).

SchemaSpec is now an interface, not a class. Its
nodes field refers to NodeSpec
objects, rather than directly to NodeType constructors. These hold
not only a constructor but also a content expression and optionally a
group identifier.

The NodeType methods canContain,
canContainFragment, canContainMark, canContainContent, and
canContainType are gone, since they can't accurately express the
constraints of the new content expressions.

Instead, nodes now expose canReplace,
canReplaceWith, and
canAppend. The
contentMatchAt method gets you a
ContentMatch object which provides further ways to
reason about content.

NodeType.findConnection is now at
ContentMatch.findWrapping, and takes
and returns attributes as well as node types.

Mark types lost their rank property, as their ordering
is now determined by the order in which they appear in the schema
spec
.

Transform steps are now regular classes,
AddMarkStep, RemoveMarkStep,
ReplaceStep, and
ReplaceAroundStep.
Transform.step now only takes a step object, not
separate values. The "join", "split", and "ancestor" step types
have been superseded by ReplaceStep and ReplaceAroundStep.

The collaborative editing protocol was changed, to resolve a
synchronization
problem.
See the guide for an
overview of the new protocol.

New features

Node nesting is now expressed through a more powerful mechanism,
content expressions.

The ContentMatch class provides a way to apply and
reason about such content expressions.

The new OrderedMap class makes it possible to extend
and modify the sets of nodes and
marks in a schema while keeping control over
their order.

Since splitting isn't always possible any more, a new function
canSplit is exported by the
transform module.

The new options scrollTreshold and
scrollMargin provide more control over scrolling
behavior.

nodesBetween now passes the node's index to
its callback as fourth argument.

Node types gained a getter isLeaf
to conveniently test whether they allow content.

Resolved positions got a new method
indexAfter, and their methods that
expect a depth allow the argument to be omitted to specify the
position's own depth, or a negative integer to be passed to specify a
depth relative to the position's depth.

2016-05-20 04:33

Version 0.6.1

Composition (IME) input is now more robust. This mostly effects
Android browsers, where typing is now less buggy.

The iOS virtual keyboard's default case should now update as you type
(rather than being stuck in whatever state it was in when you started
typing).

Text input read through composition or input events now fires input
rules.

A problem where transform filters could corrupt the undo history has
been fixed.

2016-04-15 15:37
2016-04-13 17:45
2016-03-23 22:05
2016-03-22 18:58
2016-02-24 23:56
2016-02-04 23:49
2016-01-28 17:17
2016-01-11 20:55
JavaScript
1
https://gitee.com/mirrors/ProseMirror.git
git@gitee.com:mirrors/ProseMirror.git
mirrors
ProseMirror
ProseMirror

搜索帮助