mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 15:02:51 +02:00
add more selection tests
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfBlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfBlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
t<cursor />wo
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfBlock()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />two
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
t<cursor />wo
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />two
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToEndOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToStartOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
two<cursor />
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToStartOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
t<cursor />wo
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToStartOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />two
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToStartOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>one</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>
|
||||||
|
three<cursor />
|
||||||
|
</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
@@ -0,0 +1,31 @@
|
|||||||
|
/** @jsx h */
|
||||||
|
|
||||||
|
import h from '../../../helpers/h'
|
||||||
|
|
||||||
|
export default function(change) {
|
||||||
|
change.moveToStartOfDocument()
|
||||||
|
}
|
||||||
|
|
||||||
|
export const input = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
||||||
|
|
||||||
|
export const output = (
|
||||||
|
<value>
|
||||||
|
<document>
|
||||||
|
<paragraph>
|
||||||
|
<cursor />one
|
||||||
|
</paragraph>
|
||||||
|
<paragraph>two</paragraph>
|
||||||
|
<paragraph>three</paragraph>
|
||||||
|
</document>
|
||||||
|
</value>
|
||||||
|
)
|
Reference in New Issue
Block a user