@bigbinary/neeto-editor 1.38.3 → 1.38.4
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/dist/Editor.js +11 -9
- package/dist/Editor.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +11 -9
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -19
- package/package.json +1 -1
package/dist/Editor.js
CHANGED
|
@@ -5686,7 +5686,7 @@ var SORTED_LANGUAGE_LIST = [].concat(_toConsumableArray(lowlight.listLanguages()
|
|
|
5686
5686
|
var Menu$3 = Dropdown.Menu,
|
|
5687
5687
|
MenuItem$1 = Dropdown.MenuItem;
|
|
5688
5688
|
var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
5689
|
-
var _node$
|
|
5689
|
+
var _node$attrs2, _node$content;
|
|
5690
5690
|
var node = _ref.node,
|
|
5691
5691
|
editor = _ref.editor,
|
|
5692
5692
|
updateAttributes = _ref.updateAttributes;
|
|
@@ -5708,13 +5708,15 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
|
5708
5708
|
editor === null || editor === void 0 || (_editor$commands = editor.commands) === null || _editor$commands === void 0 || _editor$commands.focus();
|
|
5709
5709
|
};
|
|
5710
5710
|
useEffect(function () {
|
|
5711
|
-
var _node$attrs
|
|
5712
|
-
isNil((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.language)
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5711
|
+
var _node$attrs;
|
|
5712
|
+
if (isNil((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.language)) {
|
|
5713
|
+
// https://github.com/bigbinary/neeto-kb-web/issues/6429
|
|
5714
|
+
setTimeout(function () {
|
|
5715
|
+
return updateAttributes({
|
|
5716
|
+
language: "plaintext"
|
|
5717
|
+
});
|
|
5718
|
+
}, 0);
|
|
5719
|
+
}
|
|
5718
5720
|
}, []);
|
|
5719
5721
|
return /*#__PURE__*/React__default.createElement(NodeViewWrapper, {
|
|
5720
5722
|
"data-cy": "neeto-editor-code-block"
|
|
@@ -5728,7 +5730,7 @@ var CodeBlockComponent = function CodeBlockComponent(_ref) {
|
|
|
5728
5730
|
buttonSize: "small",
|
|
5729
5731
|
buttonStyle: "secondary",
|
|
5730
5732
|
icon: Down,
|
|
5731
|
-
label: ((_node$
|
|
5733
|
+
label: ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.language) || t("neetoEditor.common.auto"),
|
|
5732
5734
|
strategy: "fixed",
|
|
5733
5735
|
zIndex: 99999
|
|
5734
5736
|
}, /*#__PURE__*/React__default.createElement(Input, {
|