Toolbar, Toolbox, UI (#239)

* Toolbox making

* Add Toolbox buttons click handler

* Toolbar, Toolbox, UI

* Updates

* update css prefix
This commit is contained in:
Peter Savchenko 2017-12-24 15:35:05 +03:00 committed by GitHub
commit c1afcf0205
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 2811 additions and 1276 deletions

View file

@ -9,11 +9,6 @@
font-size: 14px;
line-height: 1.5em;
}
#codex-editor {
margin: 0 auto;
max-width: 800px;
}
</style>
</head>
<body>
@ -22,8 +17,8 @@
</body>
<script src="plugins/paragraph/paragraph.js?v=100"></script>
<link rel="stylesheet" href="plugins/paragraph/paragraph.css">
<script src="plugins/text/text.js?v=100"></script>
<link rel="stylesheet" href="plugins/text/text.css">
<!--<script src="plugins/header/header.js"></script>-->
<!--<link rel="stylesheet" href="plugins/header/header.css">-->
@ -65,9 +60,9 @@
codex.editor = 1;
var editor = new CodexEditor({
holderId : 'codex-editor',
initialBlock : 'paragraph',
initialBlock : 'text',
tools: {
paragraph: Paragraph,
text: Text,
},
toolsConfig: {
quote: {
@ -79,13 +74,13 @@
data: {
items: [
{
type : 'paragraph',
type : 'text',
data : {
text : 'Привет от CodeX'
}
},
{
type : 'paragraph',
type : 'text',
data : {
text : 'Пишите нам на team@ifmo.su'
}
@ -100,17 +95,17 @@
// });
// codex.editor.start({
// holderId : "codex-editor",
// initialBlockPlugin : 'paragraph',
// initialBlockPlugin : 'text',
// // placeholder: 'Прошлой ночью мне приснилось...',
// hideToolbar: false,
// tools : {
// paragraph: {
// type: 'paragraph',
// iconClassname: 'ce-icon-paragraph',
// render: paragraph.render,
// validate: paragraph.validate,
// save: paragraph.save,
// destroy: paragraph.destroy,
// text: {
// type: 'text',
// iconClassname: 'ce-icon-text',
// render: text.render,
// validate: text.validate,
// save: text.save,
// destroy: text.destroy,
// allowedToPaste: true,
// showInlineToolbar: true,
// allowRenderOnPaste: true
@ -272,7 +267,7 @@
// }
// },
// {
// type : 'paragraph',
// type : 'text',
// data : {
// text : 'Пишите нам на team@ifmo.su'
// }