diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java index b6766be528f..a17621f365e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java @@ -10935,4 +10935,13 @@ public static void updateAndRefreshCarets(StyledText styledText, Consumer } +@Override +public Object getData(String key) { + if ("StyledText.htmlText".equals(key)) { + HTMLWriter htmlWriter = new HTMLWriter(this, 0, content.getCharCount(), content); + return getPlatformDelimitedText(htmlWriter); + } + return super.getData(key); +} + }