@enso-ui/wysiwyg 2.0.2 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enso-ui/wysiwyg",
3
- "version": "2.0.2",
3
+ "version": "2.0.6",
4
4
  "description": "WYSIWYG",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,8 +31,8 @@
31
31
  "autoprefixer": "^9.6.1",
32
32
  "babel-eslint": "^10.0.1",
33
33
  "cross-env": "^6.0.0",
34
- "eslint": "^7.0",
34
+ "eslint": "^7.0.0",
35
35
  "eslint-import-resolver-alias": "^1.1.2",
36
- "eslint-plugin-vue": "^7.0.0-beta.4"
36
+ "eslint-plugin-vue": "^8.0.3"
37
37
  }
38
38
  }
@@ -1,8 +1,10 @@
1
1
  <template>
2
- <editor v-bind="$attrs"
3
- :toolbar="toolbar"
4
- :plugins="plugins"
5
- :init="{ menubar }"/>
2
+ <div :class="['wysiwyg-wrapper', {'has-error': hasError}]">
3
+ <editor v-bind="$attrs"
4
+ :toolbar="toolbar"
5
+ :plugins="plugins"
6
+ :init="{ menubar }"/>
7
+ </div>
6
8
  </template>
7
9
 
8
10
  <script>
@@ -14,18 +16,30 @@ export default {
14
16
  components: { Editor },
15
17
 
16
18
  props: {
17
- toolbar: {
18
- type: String,
19
- default: 'newdocument undo redo bold italic strikethrough underline codesample h2 bullist numlist alignleft aligncenter alignright alignjustify blockquote indent outdent link table emoticons forecolor backcolor preview removeformat',
19
+ hasError: {
20
+ type: Boolean,
21
+ required: true,
22
+ },
23
+ menubar: {
24
+ type: [String, Boolean],
25
+ default: false,
20
26
  },
21
27
  plugins: {
22
28
  type: String,
23
29
  default: 'codesample autolink link autoresize lists emoticons image preview table',
24
30
  },
25
- menubar: {
26
- type: [String, Boolean],
27
- default: false,
31
+ toolbar: {
32
+ type: String,
33
+ default: 'newdocument undo redo bold italic strikethrough underline codesample h2 bullist numlist alignleft aligncenter alignright alignjustify blockquote indent outdent link table emoticons forecolor backcolor preview removeformat',
28
34
  },
29
35
  },
30
36
  };
31
37
  </script>
38
+
39
+ <style lang="scss">
40
+ @import 'bulma/sass/utilities/derived-variables';
41
+
42
+ .wysiwyg-wrapper.has-error {
43
+ border: 1px solid $danger;
44
+ }
45
+ </style>