mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-18 20:59:42 +02:00
Update Editor and Tools (#56)
This commit is contained in:
parent
717fd3fe38
commit
c7c7e61ccf
9 changed files with 108 additions and 138 deletions
30
package.json
30
package.json
|
@ -1,14 +1,16 @@
|
|||
{
|
||||
"name": "codex.docs",
|
||||
"version": "0.0.0",
|
||||
"bin": { "generatePassword": "bin/generatePassword.js"},
|
||||
"private": true,
|
||||
"bin": {
|
||||
"generatePassword": "bin/generatePassword.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "cross-env NODE_ENV=production nodemon ./bin/www",
|
||||
"start:dev": "cross-env NODE_ENV=development nodemon ./bin/www",
|
||||
"test": "cross-env NODE_ENV=testing mocha --recursive ./test",
|
||||
"lint": "eslint --fix --cache ./src/**/*.js",
|
||||
"build": "webpack ./src/frontend/js/app.js --o='./public/dist/[name].bundle.js' --output-library=Docs --output-public-path=/dist/ -p --watch",
|
||||
"build": "webpack ./src/frontend/js/app.js --o='./public/dist/[name].bundle.js' --output-library=Docs --output-public-path=/dist/ -p --mode=production",
|
||||
"build:dev": "webpack ./src/frontend/js/app.js --o='./public/dist/[name].bundle.js' --output-library=Docs --output-public-path=/dist/ -p --mode=development --watch",
|
||||
"precommit": "yarn lint && yarn test --exit",
|
||||
"generatePassword": "node ./generatePassword.js"
|
||||
},
|
||||
|
@ -16,14 +18,7 @@
|
|||
"@babel/polyfill": "^7.0.0",
|
||||
"bcrypt": "^3.0.3",
|
||||
"body-parser": "latest",
|
||||
"codex.editor": "^2.8.1",
|
||||
"codex.editor.delimiter": "^1.0.2",
|
||||
"codex.editor.embed": "^2.1.2",
|
||||
"codex.editor.header": "^2.0.5",
|
||||
"commander": "^2.19.0",
|
||||
"codex.editor.image": "^2.0.3",
|
||||
"codex.editor.quote": "^2.1.5",
|
||||
"codex.editor.raw": "^2.0.2",
|
||||
"cookie-parser": "~1.4.3",
|
||||
"csurf": "^1.9.0",
|
||||
"debug": "~4.1.0",
|
||||
|
@ -45,16 +40,23 @@
|
|||
"@babel/core": "^7.0.0",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@editorjs/code": "^2.4.0",
|
||||
"@editorjs/delimiter": "^1.1.0",
|
||||
"@editorjs/editorjs": "^2.11.7",
|
||||
"@editorjs/embed": "^2.2.0",
|
||||
"@editorjs/header": "^2.2.0",
|
||||
"@editorjs/image": "^2.1.0",
|
||||
"@editorjs/inline-code": "^1.3.0",
|
||||
"@editorjs/list": "^1.3.0",
|
||||
"@editorjs/marker": "^1.2.0",
|
||||
"@editorjs/quote": "^2.2.0",
|
||||
"@editorjs/raw": "^2.1.1",
|
||||
"autoprefixer": "^9.1.3",
|
||||
"babel": "^6.23.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-loader": "^8.0.2",
|
||||
"chai": "^4.1.2",
|
||||
"chai-http": "^4.0.0",
|
||||
"codex.editor.code": "^2.3.1",
|
||||
"codex.editor.inline-code": "^1.2.0",
|
||||
"codex.editor.list": "^1.2.3",
|
||||
"codex.editor.marker": "^1.0.1",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-loader": "^1.0.0",
|
||||
"cssnano": "^4.1.0",
|
||||
|
|
2
public/dist/code-styling.bundle.js
vendored
2
public/dist/code-styling.bundle.js
vendored
File diff suppressed because one or more lines are too long
61
public/dist/editor.bundle.js
vendored
61
public/dist/editor.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/main.bundle.js
vendored
2
public/dist/main.bundle.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,17 +1,17 @@
|
|||
import CodeXEditor from 'codex.editor';
|
||||
import EditorJS from '@editorjs/editorjs';
|
||||
|
||||
/**
|
||||
* Tools for the Editor
|
||||
*/
|
||||
import Header from 'codex.editor.header';
|
||||
import Quote from 'codex.editor.quote';
|
||||
import Marker from 'codex.editor.marker';
|
||||
import CodeTool from 'codex.editor.code';
|
||||
import Delimiter from 'codex.editor.delimiter';
|
||||
import InlineCode from 'codex.editor.inline-code';
|
||||
import List from 'codex.editor.list';
|
||||
import RawTool from 'codex.editor.raw';
|
||||
import Embed from 'codex.editor.embed';
|
||||
import Header from '@editorjs/header';
|
||||
import Quote from '@editorjs/quote';
|
||||
import Marker from '@editorjs/marker';
|
||||
import CodeTool from '@editorjs/code';
|
||||
import Delimiter from '@editorjs/delimiter';
|
||||
import InlineCode from '@editorjs/inline-code';
|
||||
import List from '@editorjs/list';
|
||||
import RawTool from '@editorjs/raw';
|
||||
import Embed from '@editorjs/embed';
|
||||
|
||||
/**
|
||||
* Class for working with Editor.js
|
||||
|
@ -84,7 +84,7 @@ export default class Editor {
|
|||
}
|
||||
};
|
||||
|
||||
this.editor = new CodeXEditor(Object.assign(defaultConfig, editorConfig));
|
||||
this.editor = new EditorJS(Object.assign(defaultConfig, editorConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@import url('../../../node_modules/normalize.css');
|
||||
@import url('vars.pcss');
|
||||
@import url('layout.pcss');
|
||||
@import url('components/header.pcss');
|
||||
@import url('components/aside.pcss');
|
||||
@import url('components/writing.pcss');
|
||||
@import url('components/page.pcss');
|
||||
@import url('components/landing.pcss');
|
||||
@import 'normalize.css';
|
||||
@import './vars.pcss';
|
||||
@import './layout.pcss';
|
||||
@import './components/header.pcss';
|
||||
@import './components/aside.pcss';
|
||||
@import './components/writing.pcss';
|
||||
@import './components/page.pcss';
|
||||
@import './components/landing.pcss';
|
||||
|
||||
body {
|
||||
font-family: system-ui, Helvetica, Arial, Verdana;
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<span class="writing-header__save" name="js-submit-save">Save</span>
|
||||
</header>
|
||||
<div class="writing-editor">
|
||||
<div id="codex-editor"></div>
|
||||
<div id="editorjs"></div>
|
||||
</div>
|
||||
<div class="writing-buttons">
|
||||
{% if page._id is not empty %}
|
||||
|
|
|
@ -70,7 +70,6 @@ module.exports = (env) => {
|
|||
})
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
splitChunks: false
|
||||
}
|
||||
};
|
||||
|
|
110
yarn.lock
110
yarn.lock
|
@ -603,6 +603,61 @@
|
|||
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
|
||||
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
|
||||
|
||||
"@editorjs/code@^2.4.0":
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/code/-/code-2.4.0.tgz#91919f30d50fcde221b6f5192590fade938e2df1"
|
||||
integrity sha512-S9MKHpQrDhXOK2CsU3dmbqfDHS7KlSLb5+gI2u9jYrDf5IcfMxSTsuV+ZM1tWaU9Jbd/Z/OOpt7iyNDZdOcNwA==
|
||||
|
||||
"@editorjs/delimiter@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/delimiter/-/delimiter-1.1.0.tgz#f61808ea92e4e289607d54441964f1cb8605410a"
|
||||
integrity sha512-0G36vEvvb94g6nu/qs2rVjC/qjxLnY20OfOgxROKSOOXzS7xnkTij5raeIxRiYueeLL5fMrzrvtFH7wclfxF+g==
|
||||
|
||||
"@editorjs/editorjs@^2.11.7":
|
||||
version "2.11.7"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/editorjs/-/editorjs-2.11.7.tgz#63c66ce74ef4f55e344f3ad703a7cfec476478b4"
|
||||
integrity sha512-f1kJc41n0MkEm+PadjRSyhQEHDauPA6S90OwlCW+bUwuLIvxwan1ttnE9G4lf6LT/Yd8PIanTlOTJqeEYiqDqA==
|
||||
|
||||
"@editorjs/embed@^2.2.0":
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/embed/-/embed-2.2.0.tgz#4a6121cd4c526ea1db20c9cc9629e6022861f18f"
|
||||
integrity sha512-jWjFL6VyiGlezSWQRvddMHpidGHy2blUS9lmtNxuIZRwob6Xizg8LweKSFEvjr9tPLqKyX3sIeSQlnCb1vntJQ==
|
||||
|
||||
"@editorjs/header@^2.2.0":
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/header/-/header-2.2.0.tgz#df19f1dd6a22a0a2264ed7ef3c0611d841420390"
|
||||
integrity sha512-y0JfNT7BwGiewzwklYiXEYgHkEAZVo/Y1noAg1ZF/Kd9vY6MoK/o9LjTzV3IfxZsObKBSvwzz3OxfXhGIv3tCQ==
|
||||
|
||||
"@editorjs/image@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/image/-/image-2.1.0.tgz#8f4e3ab280efcac82d8b5f7996ad73e8a2969588"
|
||||
integrity sha512-TLSLSeR8vYaWP3n9SYhExNT8bC8CUriv176OGy2gzgFqs5RYD4Q+yvm1JpqNUIMD32vSAsAyfo3ck1YTOG9MYA==
|
||||
|
||||
"@editorjs/inline-code@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/inline-code/-/inline-code-1.3.0.tgz#66b915d2c128ba520ba4b245067d40851d78355a"
|
||||
integrity sha512-pKvBYvPyaNZKiRd+jK8X2HDgAq8kDaOPXxUTB33He2L53OqbAJ8Cmt+8F4EQ3i0EyQYOrtT2uXnDQkjvVg41tg==
|
||||
|
||||
"@editorjs/list@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/list/-/list-1.3.0.tgz#8657012488e29bd86d072530f6bf8ad6d9686bb7"
|
||||
integrity sha512-jMfvny9BUy2MroFoiy5WyxRVKwLw3F0jAcLZ/Qgw055/TvP2I9LzIRJhIUEkKOPo8T/rx7Xf4/8lklUKvF6Yrg==
|
||||
|
||||
"@editorjs/marker@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/marker/-/marker-1.2.0.tgz#4e3130870c2ca4b3ac5b05405b4e49add55893cb"
|
||||
integrity sha512-BkAvAvf2B0xsUbMPoht7g1oWaxw79NeqJM//+wM3VnEruj908qw7AluDBVy1gwOe2fhhryaDXQ3kbqU6HC8o1g==
|
||||
|
||||
"@editorjs/quote@^2.2.0":
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/quote/-/quote-2.2.0.tgz#a62250c7b6ef19772021530f12b56f0ed13377e8"
|
||||
integrity sha512-Ej0z8ylsdfu106n+d6tDZG5A6SXTBDgtKlmtACsvtUa645oiDatwNwe5K6u7nFm6SJiTJmBxA9qKRQPH3YBT6g==
|
||||
|
||||
"@editorjs/raw@^2.1.1":
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@editorjs/raw/-/raw-2.1.1.tgz#00cea181d8ce1a2a082352c6644090660c8237c7"
|
||||
integrity sha512-So+Y6fLIO7+JGRa/tOsHho58hASYt1m7lDM/+0fehs+LMdYlloLmj68X2q7Wxk60R8aCrUscXt/fOggcg7giPQ==
|
||||
|
||||
"@sinonjs/commons@^1.0.2", "@sinonjs/commons@^1.2.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.3.0.tgz#50a2754016b6f30a994ceda6d9a0a8c36adda849"
|
||||
|
@ -1612,61 +1667,6 @@ code-point-at@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
|
||||
|
||||
codex.editor.code@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.code/-/codex.editor.code-2.3.1.tgz#9e304316b37d2464177b162d1b28650b104f3a01"
|
||||
integrity sha512-k2s38/6ZGHhGL6oASR16Y59ceOiN9KFvxpUXoA5do5CriwsmPcsR7MaBROOc5xL7qys7E81agKN71HpZnznIqg==
|
||||
|
||||
codex.editor.delimiter@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.delimiter/-/codex.editor.delimiter-1.0.2.tgz#05462b1e613026ccf3f10ce45e5f12485bbb142b"
|
||||
integrity sha512-+fFgO3EtkCqxajNKBw6dG4h7o+2g23PGnRzBpqFyRFO6bZXH/a2FsB/6ahOMp7uHuRoAGIsU5M6TMd6aDWZZig==
|
||||
|
||||
codex.editor.embed@^2.1.2:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.embed/-/codex.editor.embed-2.1.2.tgz#77ea6b90a539ff4a7877e6fe73b9dcac97da25a7"
|
||||
integrity sha512-6uUFfMdeGrgoUPd5s71eo1C8zlvYq7ruwTNL69aBGW2ZWFkToVrICQ+O07Osd+vFSOIdoLfTAy55kcQtdjxVgg==
|
||||
|
||||
codex.editor.header@^2.0.5:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.header/-/codex.editor.header-2.1.2.tgz#cfa34cc603905fc18a0df5c508f41cf3dcf74fd8"
|
||||
integrity sha512-lLXVXnSlpLGn2ktIerLoxN/6aY/F2UCbGgj9owEW8m+jzZZ9IaqawvEmY9jw+zcZEMonOqcRU5Z8DyLBqNkoXQ==
|
||||
|
||||
codex.editor.image@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.image/-/codex.editor.image-2.0.3.tgz#afb8d43fae7cab84a56f66c1a73e1b28722327da"
|
||||
integrity sha512-HifVir+o+gQ5ikSG4Ho84dTmGm/rFURJwhn7GcMgTpOe1zGTtWYWw4n+RMGyDAvhkYaNolxH/YxAvZb2LBFUmQ==
|
||||
|
||||
codex.editor.inline-code@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.inline-code/-/codex.editor.inline-code-1.2.0.tgz#f666859a50a07cb8d465b2442eb5c750c9bf7cca"
|
||||
integrity sha512-xg2wTX7NdWsJoV25Xn7cTZnAug9jdySE9keVqssShn9phXX7SCRyTTaXL1dMvgqQUUIEwP3038SwHAuc94/fdw==
|
||||
|
||||
codex.editor.list@^1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.list/-/codex.editor.list-1.2.3.tgz#74260413c3071182b7e0221eefe1544ee8798d28"
|
||||
integrity sha512-URCZLjPX9o8c7Jonu6dps6ZRQr5HLuxMe1I6pqSEmbG1bEWGH2cgEMaQ+dC561xuXNVGSGmIm6JAp0gn8RnLUQ==
|
||||
|
||||
codex.editor.marker@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.marker/-/codex.editor.marker-1.1.0.tgz#732b628766eb2e455307cdb848b95cc6610be966"
|
||||
integrity sha512-Jqdst23W5I4BBiPHbctWOEq9uN6+R4ayoHKsSkUrbtVWODbfGdh43nHOeV95qrtpbZjmXAYpW5syeApCKRxOeA==
|
||||
|
||||
codex.editor.quote@^2.1.5:
|
||||
version "2.1.5"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.quote/-/codex.editor.quote-2.1.5.tgz#ab1e9211eb1cf9f71b7c2e5b74ea202d689eed25"
|
||||
integrity sha512-IsoE4cFNXqq2DRGea1q4RIu6MRngLTtY4RiqflQW1plrn7FoV1fWeJ4mWXx9PeK8BCMkttvLjTQZxQF+pId0ng==
|
||||
|
||||
codex.editor.raw@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor.raw/-/codex.editor.raw-2.0.2.tgz#3e5b01c9a2b5356c7709b13422f57c7852214b18"
|
||||
integrity sha512-HWjZChPvnXVcVAoL/VpQ5JBU0ty2+itH/Qjg8sXCRcL5Me6NA9nvST4i6HsjOAV7spCVKY2iF1wgeu7AW6DptQ==
|
||||
|
||||
codex.editor@^2.8.1:
|
||||
version "2.8.1"
|
||||
resolved "https://registry.yarnpkg.com/codex.editor/-/codex.editor-2.8.1.tgz#98abab33f3c084ba264b2f547ae56196ae577830"
|
||||
integrity sha512-zyj7+JU1JDD8FGmwPa9YPhdTpBn9SsbJAplUZlzCdPelqhimQtHPFUj0mZ6HQpwEMt2zyjvljJ57E2RKhvxp8A==
|
||||
|
||||
collection-visit@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue