From 4cb7f33dcf035f2ff57e759b2a6e20874bdcc460 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sun, 21 Jun 2020 14:47:11 -0400 Subject: [PATCH] feat: visual editor code + sub/sup + table props --- client/components/editor/editor-ckeditor.vue | 15 +++++++++++++++ package.json | 2 +- server/controllers/common.js | 6 +++++- yarn.lock | 8 ++++---- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/client/components/editor/editor-ckeditor.vue b/client/components/editor/editor-ckeditor.vue index 0ef80342..30fc51cf 100644 --- a/client/components/editor/editor-ckeditor.vue +++ b/client/components/editor/editor-ckeditor.vue @@ -159,6 +159,17 @@ $editor-height-mobile: calc(100vh - 56px - 16px); } } + .contents { + table { + margin: inherit; + } + pre > code { + background-color: unset; + color: unset; + padding: .15em; + } + } + .ck.ck-toolbar { border: none; justify-content: center; @@ -166,6 +177,10 @@ $editor-height-mobile: calc(100vh - 56px - 16px); color: #FFF; } + .ck.ck-toolbar__items { + justify-content: center; + } + > .ck-editor__editable { background-color: mc('grey', '100'); overflow-y: auto; diff --git a/package.json b/package.json index ea6b1480..d3b76605 100644 --- a/package.json +++ b/package.json @@ -199,7 +199,7 @@ "@babel/preset-env": "^7.10.1", "@mdi/font": "5.3.45", "@panter/vue-i18next": "0.15.2", - "@requarks/ckeditor5": "12.4.0-wiki.16", + "@requarks/ckeditor5": "19.0.1-wiki.1", "@vue/babel-preset-app": "4.4.1", "animate-sass": "0.8.2", "animated-number-vue": "1.0.0", diff --git a/server/controllers/common.js b/server/controllers/common.js index 16bcc820..d1879dfe 100644 --- a/server/controllers/common.js +++ b/server/controllers/common.js @@ -158,7 +158,11 @@ router.get(['/e', '/e/*'], async (req, res, next) => { content: null, title: null, description: null, - updatedAt: new Date().toISOString() + updatedAt: new Date().toISOString(), + extra: { + css: '', + js: '' + } } // -> From Template diff --git a/yarn.lock b/yarn.lock index 6bffbe3e..6d42d81f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2863,10 +2863,10 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@requarks/ckeditor5@12.4.0-wiki.16": - version "12.4.0-wiki.16" - resolved "https://registry.yarnpkg.com/@requarks/ckeditor5/-/ckeditor5-12.4.0-wiki.16.tgz#ac025edac283df1cbb5dd9f838b5fe06d0a93e84" - integrity sha512-EVVxnbXU9PXGuBo58xSZziTzFQebYimczZOswQSPRIvJqaK0Xc1mqDmND6BSrUIAdue2j71+zukLudgYeKMKWQ== +"@requarks/ckeditor5@19.0.1-wiki.1": + version "19.0.1-wiki.1" + resolved "https://registry.yarnpkg.com/@requarks/ckeditor5/-/ckeditor5-19.0.1-wiki.1.tgz#257b5b38e2fe9138474656856ce0d20bd99c8fda" + integrity sha512-q5l3I7rnL3zeIFqpI4ymMaQ0XJg4h0E7zbuuQt6JSGjTmZooiAIDLIguE2t4T6BdQjkATPw0THyfgyPGylMfgg== "@root/acme@^3.0.2": version "3.0.9"