is used for text entry.
attachTextEntryListeners(textEntrySel) {
diff --git a/canvas_modules/common-canvas/src/object-model/layout-dimensions.js b/canvas_modules/common-canvas/src/object-model/layout-dimensions.js
index 0479538090..84085de7b5 100644
--- a/canvas_modules/common-canvas/src/object-model/layout-dimensions.js
+++ b/canvas_modules/common-canvas/src/object-model/layout-dimensions.js
@@ -393,6 +393,10 @@ const portsHorizontalDefaultLayout = {
// The gap between a comment and its sizing area rectangle
commentSizingArea: 10,
+ // The auto-size status of the comment.
+ // true means the comment height will increase if necessary to show text as it is entered.
+ commentAutoSize: true,
+
// Add comment toolbar action, default offset from viewport
addCommentOffsetX: 30,
addCommentOffsetY: 50,
@@ -816,6 +820,10 @@ const portsVerticalDefaultLayout = {
// The gap between a comment and its sizing area rectangle
commentSizingArea: 10,
+ // The auto-size status of the comment.
+ // true means the comment height will increase if necessary to show text as it is entered.
+ commentAutoSize: true,
+
// Add comment toolbar action, default offset from viewport
addCommentOffsetX: 30,
addCommentOffsetY: 50,
diff --git a/canvas_modules/harness/cypress/e2e/canvas/comment.cy.js b/canvas_modules/harness/cypress/e2e/canvas/comment.cy.js
index d4e31f0e85..6abe33369d 100644
--- a/canvas_modules/harness/cypress/e2e/canvas/comment.cy.js
+++ b/canvas_modules/harness/cypress/e2e/canvas/comment.cy.js
@@ -332,7 +332,7 @@ describe("Test edting a comment using the text toolbar to add markdown syntax",
initialText: "Some quote text!",
textToHighlight: "quote",
action: "quote",
- markdownText: "> Some quote text!\n",
+ markdownText: "> Some quote text!\n\n",
html: "
\nSome quote text!
\n
\n"
});
});
@@ -340,9 +340,9 @@ describe("Test edting a comment using the text toolbar to add markdown syntax",
it("Test adding numbered list markdown.", function() {
addMarkdownWithToolbar({
initialText: "Some numbered list text!",
- textToHighlight: "numberedList",
+ textToHighlight: "numbered list",
action: "numberedList",
- markdownText: "1. Some numbered list text!\n",
+ markdownText: "1. Some numbered list text!\n\n",
html: "
\n- Some numbered list text!
\n
\n"
});
});
@@ -350,9 +350,9 @@ describe("Test edting a comment using the text toolbar to add markdown syntax",
it("Test adding bulleted list markdown.", function() {
addMarkdownWithToolbar({
initialText: "Some bulleted list text!",
- textToHighlight: "bulletedList",
+ textToHighlight: "bulleted list",
action: "bulletedList",
- markdownText: "* Some bulleted list text!\n",
+ markdownText: "* Some bulleted list text!\n\n",
html: "
\n- Some bulleted list text!
\n
\n"
});
});
@@ -439,7 +439,7 @@ describe("Test edting a comment using keyboard shortcuts to add markdown syntax"
initialText: "Some quote text!",
textToHighlight: "quote",
action: "quote",
- markdownText: "> Some quote text!\n",
+ markdownText: "> Some quote text!\n\n",
html: "
\nSome quote text!
\n
\n"
});
});
@@ -447,9 +447,9 @@ describe("Test edting a comment using keyboard shortcuts to add markdown syntax"
it("Test adding numbered list markdown.", function() {
addMarkdownWithKeyboard({
initialText: "Some numbered list text!",
- textToHighlight: "numberedList",
+ textToHighlight: "numbered list",
action: "numberedList",
- markdownText: "1. Some numbered list text!\n",
+ markdownText: "1. Some numbered list text!\n\n",
html: "
\n- Some numbered list text!
\n
\n"
});
});
@@ -457,9 +457,9 @@ describe("Test edting a comment using keyboard shortcuts to add markdown syntax"
it("Test adding bulleted list markdown.", function() {
addMarkdownWithKeyboard({
initialText: "Some bulleted list text!",
- textToHighlight: "bulletedList",
+ textToHighlight: "bulleted list",
action: "bulletedList",
- markdownText: "* Some bulleted list text!\n",
+ markdownText: "* Some bulleted list text!\n\n",
html: "
\n- Some bulleted list text!
\n
\n"
});
});
diff --git a/canvas_modules/harness/cypress/support/canvas/comments-cmds.js b/canvas_modules/harness/cypress/support/canvas/comments-cmds.js
index 9a692df4c4..6246c0f959 100644
--- a/canvas_modules/harness/cypress/support/canvas/comments-cmds.js
+++ b/canvas_modules/harness/cypress/support/canvas/comments-cmds.js
@@ -15,6 +15,8 @@
*/
/* eslint max-len: "off" */
+import CanvasUtils from "../../../../common-canvas/src/common-canvas/common-canvas-utils.js";
+
Cypress.Commands.add("getCommentWithText", (commentText) =>
cy.get(getCommentGrpSelector())
.then((grpArray) => findGrpForText(grpArray, commentText)));
@@ -133,7 +135,7 @@ Cypress.Commands.add("isCommentSelected", (commentText) => {
Cypress.Commands.add("editTextInComment", (originalCommentText, newCommentText, saveComment = true) => {
cy.getCommentWithText(originalCommentText).as("comment");
cy.get("@comment").dblclick({ force: true });
- cy.get("@comment").get("textarea")
+ cy.get("@comment").get(".d3-comment-text-entry")
.as("textarea");
cy.get("@textarea").clear();
cy.get("@textarea").type(newCommentText);
@@ -147,7 +149,7 @@ Cypress.Commands.add("editTextInComment", (originalCommentText, newCommentText,
Cypress.Commands.add("editTextInCommentInSubFlow", (originalCommentText, newCommentText) => {
cy.getCommentWithTextInSubFlow(originalCommentText).as("comment");
cy.get("@comment").dblclick();
- cy.get("@comment").get("textarea")
+ cy.get("@comment").get(".d3-comment-text-entry")
.as("textarea");
cy.get("@textarea").clear();
cy.get("@textarea").type(newCommentText);
@@ -159,7 +161,7 @@ Cypress.Commands.add("editTextInCommentInSubFlow", (originalCommentText, newComm
Cypress.Commands.add("editTextInCommentInSubFlowNested", (originalCommentText, newCommentText) => {
cy.getCommentWithTextInSubFlowNested(originalCommentText).as("comment");
cy.get("@comment").dblclick();
- cy.get("@comment").get("textarea")
+ cy.get("@comment").get(".d3-comment-text-entry")
.as("textarea");
cy.get("@textarea").clear();
cy.get("@textarea").type(newCommentText);
@@ -171,7 +173,7 @@ Cypress.Commands.add("editTextInCommentInSubFlowNested", (originalCommentText, n
Cypress.Commands.add("editTextInCommentInSupernode", (originalCommentText, newCommentText, supernodeName) => {
cy.getCommentWithTextInSupernode(originalCommentText, supernodeName).as("comment");
cy.get("@comment").dblclick();
- cy.get("@comment").get("textarea")
+ cy.get("@comment").get(".d3-comment-text-entry")
.as("textarea");
cy.get("@textarea").clear();
cy.get("@textarea").type(newCommentText);
@@ -189,7 +191,7 @@ Cypress.Commands.add("addCommentToPosition", (commentText, canvasX, canvasY) =>
Cypress.Commands.add("moveCommentToPosition", (commentText, canvasX, canvasY) => {
cy.getCommentWithText(commentText)
.then((comment) => {
- const srcSelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > foreignobject > div";
+ const srcSelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] .d3-comment-text";
cy.getCanvasTranslateCoords()
.then((transform) => {
cy.window().then((win) => {
@@ -208,7 +210,7 @@ Cypress.Commands.add("linkCommentToNode", (commentText, nodeLabel) => {
// Click the comment at topLeft corner to display the guide
// srcSelector is the selector of guide
cy.getCommentWithText(commentText).then((comment) => {
- const sel = "[data-id='" + comment[0].getAttribute("data-id") + "'] > foreignobject > div";
+ const sel = "[data-id='" + comment[0].getAttribute("data-id") + "'] > foreignobject > div > div > div";
cy.get(sel).click();
cy.document().then((doc) => {
@@ -239,7 +241,7 @@ Cypress.Commands.add("dragAndDrop", (srcSelector, srcXPos, srcYPos, trgSelector,
Cypress.Commands.add("resizeComment", (commentText, corner, newWidth, newHeight) => {
cy.getCommentWithText(commentText)
.then((comment) => {
- const srcBodySelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-comment-rect";
+ const srcBodySelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-foreign-object-comment-text";
const srcSizingSelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-comment-sizing";
cy.resizeObjectToDimensions(srcBodySelector, srcSizingSelector, corner, newWidth, newHeight);
@@ -249,7 +251,7 @@ Cypress.Commands.add("resizeComment", (commentText, corner, newWidth, newHeight)
Cypress.Commands.add("resizeCommentOneDirection", (commentText, corner, newValue) => {
cy.getCommentWithText(commentText)
.then((comment) => {
- const srcBodySelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-comment-rect";
+ const srcBodySelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-foreign-object-comment-text";
const srcSizingSelector = "[data-id='" + comment[0].getAttribute("data-id") + "'] > .d3-comment-sizing";
cy.getObjectDimensions(srcBodySelector).then((commentDimensions) => {
@@ -329,13 +331,16 @@ Cypress.Commands.add("selectAllCommentsUsingCtrlOrCmdKey", () => {
});
Cypress.Commands.add("selectTextInComment", (textToSelect, commentText) => {
- cy.getCommentWithText(commentText)
- .get("textarea")
- .then((tas) => {
- const start = commentText.indexOf(textToSelect);
- const end = start + textToSelect.length;
- tas[0].setSelectionRange(start, end);
- });
+ cy.document().then((doc) => {
+ cy.getCommentWithText(commentText)
+ .get(".d3-comment-text-entry")
+ .then((tas) => {
+ const start = commentText.indexOf(textToSelect);
+ const end = start + textToSelect.length;
+ // tas[0].setSelectionRange(start, end);
+ CanvasUtils.selectNodeRange(tas[0], start, end, doc.getSelection());
+ });
+ });
});
Cypress.Commands.add("hoverOverComment", (commentText) => {
diff --git a/canvas_modules/harness/cypress/support/canvas/verification-cmds.js b/canvas_modules/harness/cypress/support/canvas/verification-cmds.js
index 76d4b262e9..724723ce26 100644
--- a/canvas_modules/harness/cypress/support/canvas/verification-cmds.js
+++ b/canvas_modules/harness/cypress/support/canvas/verification-cmds.js
@@ -1466,5 +1466,5 @@ function getCommentSelectionOutlineSelector(comment) {
}
function getCommentBodySelector(comment) {
- return "[data-id='" + comment.getAttribute("data-id") + "'] > .d3-comment-rect";
+ return "[data-id='" + comment.getAttribute("data-id") + "'] > .d3-foreign-object-comment-text";
}
diff --git a/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-canvas.jsx
index af12a74bfc..5a8775c245 100644
--- a/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-canvas.jsx
+++ b/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-canvas.jsx
@@ -36,7 +36,7 @@ export default class WysiwygCommentsCanvas extends React.Component {
getConfig() {
const config = Object.assign({}, this.props.config, {
enableParentClass: "wysiwyg-canvas",
- enableNodeFormatType: "Horizontal",
+ enableNodeFormatType: "Vertical",
enableMarkdownInComments: true,
enableWYSIWYGComments: true,
enableContextToolbar: true,
@@ -45,6 +45,10 @@ export default class WysiwygCommentsCanvas extends React.Component {
nodes: true,
ports: false,
links: false
+ },
+ enableCanvasLayout: {
+ commentHighlightGap: 5,
+ commentAutoSize: false
}
});
return config;
diff --git a/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-flow.json b/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-flow.json
index 2d46df58e4..dd98691b5e 100644
--- a/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-flow.json
+++ b/canvas_modules/harness/src/client/components/custom-canvases/wysiwyg-comments/wysiwyg-comments-flow.json
@@ -12,90 +12,90 @@
"ui_data": {
"comments": [
{
- "id": "bdf013da-58ec-4592-b971-7f3ecbdb9d77",
- "x_pos": 70,
- "y_pos": 60,
- "width": 286,
+ "id": "146869f2-a00e-48e4-825d-b52ade9d52c4",
+ "x_pos": 684.1615686978162,
+ "y_pos": 63.86247531441688,
+ "width": 246,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-ibm-plex-sans"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-10"
}
],
- "content": "IBM Plex Sans",
+ "content": "10",
"associated_id_refs": []
},
{
- "id": "5538b3ba-1f7e-465d-8290-e778364c113d",
- "x_pos": 70,
- "y_pos": 135,
- "width": 286,
+ "id": "a20621a4-20a7-410b-a940-4ca7f27abfa6",
+ "x_pos": 682.2837982177734,
+ "y_pos": 132.60671997070312,
+ "width": 246,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-ibm-plex-serif"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-11"
}
],
- "content": "IBM Plex Serif",
+ "content": "11",
"associated_id_refs": []
},
{
- "id": "7091b5c8-2e51-4180-a84a-7812c583c8e2",
- "x_pos": 70,
- "y_pos": 210,
- "width": 290,
+ "id": "e2842e51-8e6f-41a0-a8c5-ed71a04632fb",
+ "x_pos": 684.1616766325014,
+ "y_pos": 211.39190757555377,
+ "width": 246,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-ibm-plex-sans-condensed"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-12"
}
],
- "content": "IBM Plex Sans Condensed",
+ "content": "12",
"associated_id_refs": []
},
{
- "id": "ac260f24-d5c5-4723-a222-6028b8ed3c11",
- "x_pos": 70,
- "y_pos": 285,
- "width": 287,
+ "id": "3c93087f-12ed-4b11-8424-639cb3d6b9e3",
+ "x_pos": 683.4475184048474,
+ "y_pos": 298.41000329516135,
+ "width": 246,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-ibm-plex-mono"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-14"
}
],
- "content": "IBM Plex Mono",
+ "content": "14",
"associated_id_refs": []
},
{
- "id": "cd3d2ca8-00ee-4622-9fee-ecd09a5d2477",
- "x_pos": 70,
- "y_pos": 360,
- "width": 285,
+ "id": "1e3cda40-1437-4d5a-89fc-63f4722bd804",
+ "x_pos": 684.044770064199,
+ "y_pos": 377.4347978559057,
+ "width": 246,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
@@ -105,118 +105,118 @@
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-18"
}
],
- "content": "Arial",
+ "content": "18",
"associated_id_refs": []
},
{
- "id": "f3f0e78b-783c-4bd8-8cab-1bbd61a6bd78",
- "x_pos": 385,
- "y_pos": 60,
+ "id": "ce19085a-59fa-41b5-a729-11ca9a104f1a",
+ "x_pos": 687.127565376814,
+ "y_pos": 461.1309136075963,
"width": 246,
- "height": 51,
+ "height": 48.74359130859375,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-comic-sans-ms"
+ "value": "font-arial"
},
{
"type": "textSize",
"value": "text-size-24"
}
],
- "content": "Comic Sans MS",
+ "content": "24\n",
"associated_id_refs": []
},
{
- "id": "be2d23b0-3f31-4418-8edd-4f787e2593d5",
- "x_pos": 385,
- "y_pos": 135,
+ "id": "cbcaa057-0ace-45b4-a2c1-8dad30a59ae5",
+ "x_pos": 685.8794258259178,
+ "y_pos": 539.8960134542151,
"width": 246,
- "height": 51,
+ "height": 58.11402130126953,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-gill-sans"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-30"
}
],
- "content": "Gill Sans",
+ "content": "30",
"associated_id_refs": []
},
{
- "id": "816feb84-48e0-4733-b746-1d6d28573152",
- "x_pos": 385,
- "y_pos": 210,
+ "id": "ba7bac39-09d2-4f7a-9437-e50593c1a4c4",
+ "x_pos": 981.3515726768935,
+ "y_pos": 62.574592152763216,
"width": 246,
- "height": 51,
+ "height": 60.22113037109375,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-helvetica-neue"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-36"
}
],
- "content": "Helvetica Neue",
+ "content": "36",
"associated_id_refs": []
},
{
- "id": "64f9cab5-12bc-47d3-988a-4d9c904a8a2e",
- "x_pos": 385,
- "y_pos": 285,
+ "id": "1ec9637b-428b-4adf-8b86-f50b2e23e721",
+ "x_pos": 981.3515868125207,
+ "y_pos": 146.2593793767369,
"width": 246,
- "height": 51,
+ "height": 80.8494873046875,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-times-new-roman"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-48"
}
],
- "content": "Times New Roman",
+ "content": "48",
"associated_id_refs": []
},
{
- "id": "5bf249e2-20d2-45d8-b8f4-60f37a174603",
- "x_pos": 385,
- "y_pos": 360,
+ "id": "d5a1b71f-fce6-446f-b84c-0743239a7bb9",
+ "x_pos": 984.2878005815921,
+ "y_pos": 246.09378305463918,
"width": 246,
- "height": 51,
+ "height": 95.44854736328125,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-verdana"
+ "value": "font-arial"
},
{
"type": "textSize",
- "value": "text-size-24"
+ "value": "text-size-60"
}
],
- "content": "Verdana",
+ "content": "60",
"associated_id_refs": []
},
{
- "id": "146869f2-a00e-48e4-825d-b52ade9d52c4",
- "x_pos": 684.1615686978162,
- "y_pos": 63.86247531441688,
+ "id": "e8555eca-5d8a-4d69-bb0a-183bcdd5e42b",
+ "x_pos": 986.0340740675754,
+ "y_pos": 357.2334242066331,
"width": 246,
- "height": 51,
+ "height": 112.77734375,
"contentType": "WYSIWYG",
"formats": [
{
@@ -225,18 +225,18 @@
},
{
"type": "textSize",
- "value": "text-size-10"
+ "value": "text-size-72"
}
],
- "content": "10",
+ "content": "72",
"associated_id_refs": []
},
{
- "id": "a20621a4-20a7-410b-a940-4ca7f27abfa6",
- "x_pos": 682.2837982177734,
- "y_pos": 132.60671997070312,
+ "id": "a189d223-28d4-4986-bae7-2ea88232a928",
+ "x_pos": 989.9747597340366,
+ "y_pos": 487.1265663302015,
"width": 246,
- "height": 51,
+ "height": 138.368408203125,
"contentType": "WYSIWYG",
"formats": [
{
@@ -245,118 +245,137 @@
},
{
"type": "textSize",
- "value": "text-size-11"
+ "value": "text-size-96"
}
],
- "content": "11",
+ "content": "96",
"associated_id_refs": []
},
{
- "id": "e2842e51-8e6f-41a0-a8c5-ed71a04632fb",
- "x_pos": 684.1616766325014,
- "y_pos": 211.39190757555377,
- "width": 246,
- "height": 51,
+ "id": "6b90eaf8-33e7-4f62-b9e0-a7dfa7e1a872",
+ "x_pos": 34.23129285067438,
+ "y_pos": 16.43437248722114,
+ "width": 366.111083984375,
+ "height": 156.4444580078125,
"contentType": "WYSIWYG",
"formats": [
+ {
+ "type": "backgroundColor",
+ "value": "#A7F0BA"
+ },
+ {
+ "type": "textColor",
+ "value": "#FC7B1D"
+ },
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-comic-sans-ms"
},
{
"type": "textSize",
- "value": "text-size-12"
+ "value": "text-size-24"
+ },
+ {
+ "type": "alignHorizontally",
+ "value": "align-center"
+ },
+ {
+ "type": "alignVertically",
+ "value": "align-middle"
+ },
+ {
+ "type": "bold"
}
],
- "content": "12",
+ "content": "Elyra Canvas supports WYSIWYG comments",
"associated_id_refs": []
},
{
- "id": "3c93087f-12ed-4b11-8424-639cb3d6b9e3",
- "x_pos": 683.4475184048474,
- "y_pos": 298.41000329516135,
- "width": 246,
+ "id": "67e6f161-657f-440d-9c66-894f075979da",
+ "x_pos": 40.53332700935067,
+ "y_pos": 255.09600741307065,
+ "width": 286,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-ibm-plex-sans"
},
{
"type": "textSize",
- "value": "text-size-14"
+ "value": "text-size-24"
}
],
- "content": "14",
+ "content": "IBM Plex Sans",
"associated_id_refs": []
},
{
- "id": "1e3cda40-1437-4d5a-89fc-63f4722bd804",
- "x_pos": 684.044770064199,
- "y_pos": 377.4347978559057,
- "width": 246,
+ "id": "401f12dc-d096-4f69-868c-56268c5f764b",
+ "x_pos": 40.53332700935067,
+ "y_pos": 330.09600741307065,
+ "width": 286,
"height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-ibm-plex-serif"
},
{
"type": "textSize",
- "value": "text-size-18"
+ "value": "text-size-24"
}
],
- "content": "18",
+ "content": "IBM Plex Serif",
"associated_id_refs": []
},
{
- "id": "ce19085a-59fa-41b5-a729-11ca9a104f1a",
- "x_pos": 687.127565376814,
- "y_pos": 461.1309136075963,
- "width": 246,
- "height": 44.6368408203125,
+ "id": "446683c7-3d3b-4ce8-9fc1-caf8e017b13d",
+ "x_pos": 40.53332700935067,
+ "y_pos": 405.09600741307065,
+ "width": 290,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-ibm-plex-sans-condensed"
},
{
"type": "textSize",
"value": "text-size-24"
}
],
- "content": "24\n",
+ "content": "IBM Plex Sans Condensed",
"associated_id_refs": []
},
{
- "id": "cbcaa057-0ace-45b4-a2c1-8dad30a59ae5",
- "x_pos": 980.2736519001365,
- "y_pos": 67.53457851769167,
- "width": 246,
- "height": 46.12738037109375,
+ "id": "cb5ef75b-eddd-4b2a-a9af-c0d64386aae4",
+ "x_pos": 40.53332700935067,
+ "y_pos": 480.09600741307065,
+ "width": 287,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-ibm-plex-mono"
},
{
"type": "textSize",
- "value": "text-size-30"
+ "value": "text-size-24"
}
],
- "content": "30",
+ "content": "IBM Plex Mono",
"associated_id_refs": []
},
{
- "id": "ba7bac39-09d2-4f7a-9437-e50593c1a4c4",
- "x_pos": 984.678110762831,
- "y_pos": 142.41034654729447,
- "width": 246,
- "height": 51.65924072265625,
+ "id": "f94d73a8-e6ce-4537-ac4b-238e15a1e3a5",
+ "x_pos": 40.53332700935067,
+ "y_pos": 555.0960074130708,
+ "width": 285,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
@@ -365,129 +384,110 @@
},
{
"type": "textSize",
- "value": "text-size-36"
+ "value": "text-size-24"
}
],
- "content": "36",
+ "content": "Arial",
"associated_id_refs": []
},
{
- "id": "1ec9637b-428b-4adf-8b86-f50b2e23e721",
- "x_pos": 984.6781248984582,
- "y_pos": 226.09513377126814,
+ "id": "7f54c1e6-79ed-42aa-9b88-93bbedc7ee2e",
+ "x_pos": 355.5333270093506,
+ "y_pos": 255.09600741307065,
"width": 246,
- "height": 74,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-comic-sans-ms"
},
{
"type": "textSize",
- "value": "text-size-48"
+ "value": "text-size-24"
}
],
- "content": "48",
+ "content": "Comic Sans MS",
"associated_id_refs": []
},
{
- "id": "d5a1b71f-fce6-446f-b84c-0743239a7bb9",
- "x_pos": 987.6143386675296,
- "y_pos": 325.9295374491704,
+ "id": "31c83724-74de-4bd5-b9ca-fe6b17dbdc52",
+ "x_pos": 355.5333270093506,
+ "y_pos": 330.09600741307065,
"width": 246,
- "height": 88,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-gill-sans"
},
{
"type": "textSize",
- "value": "text-size-60"
+ "value": "text-size-24"
}
],
- "content": "60",
+ "content": "Gill Sans",
"associated_id_refs": []
},
{
- "id": "e8555eca-5d8a-4d69-bb0a-183bcdd5e42b",
- "x_pos": 989.3606121535129,
- "y_pos": 437.06917860116437,
+ "id": "7bfe9257-2a62-4041-8a0e-eebe7bb9708d",
+ "x_pos": 355.5333270093506,
+ "y_pos": 405.09600741307065,
"width": 246,
- "height": 102,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-helvetica-neue"
},
{
"type": "textSize",
- "value": "text-size-72"
+ "value": "text-size-24"
}
],
- "content": "72",
+ "content": "Helvetica Neue",
"associated_id_refs": []
},
{
- "id": "a189d223-28d4-4986-bae7-2ea88232a928",
- "x_pos": 993.3012978199741,
- "y_pos": 566.9623207247328,
+ "id": "fbd6797f-b21e-44e7-a7bb-27573798df89",
+ "x_pos": 355.5333270093506,
+ "y_pos": 480.09600741307065,
"width": 246,
- "height": 131,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
{
"type": "fontType",
- "value": "font-arial"
+ "value": "font-times-new-roman"
},
{
"type": "textSize",
- "value": "text-size-96"
+ "value": "text-size-24"
}
],
- "content": "96",
+ "content": "Times New Roman",
"associated_id_refs": []
},
{
- "id": "6b90eaf8-33e7-4f62-b9e0-a7dfa7e1a872",
- "x_pos": 95.77134717196344,
- "y_pos": 512.0812078143696,
- "width": 366.111083984375,
- "height": 156.4444580078125,
+ "id": "e9f80498-c29f-407a-a858-de830f18abb7",
+ "x_pos": 355.5333270093506,
+ "y_pos": 555.0960074130708,
+ "width": 246,
+ "height": 51,
"contentType": "WYSIWYG",
"formats": [
- {
- "type": "backgroundColor",
- "value": "#A7F0BA"
- },
- {
- "type": "textColor",
- "value": "#FC7B1D"
- },
{
"type": "fontType",
- "value": "font-comic-sans-ms"
+ "value": "font-verdana"
},
{
"type": "textSize",
"value": "text-size-24"
- },
- {
- "type": "alignHorizontally",
- "value": "align-center"
- },
- {
- "type": "alignVertically",
- "value": "align-middle"
- },
- {
- "type": "bold"
}
],
- "content": "Elyra Canvas supports WYSIWYG comments",
+ "content": "Verdana",
"associated_id_refs": []
}
]
diff --git a/canvas_modules/harness/src/styles/canvas-customization.scss b/canvas_modules/harness/src/styles/canvas-customization.scss
index d46b04b16a..e45910f476 100644
--- a/canvas_modules/harness/src/styles/canvas-customization.scss
+++ b/canvas_modules/harness/src/styles/canvas-customization.scss
@@ -102,19 +102,19 @@
/* Override styles for comments in commentColorCanvas.json and commentUnderlap.json */
-.canvas-comment-1 .d3-comment-rect {
- fill: #B98BA6;
- stroke: #000000;
+.canvas-comment-1 .d3-comment-text {
+ background-color: #B98BA6;
+ color: #000000;
}
-.canvas-comment-2 .d3-comment-rect {
- fill: #A6C8E4;
- stroke: #000000;
+.canvas-comment-2 .d3-comment-text{
+ background-color: #A6C8E4;
+ color: #000000;
}
-.canvas-comment-3 .d3-comment-rect {
- fill: #A6C8E4;
- stroke: #000000;
+.canvas-comment-3 .d3-comment-text {
+ background-color: #A6C8E4;
+ color: #000000;
}
/* These styles are used in the portsColorCanvas.json canvas file. */
diff --git a/canvas_modules/harness/test_resources/diagrams/markdownCanvas.json b/canvas_modules/harness/test_resources/diagrams/markdownCanvas.json
index 126070fdb2..ac49959b1f 100644
--- a/canvas_modules/harness/test_resources/diagrams/markdownCanvas.json
+++ b/canvas_modules/harness/test_resources/diagrams/markdownCanvas.json
@@ -36,14 +36,14 @@
"x_pos": 912.9190673828125,
"y_pos": 47.322113037109375,
"width": 431.1923828125,
- "height": 379.28912353515625,
+ "height": 404.604248046875,
"content": "### Block Quotes\n\n#### Single blockquote\n\nPreceding text\n> Blockquote text\n\nSucceeding text\n\n-------\n\n#### Nested blockquotes\n\n> Blockquotes can also be nested...\n>> ...by using additional greater-than signs right next to each other...\n> > > ...or with spaces between arrows.\n\n\n\n\n",
"associated_id_refs": []
},
{
"id": "ee6f7895-ccef-4189-9940-398c41c07c38",
"x_pos": 24.966171264648438,
- "y_pos": 509.3447265625,
+ "y_pos": 521.72900390625,
"width": 242.50255393981934,
"height": 281.0437316894531,
"class_name": "d3-comment-rect",
@@ -55,14 +55,14 @@
"x_pos": 27.606948852539062,
"y_pos": 336.63519287109375,
"width": 242,
- "height": 152,
+ "height": 172.02658081054688,
"content": "Headings using repeated equals\n\nHeading One\n========\n\nHeading using repeated dashes\n\nHeading Two\n---------",
"associated_id_refs": []
},
{
"id": "524e502f-bd1e-4b06-9e86-8b404e18213a",
"x_pos": 302.3590045134859,
- "y_pos": 580.9782112294338,
+ "y_pos": 590.7457893544338,
"width": 241.98770141601562,
"height": 181,
"content": "## Dividing lines\n\nAll dashes\n\n--------\n\nAll underscores\n______\n",
@@ -70,8 +70,8 @@
},
{
"id": "925f0e6f-38a3-4818-be8e-fe174ad78cd5",
- "x_pos": 1389.93798828125,
- "y_pos": 362.6741943359375,
+ "x_pos": 1385.93798828125,
+ "y_pos": 449.61529541015625,
"width": 357,
"height": 316,
"content": "### GIF file embedded\n\nSpaceX Rockets Landing from gify.com\n\n![Rocket Landing](https://media.giphy.com/media/3ohs4gSs3V0Q7qOtKU/giphy.gif)",
@@ -82,7 +82,7 @@
"x_pos": 1381.3721923828125,
"y_pos": 54.286827087402344,
"width": 362,
- "height": 274,
+ "height": 365.9761657714844,
"content": "## Image (jpg) file embedded\n\nThe Green - Mountsorrel - from free-images.com\n\n![The green - Mountsorrel](http://free-images.com/or/c6bf/mountsorrel_village_green_2006.jpg)",
"associated_id_refs": []
},
@@ -91,17 +91,17 @@
"x_pos": 299.72172313164435,
"y_pos": 42.11345072811703,
"width": 247.87200927734375,
- "height": 516.5646667480469,
+ "height": 528.7740783691406,
"class_name": "d3-comment-rect bkg-col-white-0",
"content": "## Lists\n\n1. Defenders\n 1. Fullbacks\n 1. Castagne\n 2. Riccardo\n 3. Justin\n 4. Thomas\n 1. Centrebacks\n 1. Evans\n 1. Fofana\n1. Goalkeeper - Schmeichel\n1. Midfield\n - Central\n * Tielemans\n * Dewsbury-Hall\n * Maddison\n - Wingers\n - Albrigton\n - Lookman\n - Barnes\n1. Forward - Vardy\n\nManagers\n\n1. ***Rodgers*** **\n1. Puel\n1. Shakespeare\n1. *Ranieri* ***\n1. *Pearson* ****\n\n** Won FA Cup & Community Shield\n*** Won Premier League\n**** Won promotion to Premier League\n\n\n",
"associated_id_refs": []
},
{
"id": "aff2d2cc-70dc-4a2f-8538-84f6525ac039",
- "x_pos": 914.5120239257812,
- "y_pos": 457.9549560546875,
+ "x_pos": 915.8444213867188,
+ "y_pos": 473.9434509277344,
"width": 433.528564453125,
- "height": 452.82647705078125,
+ "height": 479.3634033203125,
"content": "## Tables\n\n##### Regular columns\n\n| Player | Description |\n| ------ | ----------- |\n| Vardy |Legend. World-class striker. Fast as lightning. |\n| KDH | Brilliant new prospect. Tenacious mid-fielder. |\n| Thomas | Young left full back. Has a FA Cup winners medal. |\n\n##### Right aligned columns\n\n| Option | Description |\n| ------:| -----------:|\n| Vardy | Legend. World-class striker. Fast as lightning. |\n| KDH | Brilliant new prospect. Tenacious mid-fielder. |\n| Thomas | Young left full back. Has a FA Cup winners medal. |\n",
"associated_id_refs": []
}