├── .gitignore
├── README.md
├── babel.config.js
├── package-lock.json
├── package.json
├── public
├── favicon.ico
└── index.html
└── src
├── App.vue
├── components
├── CkeditorNuxt.vue
└── index.js
└── main.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
5 | # local env files
6 | .env.local
7 | .env.*.local
8 |
9 | # Log files
10 | npm-debug.log*
11 | yarn-debug.log*
12 | yarn-error.log*
13 |
14 | # Editor directories and files
15 | .idea
16 | .vscode
17 | *.suo
18 | *.ntvs*
19 | *.njsproj
20 | *.sln
21 | *.sw?
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ckeditor-nuxt
2 | CKEditor 5 editor for nuxt apps. The component includes all free available plugins (except CKFinder, instead simple upload adapter used)
3 |
4 | ## Requirements
5 | ```
6 | yarn add nuxt
7 | npm i nuxt
8 | ```
9 |
10 | ## Component integration
11 | ```
12 | yarn add @blowstack/ckeditor-nuxt
13 | npm install --save @blowstack/ckeditor-nuxt
14 | ```
15 |
16 | ## List of included plugins
17 | * Alignment,
18 | * AutoImage,
19 | * Autoformat,
20 | * Autolink,
21 | * BlockQuote,
22 | * Bold,
23 | * CloudServices,
24 | * Code,
25 | * CodeBlock,
26 | * Essentials,
27 | * FontBackgroundColor,
28 | * FontColor,
29 | * FontFamily,
30 | * FontSize,
31 | * Heading,
32 | * Highlight,
33 | * HorizontalLine,
34 | * Image,
35 | * ImageCaption,
36 | * ImageInsert,
37 | * ImageResize,
38 | * ImageStyle,
39 | * ImageToolbar,
40 | * ImageUpload,
41 | * Indent,
42 | * IndentBlock,
43 | * Italic,
44 | * Link,
45 | * LinkImage,
46 | * List,
47 | * ListStyle,
48 | * MathType,
49 | * MediaEmbed,
50 | * MediaEmbedToolbar,
51 | * PageBreak,
52 | * Paragraph,
53 | * PasteFromOffice,
54 | * RemoveFormat,
55 | * SimpleUploadAdapter,
56 | * SpecialCharacters,
57 | * SpecialCharactersArrows,
58 | * SpecialCharactersCurrency,
59 | * SpecialCharactersEssentials,
60 | * SpecialCharactersLatin,
61 | * SpecialCharactersMathematical,
62 | * SpecialCharactersText,
63 | * Strikethrough,
64 | * Subscript,
65 | * Superscript,
66 | * Table,
67 | * TableCellProperties,
68 | * TableProperties,
69 | * TableToolbar,
70 | * TextTransformation,
71 | * Title,
72 | * TodoList,
73 | * Underline,
74 | * WordCount
75 |
76 | ## Usage
77 | ```
78 |
79 |
80 |
81 |
82 |
83 |
84 |
104 | ```
105 | ## Customization
106 |
107 | To make customization use editorConfig object.
108 | It works the same way as the default ckeditor 5.
109 | More info at https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editorconfig-EditorConfig.html
110 |
111 | For example if you want to disable Title plugin:
112 |
113 | ```
114 |
115 | editorConfig: {
116 | removePlugins: ['Title'],
117 | }
118 | ```
119 |
120 | You can also change the behaviour of any plugin. For the Title plugin you can change for example the placeholder:
121 |
122 | ```
123 |
124 | editorConfig: {
125 | title: {
126 | placeholder: 'h1'
127 | }
128 | }
129 | ```
130 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@blowstack/ckeditor-nuxt",
3 | "version": "0.6.0",
4 | "private": false,
5 | "author": {
6 | "name": "BlowStack",
7 | "email": "piotr.golon@gmail.com"
8 | },
9 | "keywords": [
10 | "ckeditor5 nuxt",
11 | "ckeditor 5 nuxt",
12 | "ckeditor nuxt",
13 | "rich text editor nuxt",
14 | "wysiwyg nuxt",
15 | "wysiwyg vue",
16 | "ckeditor plugins nuxt",
17 | "ckeditor plugins vue"
18 | ],
19 | "license": "MIT",
20 | "main": "./dist/ckeditorNuxt.common.js",
21 | "scripts": {
22 | "serve": "vue-cli-service serve",
23 | "build": "vue-cli-service build",
24 | "lint": "vue-cli-service lint",
25 | "build-bundle": "vue-cli-service build --target lib --name ckeditorNuxt ./src/components/index.js"
26 | },
27 | "dependencies": {
28 | "@blowstack/ckeditor5-full-free-build": "^27.0.1",
29 | "@ckeditor/ckeditor5-vue2": "^1.0.5"
30 | },
31 | "devDependencies": {
32 | "@vue/cli-plugin-babel": "~4.3.0",
33 | "@vue/cli-plugin-eslint": "~4.3.0",
34 | "@vue/cli-service": "~4.3.0",
35 | "babel-eslint": "^10.1.0",
36 | "core-js": "^3.8.3",
37 | "eslint": "^6.7.2",
38 | "eslint-plugin-vue": "^6.2.2",
39 | "vue": "^2.6.12",
40 | "vue-template-compiler": "^2.6.12"
41 | },
42 | "eslintConfig": {
43 | "root": true,
44 | "env": {
45 | "node": true
46 | },
47 | "extends": [
48 | "plugin:vue/essential",
49 | "eslint:recommended"
50 | ],
51 | "parserOptions": {
52 | "parser": "babel-eslint"
53 | },
54 | "rules": {}
55 | },
56 | "browserslist": [
57 | "> 1%",
58 | "last 2 versions",
59 | "not dead"
60 | ],
61 | "files": [
62 | "dist/*",
63 | "src/*",
64 | "public/*",
65 | "*.json",
66 | "*.js"
67 | ]
68 | }
69 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/blowstack/ckeditor-nuxt/fe5399debc2cab881c85d013dbc6a406beb8a5b8/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
23 |
24 |
34 |
--------------------------------------------------------------------------------
/src/components/CkeditorNuxt.vue:
--------------------------------------------------------------------------------
1 |
2 | $emit('input', event)"
9 | />
10 |
11 |
52 |
--------------------------------------------------------------------------------
/src/components/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import CkeditorNuxt from './CkeditorNuxt'
3 |
4 | Vue.component('CkeditorNuxt', CkeditorNuxt)
5 |
6 | export default CkeditorNuxt
7 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 |
4 | Vue.config.productionTip = false
5 |
6 | new Vue({
7 | render: h => h(App),
8 | }).$mount('#app')
9 |
--------------------------------------------------------------------------------