diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..d6471a3 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,2 @@ +> 1% +last 2 versions diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 4a7ea30..0000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..246d599 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +/dist +/node_modules \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..9ba57d3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + root: true, + env: { + node: true + }, + extends: ["plugin:vue/recommended", "plugin:vue/essential", "@vue/prettier"], + rules: { + "no-console": process.env.NODE_ENV === "production" ? "error" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off" + }, + parserOptions: { + parser: "babel-eslint" + } +}; + + // "plugin:vue/recommended", + // "eslint:recommended", + // "prettier/vue", + // "plugin:prettier/recommended" \ No newline at end of file diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index a2222bb..b500932 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,25 @@ -.idea/ -node_modules/ -demo/ -.npmignore .DS_Store -npm-debug.log +node_modules +# /dist -*.log -**/**/.DS_Store +# local env files +.env.local +.env.*.local -# produced by vbuild -dist -dist-example +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* -dev/cloudinary.vue -dev/Backup-App.vue -NOTES.md +# Editor directories and files +.idea +# .vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? -.BACKUP +# Backups +# .BACKUP +.STORAGE \ No newline at end of file diff --git a/.release-it.json b/.release-it.json deleted file mode 100644 index b5da5a9..0000000 --- a/.release-it.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "non-interactive": true, - "pkgFiles": ["package.json"], - "increment": "conventional:angular", - "beforeChangelogCommand": "conventional-changelog -p angular -i CHANGELOG.md -s", - "changelogCommand": "conventional-changelog -p angular | tail -n +3", - "safeBump": false, - "requireUpstream": false, - "github": { - "release": true, - "tokenRef": "GITHUB_TOKEN" - }, - "buildCommand": "npm run build" -} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..34dd62e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "vetur.validation.template": false +} \ No newline at end of file diff --git a/README.md b/README.md index 59fa2c5..abbed2c 100644 --- a/README.md +++ b/README.md @@ -62,27 +62,26 @@ import { VueEditor, Quill } from "vue2-editor"; ```html - - + }, + + data() { + return { + content: "

Some initial content

" + }; + } + }; + ``` ## Example - Custom Image Handler @@ -90,25 +89,22 @@ import { VueEditor, Quill } from "vue2-editor"; If you choose to use the custom image handler, an event is emitted when a a photo is selected. You can see below that 3 parameters are passed. -1. It passes the file to be handled however you need -2. The Editor instance -3. The cursor position at the time of upload so the image can be inserted at the correct position on success +1. It passes the file to be handled however you need +2. The Editor instance +3. The cursor position at the time of upload so the image can be inserted at the correct position on success **NOTE** In addition to this example, I have created a [ example repo](https://github.com/davidroyer/vue2editor-images) demonstrating this new feature with an actual server. ```html ``` @@ -159,7 +155,7 @@ You can see below that 3 parameters are passed. ``` @@ -192,7 +188,7 @@ You can see below that 3 parameters are passed. @@ -225,7 +222,7 @@ You can see below that 3 parameters are passed. ``` @@ -257,26 +254,26 @@ You can see below that 3 parameters are passed. ``` @@ -315,10 +312,10 @@ There are 2 ways of using custom modules with Vue2Editor. This is partly because Vue2Editor now exports Quill to assist in this process. -1. When importing VueEditor, also import Quill. -2. Import your custom modules -3. Register the custom modules with Quill -4. Add the necessary configuration to the `editorOptions` object +1. When importing VueEditor, also import Quill. +2. Import your custom modules +3. Register the custom modules with Quill +4. Add the necessary configuration to the `editorOptions` object ```html