@seafile/sdoc-editor 1.0.162 → 1.0.164
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.
|
@@ -24,10 +24,12 @@ class JSBridge {
|
|
|
24
24
|
(0, _defineProperty2.default)(this, "initJSEventHandler", () => {
|
|
25
25
|
if (!window.WebViewJavascriptBridge) return;
|
|
26
26
|
window.WebViewJavascriptBridge.registerHandler('callJsFunction', (sData, responseCallback) => {
|
|
27
|
+
console.log(sData, '111');
|
|
27
28
|
if (!sData) return;
|
|
28
29
|
let parsedData = null;
|
|
29
30
|
try {
|
|
30
31
|
parsedData = JSON.parse(sData);
|
|
32
|
+
console.log(parsedData);
|
|
31
33
|
} catch (err) {
|
|
32
34
|
parsedData = null;
|
|
33
35
|
}
|
|
@@ -37,7 +39,8 @@ class JSBridge {
|
|
|
37
39
|
data
|
|
38
40
|
} = parsedData;
|
|
39
41
|
const eventHandler = this.eventHandlerMap[action];
|
|
40
|
-
|
|
42
|
+
console.log(data);
|
|
43
|
+
const execActionSucceed = eventHandler(JSON.parse(data));
|
|
41
44
|
if (execActionSucceed) {
|
|
42
45
|
responseCallback(JSON.stringify({
|
|
43
46
|
success: true
|
|
@@ -113,7 +113,9 @@ class Link extends _react.default.Component {
|
|
|
113
113
|
className: className
|
|
114
114
|
}, attributes), /*#__PURE__*/_react.default.createElement("a", {
|
|
115
115
|
href: element.href,
|
|
116
|
-
title: element.title
|
|
116
|
+
title: element.title,
|
|
117
|
+
target: "_blank",
|
|
118
|
+
rel: "noreferrer"
|
|
117
119
|
}, children));
|
|
118
120
|
}
|
|
119
121
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", Object.assign({
|