-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix benchmarks that use value.change (#2569)
* benchmark for large with selection * inputer -> inputter * value.change -> editor for slate benchmarks * use editor in slate-react benchmarks * prettier * fix decorations benchmark
- Loading branch information
1 parent
f677f76
commit 8a0baac
Showing
19 changed files
with
160 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/** @jsx h */ | ||
/* eslint-disable react/jsx-key */ | ||
|
||
const React = require('react') | ||
const ReactDOM = require('react-dom/server') | ||
const h = require('../../helpers/h') | ||
const { Editor } = require('slate-react') | ||
|
||
module.exports.default = function(value) { | ||
const el = React.createElement(Editor, { value }) | ||
ReactDOM.renderToStaticMarkup(el) | ||
} | ||
|
||
module.exports.input = ( | ||
<value> | ||
<document> | ||
<paragraph> | ||
Breve whipped ristretto ut as to go café au lait. Extra, skinny | ||
trifecta, cup chicory medium cup dripper whipped coffee cultivar. Body | ||
crema iced whipped, grounds turkish coffee steamed crema affogato.{' '} | ||
<b>Skinny that wings aged cream,</b> grounds siphon coffee french press | ||
mazagran irish roast. | ||
</paragraph> | ||
<block type="level-one"> | ||
<block type="level-two"> | ||
<block type="coffee-container"> | ||
<inline type="coffee"> | ||
Extra, brewed caffeine fair trade, whipped cup bar flavour grounds | ||
organic. Café au lait blue mountain cortado saucer, macchiato ut | ||
that caramelization flavour. | ||
</inline> | ||
<inline type="coffee"> | ||
Crema frappuccino so decaffeinated, sit café au lait irish | ||
cultivar doppio café au lait. Dripper irish fair trade <anchor />kopi-luwak | ||
ut beans skinny saucer. | ||
</inline> | ||
</block> | ||
<block type="coffee-container"> | ||
<inline type="coffee"> | ||
Half and half, irish rich sugar medium frappuccino spoon. Whipped, | ||
caramelization, caffeine french press cinnamon variety rich redeye | ||
acerbic americano aftertaste. Shop crema filter seasonal, filter | ||
aromatic, french press mazagran affogato cappuccino single origin. | ||
</inline> | ||
Plunger pot aromatic, crema, cultivar french press, skinny and | ||
percolator so single origin. Id variety and cinnamon brewed flavour | ||
cultivar acerbic half and half et<focus /> cappuccino. | ||
<inline type="coffee"> | ||
Cup qui a barista crema white kopi-luwak chicory trifecta. | ||
</inline> | ||
</block> | ||
</block> | ||
</block> | ||
{Array.from(Array(10)).map(() => ( | ||
<quote> | ||
<paragraph> | ||
<paragraph> | ||
This is editable <b>rich</b> text, <i>much</i> better than a | ||
textarea! | ||
</paragraph> | ||
</paragraph> | ||
</quote> | ||
))} | ||
</document> | ||
</value> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.