@flozy/editor 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -91,15 +91,9 @@ const EditorButton = props => {
|
|
91
91
|
}
|
92
92
|
break;
|
93
93
|
case "actionTrigger":
|
94
|
-
if (readOnly) {
|
95
|
-
|
96
|
-
|
97
|
-
} = buttonLink || {};
|
98
|
-
const refUrl = url ? url.includes("http") ? url : `//${url}` : "Link";
|
99
|
-
props.component = "a";
|
100
|
-
if (refUrl !== "Link") {
|
101
|
-
props.href = refUrl;
|
102
|
-
}
|
94
|
+
if (!readOnly) {
|
95
|
+
props.component = "button";
|
96
|
+
props.onClick = () => {};
|
103
97
|
} else {
|
104
98
|
props.component = "button";
|
105
99
|
props.onClick = handleTrigger;
|
@@ -136,6 +130,8 @@ const EditorButton = props => {
|
|
136
130
|
}
|
137
131
|
};
|
138
132
|
break;
|
133
|
+
default:
|
134
|
+
return {};
|
139
135
|
}
|
140
136
|
return props;
|
141
137
|
};
|