mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 10:44:02 +02:00
add default example css
This commit is contained in:
10
examples/basic/index.css
Normal file
10
examples/basic/index.css
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
html {
|
||||||
|
background: #eee;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
@@ -2,6 +2,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Editor | Basic Example</title>
|
<title>Editor | Basic Example</title>
|
||||||
|
<link rel="stylesheet" href="index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main></main>
|
<main></main>
|
||||||
|
10
examples/plaintext/index.css
Normal file
10
examples/plaintext/index.css
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
html {
|
||||||
|
background: #eee;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
@@ -1,7 +1,8 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Editor | Basic Example</title>
|
<title>Editor | Plaintext Example</title>
|
||||||
|
<link rel="stylesheet" href="index.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main></main>
|
<main></main>
|
||||||
|
@@ -121,7 +121,9 @@ class Content extends React.Component {
|
|||||||
.map(node => this.renderNode(node))
|
.map(node => this.renderNode(node))
|
||||||
|
|
||||||
const style = {
|
const style = {
|
||||||
whiteSpace: 'pre-wrap' // preserve adjacent whitespace and new lines
|
outline: 'none', // prevent the default outline styles
|
||||||
|
whiteSpace: 'pre-wrap', // preserve adjacent whitespace and new lines
|
||||||
|
wordWrap: 'break-word' // allow words to break if they are too long
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user