mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 23:25:47 +01:00
Toolbar, Toolbox, UI (#239)
* Toolbox making * Add Toolbox buttons click handler * Toolbar, Toolbox, UI * Updates * update css prefix
This commit is contained in:
parent
c84e4e6191
commit
c1afcf0205
32 changed files with 2811 additions and 1276 deletions
|
|
@ -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'
|
||||
// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue