Skip to content

Commit 1121cf0

Browse files
committed
maxWidth prop
1 parent f93dae3 commit 1121cf0

File tree

1 file changed

+7
-1
lines changed
  • services/static-webserver/client/source/class/osparc/ui/markdown

1 file changed

+7
-1
lines changed

services/static-webserver/client/source/class/osparc/ui/markdown/MarkdownChat.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ qx.Class.define("osparc.ui.markdown.MarkdownChat", {
6565
check: "String",
6666
apply: "__applyMarkdown"
6767
},
68+
69+
measurerMaxWidth: {
70+
check: "Integer",
71+
init: 220,
72+
nullable: true,
73+
},
6874
},
6975

7076
events: {
@@ -111,7 +117,7 @@ qx.Class.define("osparc.ui.markdown.MarkdownChat", {
111117
const safeHtml = osparc.wrapper.DOMPurify.getInstance().sanitize(html);
112118

113119
// flow-root prevents margin collapsing; inline style avoids extra stylesheet juggling
114-
const max = 220;
120+
const max = this.getMeasurerMaxWidth() || 220;
115121
const mdRoot = `
116122
<div class="${this.self().MD_ROOT}" style="display:flow-root;">
117123
<div class="${this.self().MD_MEASURE}"

0 commit comments

Comments
 (0)