-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuxt.js integration #6071
Comments
This is a huge problem. It kind a stops my development now. I need to develop multiple custom plugins. At this stage we're thinking about migrating to other editor instead. So hope there will be some fix soon. |
For everyone struggling with integrating CKEditor5 and Nuxt, you are most likely to run into two major problems:
To address problem 1, there is an easy workaround, which you can find here. Probably, you will also need to set To address problem 2, you will need to add a custom Webpack config to your Note: when you build Nuxt project as a static website using |
For me, currently, the best solution to use nuxt with SSR was to make a build outside a nuxt project. I downloaded https://github.com/ckeditor/ckeditor5-build-classic, modifying Definitely not the best way and still waiting official ckeditor nuxt.js support. |
Tried all day to add CKeditor 5 to my nuxt project, without result. Would love if I could simply add ckeditor to my plugin. In the meantime, does anyone know the best solution to add this to my project? |
@SThomassen look at my comment. That's the way I did it, but few more days later our team just migrated away from CK5 to other editor completely. I didn't want to create and maintain separate git repo which contains our custom build, just to be able to use CK in nuxt project. We just found other editor which works fine with nuxt and fits our needs. |
@edgarsn can you explain the way you add the editor in a component/page? I followed your steps (modified the classic build webpack config and |
@teotsi You must import it in your export default {
head: {
script: [
{src: '/ckeditor.js'},
],
}
} after that in your vue file you use it straightaway without any require() or import(). It's imported globally as es5 script. |
Is it NUXT integration moving to any direction? or it's just Github issue and nothing else? |
After a lot of tries I was able to use this with Nuxt.js, below the code I used to use implement the standard builds.
I am not able to build from source, but to add new plugins I make a new build with the online builder and so I save it in my components directory and import it instead the standard build.
Not the perfect way, but until was released a module for Nuxt.js, this solved my problem. Hope it help someone. |
@Trixpua do you have a full implementation example in code? |
Hello @chkb, you can check a example in this codesandbox |
Hello @Trixpua Ive got your version to work local. But if I add the Collaboration Feature I get always the error This is the Only thing missing i think hopefully. I hope you can help somehow ` mounted() {
|
There is a CKEditor 5 npm package for nuxt.js. It's quite heavy because it has implemented all free possible plugins but works and there is no need to make any changes to the nuxt config file. If you need more lighter custom build just follow this article it should help you. |
any update about to released of module for Nuxt.js ??? |
@KamranMaqbool it's been moved up in the milestone queue. It was in the backlog for a while, but it looks like the team will get their hands on it soon. @Trixpua's solution works perfectly though even with custom builds, so no need to wait for the official support. |
Because of the lack of Nuxt Support we moved to codox.io and integrared it with qiull. Cheaper and just some lines to implement. Hope I could help
… Am 29.08.2020 um 15:31 schrieb teotsi ***@***.***>:
@KamranMaqbool it's been moved up in the milestone queue. It was in the backlog for a while, but it looks like the team will get their hands on it soon.
@Trixpua's solution works perfectly though even with custom builds, so no need to wait for the official support.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@nawalnew Quill didn't work for me when trying to use custom plugins. That's the main reason we opted for CKEditor. Hopefully the team will officially support Nuxt soon. |
any update i also need this in nuxt, specially adding tables images and inline style . https://blowstack.com/blog/frameworks/create-ckeditor-5-custom-build |
@ahmed-classtra Your solution doesn't work for me. Receiving many errors. Here is one error from many. `ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css (./node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/postcss-loader/src??ref--3-oneOf-1-2!./node_modules/style-loader/dist/cjs.js??ref--13-0!./node_modules/postcss-loader/src??ref--13-1!./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css) (1:1) Unknown word
|
@edgarsn that error does not help me resolve your issue. Please post the whole error log. |
@ahmed-classtra sure, here you go. Error log``` ERROR Failed to compile with 35 errors friendly-errors 21:24:13 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css 4:14-267 14:3-18:5 15:22-275 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css 4:14-269 14:3-18:5 15:22-277 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css 4:14-261 14:3-18:5 15:22-269 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css 4:14-263 14:3-18:5 15:22-271 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/editorui/editorui.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/editorui/editorui.css 4:14-263 14:3-18:5 15:22-271 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css 4:14-264 14:3-18:5 15:22-272 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css 4:14-259 14:3-18:5 15:22-267 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/inputtext/inputtext.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/inputtext/inputtext.css 4:14-264 14:3-18:5 15:22-272 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css 4:14-260 14:3-18:5 15:22-268 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css 4:14-271 14:3-18:5 15:22-279 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css 4:14-259 14:3-18:5 15:22-267 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/listdropdown.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/listdropdown.css 4:14-267 14:3-18:5 15:22-275 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css 4:14-269 14:3-18:5 15:22-277 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css 4:14-266 14:3-18:5 15:22-274 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css 4:14-266 14:3-18:5 15:22-274 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css 4:14-267 14:3-18:5 15:22-275 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css 4:14-262 14:3-18:5 15:22-270 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css 4:14-270 14:3-18:5 15:22-278 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css 4:14-262 14:3-18:5 15:22-270 ERROR in ./node_modules/@ckeditor/ckeditor5-ui/theme/globals/globals.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-ui/theme/globals/globals.css 4:14-250 14:3-18:5 15:22-258 ERROR in ./node_modules/@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css 4:14-244 14:3-18:5 15:22-252 ERROR in ./node_modules/@ckeditor/ckeditor5-heading/theme/heading.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-heading/theme/heading.css 4:14-238 14:3-18:5 15:22-246 ERROR in ./node_modules/@ckeditor/ckeditor5-table/theme/inserttable.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-table/theme/inserttable.css 4:14-242 14:3-18:5 15:22-250 ERROR in ./node_modules/@ckeditor/ckeditor5-link/theme/link.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-link/theme/link.css 4:14-235 14:3-18:5 15:22-243 ERROR in ./node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css 4:14-242 14:3-18:5 15:22-250 ERROR in ./node_modules/@ckeditor/ckeditor5-link/theme/linkform.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-link/theme/linkform.css 4:14-239 14:3-18:5 15:22-247 ERROR in ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembed.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembed.css 4:14-241 14:3-18:5 15:22-249 ERROR in ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembedediting.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaembedediting.css 4:14-248 14:3-18:5 15:22-256 ERROR in ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaform.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-media-embed/theme/mediaform.css 4:14-240 14:3-18:5 15:22-248 ERROR in ./node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css 4:14-242 14:3-18:5 15:22-250 ERROR in ./node_modules/@ckeditor/ckeditor5-table/theme/table.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-table/theme/table.css 4:14-236 14:3-18:5 15:22-244 ERROR in ./node_modules/@ckeditor/ckeditor5-table/theme/tableediting.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-table/theme/tableediting.css 4:14-243 14:3-18:5 15:22-251 ERROR in ./node_modules/@ckeditor/ckeditor5-table/theme/tableselection.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-table/theme/tableselection.css 4:14-245 14:3-18:5 15:22-253 ERROR in ./node_modules/@ckeditor/ckeditor5-widget/theme/widget.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-widget/theme/widget.css 4:14-237 14:3-18:5 15:22-245 ERROR in ./node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css friendly-errors 21:24:13 Syntax Error: SyntaxError friendly-errors 21:24:13 (1:1) Unknown word
@ ./node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css 4:14-247 14:3-18:5 15:22-255
|
@edgarsn , I'm sorry I'm unable to figure out what is causing your specific error. Maybe someone from the community with more experience can help here. But if I had to guess, I believe it's a loader issue (as in not selecting the right loaders) not a specific CKEditor integration issue 🤷♂️ |
how can we fix |
Alternatively you can define a plugin. I'm still trying to figure out a non-hacky way of loading the editor, but here's what I've got:
import Vue from 'vue';
import CKEditor from '@ckeditor/ckeditor5-vue2';
Vue.use(CKEditor);
export default {
...
plugins: [
{
src: '~/plugins/ckeditor.js',
ssr: false
},
...
]
}
<client-only>
<ckeditor
v-if="editor"
v-model="template"
:editor="editor"
/>
<div v-else>Loading...</div>
</client-only>
data: () => ({
editor: null
}),
mounted () {
const vm = this;
import('@ckeditor/ckeditor5-build-classic').then(editor => {
vm.editor = editor.default;
});
} If you don't want to use an async import, you could try setting the editor as a global variable in the plugin: import Vue from 'vue';
import CKEditor from '@ckeditor/ckeditor5-vue2';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
window.__CLASSIC_EDITOR__ = ClassicEditor;
Vue.use(CKEditor);
data: () => ({
editor: process.browser ? window.__CLASSIC_EDITOR__ : null
}), Ideally there would be a way to set the default editor in the options of |
Wow, just wow.... The main problem was webpack config, which I don't know anything about. So since I understand only half of what is written below (copy/pasting pieces of code from this thread and other github/stackoverflow threads) be aware that it could cause issues if you have a more complex build config... : ./nuxt.config.js const path = require('path')
const CKEditorWebpackPlugin = require("@ckeditor/ckeditor5-dev-webpack-plugin")
const CKEditorStyles = require("@ckeditor/ckeditor5-dev-utils").styles
export default {
// Code before...
build: {
plugins: [
new CKEditorWebpackPlugin({
language: 'en',
additionalLanguages: ['fr'],
addMainLanguageTranslationsToAllAssets: true
})
],
extend(config, ctx) {
config.module.rules.find(r => r.test.test('.css')).exclude = [
/\.module\.[a-z]+$/,
/ckeditor5-[^/]+\/theme\/[\w-/]+\.css$/,
]
const filesRuleIndex = config.module.rules.findIndex(item => {
return item.test.test('.svg')
})
if (filesRuleIndex !== -1) {
config.module.rules[filesRuleIndex].test = /\.(png|jpe?g|gif|webp)$/
const svgRule = {...config.module.rules[filesRuleIndex]}
svgRule.test = /\.svg/
svgRule.exclude = svgRule.exclude || []
svgRule.exclude.push(path.join(__dirname, 'node_modules', '@ckeditor'))
config.module.rules.push(svgRule)
}
config.module.rules.push({
test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/,
use: ["raw-loader"]
})
config.module.rules.push({
test: /ckeditor5-[^/\\]+[/\\]theme[/\\].+\.css$/,
use: [
{
loader: 'style-loader',
options: {
injectType: 'singletonStyleTag',
attributes: {
'data-cke': true
}
}
},
{
loader: 'postcss-loader',
options: CKEditorStyles.getPostCssConfig({
themeImporter: {
themePath: require.resolve('@ckeditor/ckeditor5-theme-lark')
},
minify: true
})
}
]
})
},
} This is the editor component I import in my pages <template>
<client-only>
<ckeditor
:editor="editor"
:value="value"
:config="editorConfig"
@input="ev => $emit('input', ev)"
/>
</client-only>
</template>
<script>
import CKEditor from '@ckeditor/ckeditor5-vue2'
// This is a custom build based on CKEditor BalloonBlock default build
import BalloonBlockEditor from '~/ckeditor5.js'
export default {
name: 'RichEditor',
props: {
value: {
type: String,
required: false
},
tagName: {
type: String,
required: false,
default: 'div'
},
disabled: {
type: Boolean,
required: false,
},
uploadUrl: {
type: String,
required: false
},
options: {
type: Object,
default: () => {}
}
},
components: {
ckeditor: process.client ? CKEditor.component : null
},
data() {
return {
editor: BalloonBlockEditor,
editorConfig: this.options
}
},
}
</script> This is the custom build I use. There are many plugins I don't use yet. import BalloonBlockEditor from '@ckeditor/ckeditor5-editor-balloon/src/ballooneditor.js';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat.js';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote.js';
import BlockToolbar from '@ckeditor/ckeditor5-ui/src/toolbar/block/blocktoolbar.js';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold.js';
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder.js';
import CKFinderUploadAdapter from '@ckeditor/ckeditor5-adapter-ckfinder/src/uploadadapter.js';
import CloudServices from '@ckeditor/ckeditor5-cloud-services/src/cloudservices.js';
import CodeBlock from '@ckeditor/ckeditor5-code-block/src/codeblock.js';
import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials.js';
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor.js';
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js';
import Image from '@ckeditor/ckeditor5-image/src/image.js';
import ImageCaption from '@ckeditor/ckeditor5-image/src/imagecaption.js';
import ImageResize from '@ckeditor/ckeditor5-image/src/imageresize.js';
import ImageStyle from '@ckeditor/ckeditor5-image/src/imagestyle.js';
import ImageToolbar from '@ckeditor/ckeditor5-image/src/imagetoolbar.js';
import ImageUpload from '@ckeditor/ckeditor5-image/src/imageupload.js';
import Indent from '@ckeditor/ckeditor5-indent/src/indent.js';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic.js';
import Link from '@ckeditor/ckeditor5-link/src/link.js';
import List from '@ckeditor/ckeditor5-list/src/list.js';
import MediaEmbed from '@ckeditor/ckeditor5-media-embed/src/mediaembed.js';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice.js';
import RemoveFormat from '@ckeditor/ckeditor5-remove-format/src/removeformat.js';
import Table from '@ckeditor/ckeditor5-table/src/table.js';
import TableToolbar from '@ckeditor/ckeditor5-table/src/tabletoolbar.js';
import TextTransformation from '@ckeditor/ckeditor5-typing/src/texttransformation.js';
import Title from '@ckeditor/ckeditor5-heading/src/title.js';
import TodoList from '@ckeditor/ckeditor5-list/src/todolist';
import HeadingButtonsUI from '@ckeditor/ckeditor5-heading/src/headingbuttonsui';
import ParagraphButtonUI from '@ckeditor/ckeditor5-paragraph/src/paragraphbuttonui';
class Editor extends BalloonBlockEditor {}
Editor.builtinPlugins = [
Autoformat,
BlockQuote,
BlockToolbar,
Bold,
CKFinder,
CKFinderUploadAdapter,
CloudServices,
CodeBlock,
Essentials,
FontColor,
Heading,
Image,
ImageCaption,
ImageResize,
ImageStyle,
ImageToolbar,
ImageUpload,
Indent,
Italic,
Link,
List,
MediaEmbed,
Paragraph,
PasteFromOffice,
RemoveFormat,
Table,
TableToolbar,
TextTransformation,
Title,
TodoList,
HeadingButtonsUI,
ParagraphButtonUI
];
export default Editor; Page example using the RichEditor component <template>
<rich-editor v-model="content" :options="editorConfig" />
</template>
<script>
export default {
data(){
return {
content: "<h1>My title</h1>",
editorConfig: {
language: 'en',
blockToolbar: [
'paragraph', 'heading1', 'heading2', 'heading3',
'|',
'bulletedList', 'numberedList', 'TodoList',
'|',
'blockQuote', 'uploadImage'
],
toolbar: {
items: [ 'heading', '|', 'bold', 'italic', '|', 'link' ],
},
}
}
},
}
</script> |
I tried various ways above but I still can't make it work, there is a This is my nuxt config:
Does anyone know how to resolve it? |
I don't know why but downgrade all plugins from Edit: of course there are a lot of different in the Component import statements between two versions. Edit 2: It worked after migrating to v29.2.0. |
Has anyone integrated it into Nuxt 3? I am struggling with this :( |
is this still a issue? |
With [v42.0.0](https://github.com/ckeditor/ckeditor5/releases/tag/v42.0.0) the Nuxt integration with moved forward. We plan to improve a bit Vue integration in the following weeks to be built with ESM, and add a guide for Nuxt, so stay tuned. |
Thanks @Witoso could you tell me if it is like here https://github.com/hoanghiep1x0/nuxt3-ckeditor-guide or here https://github.com/hendisantika/nuxt3-ckeditor5 ? I need to upgrade a project this/next week, if you can save me some minutes I appreciate 🙏 👍 |
Eh, I announced a premature success 😕 , we are actually blocked by upgrading our Vue integration to ESM to make Nuxt work seamlessly (observe the ckeditor/ckeditor5-vue#281 PR) and integration releases (should be done within a week or two). Sorry @jmverges, if you have time constraints, and you cannot wait, the tutorial https://github.com/hendisantika/nuxt3-ckeditor5, looks ok, but it still uses methods pre-42. They are supported in v42, vite plugin was marked as deprecated, but just because it won't have the new versions. |
Thanks for the info @Witoso I will then 👍 |
@Witoso anything new about this? Thanks! |
Yep, release scheduled for the next week. You can try using the 7.0.0-alpha.2 of Vue package. |
A new release of the Vue integration just happened. |
Worked great so far |
📝 Provide a description of the new feature
Currently, integrating CKEditor 5 with Nuxt.js causes some issues. It will be nice to check how we can improve it.
A list of related issues which might be useful:
If you'd like to see this feature implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: