@atlaskit/adf-schema 35.1.1 → 35.2.0
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/CHANGELOG.md
CHANGED
@@ -25,7 +25,7 @@ borderColorArrayPalette.forEach(function (_ref) {
|
|
25
25
|
var border = {
|
26
26
|
inclusive: false,
|
27
27
|
parseDOM: [{
|
28
|
-
tag: '
|
28
|
+
tag: '[data-mark-type="border"]',
|
29
29
|
getAttrs: function getAttrs(domNode) {
|
30
30
|
var _dom$getAttribute, _dom$getAttribute2;
|
31
31
|
var dom = domNode;
|
@@ -41,12 +41,14 @@ var border = {
|
|
41
41
|
color: {},
|
42
42
|
size: {}
|
43
43
|
},
|
44
|
-
toDOM: function toDOM(mark) {
|
44
|
+
toDOM: function toDOM(mark, isInline) {
|
45
|
+
var wrapperStyle = isInline ? 'span' : 'div';
|
46
|
+
|
45
47
|
// Note -- while there is no way to create custom colors using default tooling
|
46
48
|
// the editor does supported ad hoc color values -- and there may be content
|
47
49
|
// which has been migrated or created via apis which use such values.
|
48
50
|
var paletteColorValue = (0, _editorPalette.hexToEditorBorderPaletteColor)(mark.attrs.color) || mark.attrs.color;
|
49
|
-
return [
|
51
|
+
return [wrapperStyle, {
|
50
52
|
'data-mark-type': 'border',
|
51
53
|
'data-color': mark.attrs.color,
|
52
54
|
'data-size': mark.attrs.size,
|
@@ -12,7 +12,7 @@ borderColorArrayPalette.forEach(([color, label]) => borderColorPalette.set(color
|
|
12
12
|
export const border = {
|
13
13
|
inclusive: false,
|
14
14
|
parseDOM: [{
|
15
|
-
tag: '
|
15
|
+
tag: '[data-mark-type="border"]',
|
16
16
|
getAttrs: domNode => {
|
17
17
|
var _dom$getAttribute, _dom$getAttribute2;
|
18
18
|
const dom = domNode;
|
@@ -28,12 +28,14 @@ export const border = {
|
|
28
28
|
color: {},
|
29
29
|
size: {}
|
30
30
|
},
|
31
|
-
toDOM(mark) {
|
31
|
+
toDOM(mark, isInline) {
|
32
|
+
const wrapperStyle = isInline ? 'span' : 'div';
|
33
|
+
|
32
34
|
// Note -- while there is no way to create custom colors using default tooling
|
33
35
|
// the editor does supported ad hoc color values -- and there may be content
|
34
36
|
// which has been migrated or created via apis which use such values.
|
35
37
|
const paletteColorValue = hexToEditorBorderPaletteColor(mark.attrs.color) || mark.attrs.color;
|
36
|
-
return [
|
38
|
+
return [wrapperStyle, {
|
37
39
|
'data-mark-type': 'border',
|
38
40
|
'data-color': mark.attrs.color,
|
39
41
|
'data-size': mark.attrs.size,
|
@@ -18,7 +18,7 @@ borderColorArrayPalette.forEach(function (_ref) {
|
|
18
18
|
export var border = {
|
19
19
|
inclusive: false,
|
20
20
|
parseDOM: [{
|
21
|
-
tag: '
|
21
|
+
tag: '[data-mark-type="border"]',
|
22
22
|
getAttrs: function getAttrs(domNode) {
|
23
23
|
var _dom$getAttribute, _dom$getAttribute2;
|
24
24
|
var dom = domNode;
|
@@ -34,12 +34,14 @@ export var border = {
|
|
34
34
|
color: {},
|
35
35
|
size: {}
|
36
36
|
},
|
37
|
-
toDOM: function toDOM(mark) {
|
37
|
+
toDOM: function toDOM(mark, isInline) {
|
38
|
+
var wrapperStyle = isInline ? 'span' : 'div';
|
39
|
+
|
38
40
|
// Note -- while there is no way to create custom colors using default tooling
|
39
41
|
// the editor does supported ad hoc color values -- and there may be content
|
40
42
|
// which has been migrated or created via apis which use such values.
|
41
43
|
var paletteColorValue = hexToEditorBorderPaletteColor(mark.attrs.color) || mark.attrs.color;
|
42
|
-
return [
|
44
|
+
return [wrapperStyle, {
|
43
45
|
'data-mark-type': 'border',
|
44
46
|
'data-color': mark.attrs.color,
|
45
47
|
'data-size': mark.attrs.size,
|
package/package.json
CHANGED