From b506098a294cf237434bf989b61df43808a1c3b2 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Tue, 26 Jul 2016 12:15:21 -0700 Subject: [PATCH] add plugins example, fix soft break handling --- examples/index.js | 5 ++- examples/plugins/Readme.md | 8 ++++ examples/plugins/index.js | 77 ++++++++++++++++++++++++++++++++++++++ lib/components/content.js | 8 +++- lib/components/leaf.js | 38 ++++++++++++------- package.json | 3 ++ 6 files changed, 124 insertions(+), 15 deletions(-) create mode 100644 examples/plugins/Readme.md create mode 100644 examples/plugins/index.js diff --git a/examples/index.js b/examples/index.js index b8144bb57..62e40be77 100644 --- a/examples/index.js +++ b/examples/index.js @@ -14,6 +14,7 @@ import Images from './images' import Links from './links' import PasteHtml from './paste-html' import PlainText from './plain-text' +import Plugins from './plugins' import ReadOnly from './read-only' import RichText from './rich-text' import Tables from './tables' @@ -69,7 +70,8 @@ class App extends React.Component { {this.renderTab('Tables', 'tables')} {this.renderTab('Code Highlighting', 'code-highlighting')} {this.renderTab('Paste HTML', 'paste-html')} - {this.renderTab('Read Only', 'read-only')} + {this.renderTab('Read-only', 'read-only')} + {this.renderTab('Plugins', 'plugins')} ) } @@ -120,6 +122,7 @@ const router = ( + diff --git a/examples/plugins/Readme.md b/examples/plugins/Readme.md new file mode 100644 index 000000000..20aee1528 --- /dev/null +++ b/examples/plugins/Readme.md @@ -0,0 +1,8 @@ + +# Plain Text Example + +![](../../docs/images/plain-text-example.png) + +This is the most basic Slate example. It's basically a glorified `