fix(ui): disable scrolling for tui editor and remove doubled scrollbar
set autofocus: false to disable scrolling in tui editor (fixed after update to 3.1.2)
set type to wysiwqyg because "moveCursorToEnd" does not work correctly in markdown mode (nhn/tui.editor/issues/1777)
set overflow: hidden to remove a doubled scrollbar in the ui
Closes
MODIFY
manager/ui/war/package.json
manager/ui/war/package.json
},
"dependencies": {
"@json-editor/json-editor": "2.6.0",
- "@toast-ui/editor": "^3.1.0",
+ "@toast-ui/editor": "^3.1.2",
"@toast-ui/editor-plugin-code-syntax-highlight": "^3.0.0",
- "@toast-ui/editor-plugin-color-syntax": "^3.0.1",
+ "@toast-ui/editor-plugin-color-syntax": "^3.0.2",
"angular": "1.8.2",
"angular-animate": "1.8.2",
"angular-clipboard": "1.1.1",

MODIFY
manager/ui/war/plugins/api-manager/css/apiman.css
manager/ui/war/plugins/api-manager/css/apiman.css
html {
- overflow: auto;
+ /*Disable overflow to keep header fixed*/
+ overflow: hidden;
}
body {
line-height: normal;

MODIFY
manager/ui/war/plugins/api-manager/ts/api/api-devportal.ts
manager/ui/war/plugins/api-manager/ts/api/api-devportal.ts
@@ -199,9 +199,10 @@ function devPortalBusinessLogic(
const options: EditorOptions = {
el: document.querySelector("#editor"),
height: "500px",
- initialEditType: "markdown",
+ initialEditType: "wysiwyg",
previewStyle: "tab",
usageStatistics: false,
+ autofocus: false,
hooks: {
addImageBlobHook: uploadImageFromMarkdownEditor,
},
@@ -216,17 +217,17 @@ function devPortalBusinessLogic(
target: "_blank",
rel: "noopener",
},
+ initialValue: ""
};
markdownEditor = new toast(options);
- markdownEditor.setMarkdown("");
if ($scope.data.apiVersion.extendedDescription) {
Logger.info(
"Setting extended description to: {0}",
$scope.data.apiVersion.extendedDescription
);
- markdownEditor.setMarkdown($scope.data.apiVersion.extendedDescription, true);
+ markdownEditor.setMarkdown($scope.data.apiVersion.extendedDescription, false);
}
}
@@ -259,7 +260,7 @@ function devPortalBusinessLogic(
$scope.data = angular.copy(dataClone);
markdownEditor.setMarkdown(
$scope.data.apiVersion.extendedDescription,
- true
+ false
);
$rootScope.isDirty = false;
};
@@ -370,7 +371,6 @@ function devPortalBusinessLogic(
function isFeaturedApi(apiBean: ApiBean): boolean {
const tagsArray: KeyValueTagDto[] = apiBean.tags;
const answer = tagsArray.findIndex((elem: KeyValueTagDto) => elem.key === "featured") !== -1;
- console.log(answer);
return answer;
}

MODIFY
manager/ui/war/yarn.lock
manager/ui/war/yarn.lock
dependencies:
prismjs "^1.23.0"
-"@toast-ui/editor-plugin-color-syntax@^3.0.1":
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/@toast-ui/editor-plugin-color-syntax/-/editor-plugin-color-syntax-3.0.1.tgz#2a7e3fc24ef3329fad737d59750288d12eadbf5d"
- integrity sha512-7IC3GHvxlxIc++zm+Zed3U55gNb8iWxXd/oDZLLGW+fmcOtg6fzB0mdfkinQTof69bCgTRvyR60XKxcRs0vQEQ==
+"@toast-ui/editor-plugin-color-syntax@^3.0.2":
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/@toast-ui/editor-plugin-color-syntax/-/editor-plugin-color-syntax-3.0.2.tgz#6fa501f5a8167da5fa603b1a769eaea918114670"
+ integrity sha512-bY356w1VSiPKEslmEyE6dNcGosa6iowEY7FDVPLXHKnZ3IFGi7duwsThnkgi84aLOONAZxu6JaJmuyv1Vari+Q==
dependencies:
tui-color-picker "^2.2.6"
-"@toast-ui/editor@^3.1.0":
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/@toast-ui/editor/-/editor-3.1.0.tgz#48febab0b9102ad6e9fb2bd3ed3a1207003a6bd8"
- integrity sha512-ewNsl0eefMejVYwY3SP6n/gx9Ppf+K2iOSUJPIEcLeoeIoodd4JAS0gyBvfx+/nLY0feVj9CjqMfbuAezssDYg==
+"@toast-ui/editor@^3.1.2":
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/@toast-ui/editor/-/editor-3.1.2.tgz#b7d73c69e9bc0b6da346b9171b81df12f3dde49c"
+ integrity sha512-3If4pnDULrduyiWP9gLZKNqeK2FatzNa8APU6eV/bEDAXJqbCJFahNDivMPtR5k7iZMtkdE1ez1FphueHyjmUQ==
dependencies:
+ dompurify "^2.3.3"
prosemirror-commands "^1.1.9"
prosemirror-history "^1.1.3"
prosemirror-inputrules "^1.1.3"
@@ -1728,6 +1729,11 @@ dompurify@^2.2.9:
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.3.tgz#c1af3eb88be47324432964d8abc75cf4b98d634c"
integrity sha512-dqnqRkPMAjOZE0FogZ+ceJNM2dZ3V/yNOuFB7+39qpO93hHhfRpHw3heYQC7DPK9FqbQTfBKUJhiSfz4MvXYwg==
+dompurify@^2.3.3:
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.3.4.tgz#1cf5cf0105ccb4debdf6db162525bd41e6ddacc6"
+ integrity sha512-6BVcgOAVFXjI0JTjEvZy901Rghm+7fDQOrNIcxB4+gdhj6Kwp6T9VBhBY/AbagKHJocRkDYGd6wvI+p4/10xtQ==
+
domutils@^2.5.2, domutils@^2.6.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
@@ -3775,9 +3781,9 @@ property-information@^5.0.0:
xtend "^4.0.0"
prosemirror-commands@^1.1.9:
- version "1.1.11"
- resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.11.tgz#369252fcca5397ee7b011b963cc4da45b0b7cb70"
- integrity sha512-uXDVkOGJbFHocdacMJihrnQCT7tHswO48ewq6ByqLxTwOrI8Y4B4aHvwUbM4epwElv/YjgC+DuqXm/gEHPym4w==
+ version "1.1.12"
+ resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.12.tgz#5cb0fef4e5a0039e2fa19b42a5626af03d7c2ec3"
+ integrity sha512-+CrMs3w/ZVPSkR+REg8KL/clyFLv/1+SgY/OMN+CB22Z24j9TZDje72vL36lOZ/E4NeRXuiCcmENcW/vAcG67A==
dependencies:
prosemirror-model "^1.0.0"
prosemirror-state "^1.0.0"
@@ -3801,17 +3807,17 @@ prosemirror-inputrules@^1.1.3:
prosemirror-transform "^1.0.0"
prosemirror-keymap@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.1.4.tgz#8b481bf8389a5ac40d38dbd67ec3da2c7eac6a6d"
- integrity sha512-Al8cVUOnDFL4gcI5IDlG6xbZ0aOD/i3B17VT+1JbHWDguCgt/lBHVTHUBcKvvbSg6+q/W4Nj1Fu6bwZSca3xjg==
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.1.5.tgz#b5984c7d30f5c75956c853126c54e9e624c0327b"
+ integrity sha512-8SZgPH3K+GLsHL2wKuwBD9rxhsbnVBTwpHCO4VUO5GmqUQlxd/2GtBVWTsyLq4Dp3N9nGgPd3+lZFKUDuVp+Vw==
dependencies:
prosemirror-state "^1.0.0"
w3c-keyname "^2.2.0"
-prosemirror-model@^1.0.0, prosemirror-model@^1.14.1, prosemirror-model@^1.14.3:
- version "1.14.3"
- resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.14.3.tgz#a9c250d3c4023ddf10ecb41a0a7a130e9741d37e"
- integrity sha512-yzZlBaSxfUPIIP6U5Edh5zKxJPZ5f7bwZRhiCuH3UYkWhj+P3d8swHsbuAMOu/iDatDc5J/Qs5Mb3++mZf+CvQ==
+prosemirror-model@^1.0.0, prosemirror-model@^1.14.1, prosemirror-model@^1.16.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.16.1.tgz#fb388270bc9609b66298d6a7e15d0cc1d6c61253"
+ integrity sha512-r1/w0HDU40TtkXp0DyKBnFPYwd8FSlUSJmGCGFv4DeynfeSlyQF2FD0RQbVEMOe6P3PpUSXM6LZBV7W/YNZ4mA==
dependencies:
orderedmap "^1.1.0"
@@ -3831,11 +3837,11 @@ prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0:
prosemirror-model "^1.0.0"
prosemirror-view@^1.18.7:
- version "1.20.2"
- resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.20.2.tgz#fc073def4358fdbd617ea11f5cd4217c5123635d"
- integrity sha512-zh67dsGCI7QKWDbtLEAdZLmadxBJYRArM8E0z2wfuNGpx4i6ObVGzHjbnblZs2n88IwqHdEA47rEhyUqZ+kAbg==
+ version "1.23.5"
+ resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.23.5.tgz#0f4af48fa9d30aa0b945816e2b8e6cb1c82ac674"
+ integrity sha512-GlcCtoFdW17KNOKjOl7OZTU3btENgVfzN/i0RBvy1SEKAZfo88PdvcFrWTraNZHH+y/uhYR3PAdMiDK9DlN5UA==
dependencies:
- prosemirror-model "^1.14.3"
+ prosemirror-model "^1.16.0"
prosemirror-state "^1.0.0"
prosemirror-transform "^1.1.0"

fix(ui): disable scrolling for tui editor and remove doubled scrollbar

- set autofocus: false to disable scrolling in tui editor (fixed after update to 3.1.2)
- set type to wysiwqyg because "moveCursorToEnd" does not work correctly in markdown mode (nhn/tui.editor/issues/1777)
-set overflow: hidden to remove a doubled scrollbar in the ui

Closes #1625