From 9727a8deb53b45ddfabf88a0178be5b9965cf920 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Fri, 17 Jun 2016 20:02:51 -0700 Subject: [PATCH] add default example css --- examples/basic/index.css | 10 ++++++++++ examples/basic/index.html | 1 + examples/plaintext/index.css | 10 ++++++++++ examples/plaintext/index.html | 3 ++- lib/components/content.js | 4 +++- 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 examples/basic/index.css create mode 100644 examples/plaintext/index.css diff --git a/examples/basic/index.css b/examples/basic/index.css new file mode 100644 index 000000000..a494c5edc --- /dev/null +++ b/examples/basic/index.css @@ -0,0 +1,10 @@ + +html { + background: #eee; + padding: 20px; +} + +main { + background: #fff; + padding: 10px; +} diff --git a/examples/basic/index.html b/examples/basic/index.html index 500325820..d0026b102 100644 --- a/examples/basic/index.html +++ b/examples/basic/index.html @@ -2,6 +2,7 @@ Editor | Basic Example +
diff --git a/examples/plaintext/index.css b/examples/plaintext/index.css new file mode 100644 index 000000000..a494c5edc --- /dev/null +++ b/examples/plaintext/index.css @@ -0,0 +1,10 @@ + +html { + background: #eee; + padding: 20px; +} + +main { + background: #fff; + padding: 10px; +} diff --git a/examples/plaintext/index.html b/examples/plaintext/index.html index 500325820..869565479 100644 --- a/examples/plaintext/index.html +++ b/examples/plaintext/index.html @@ -1,7 +1,8 @@ - Editor | Basic Example + Editor | Plaintext Example +
diff --git a/lib/components/content.js b/lib/components/content.js index 46447a392..bf372a4db 100644 --- a/lib/components/content.js +++ b/lib/components/content.js @@ -121,7 +121,9 @@ class Content extends React.Component { .map(node => this.renderNode(node)) 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 (