question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Append text with different style.

See original GitHub issue

Hi there,

I want to append texts with different style. E.g. the below code, I want the first “Hello” to be appended in bold, and the second “world” to in Italic, how can I set such styling for each append? by the way, this library is awesome!

@FXML
private StyleClassedTextArea testTextArea;

void test(){
    testTextArea.appendText("Hello"); //to append Hello in Bold.
    testTextArea.appendText("World"); //to append Hello in Italic.
}

I tried looking into other issues and questions by others, but unfortunately didn’t find the answer.

And second question, Which one is using less memory? InlineCssTextArea or StyleClassedTextArea or CodeArea?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Jugencommented, Nov 19, 2019

Maybe this week, otherwise next week.

1reaction
Jugencommented, Nov 18, 2019

I’ve added the following API for the next release to simplify this:

  append( text, styleClass )
  insert( position, text, styleClass )
  replace( start, end, text, styleClass )
Read more comments on GitHub >

github_iconTop Results From Across the Web

Append text of different style - javascript - Stack Overflow
You can append a span element with a class, then style it with CSS: document.getElementById("appendButton").onclick = function() { document.
Read more >
Insert WordArt - Microsoft Support
Click Insert > WordArt, and pick the WordArt style you want. Choosing a WordArt option. In the WordArt gallery, the letter A represents...
Read more >
Survey Style & Motion - Qualtrics
Fonts and text color can be edited two ways: globally and locally. Global style changes are made in the Look & feel menu...
Read more >
Format text in your form - Google Docs Editors Help
Important: You can only format the text in titles, questions, and descriptions. You can't format answer options. Bold, italicize, or underline text.
Read more >
Style - Alchemer Help
Choose a different theme, add a logo, customize your font, and get your survey ... Choosing how your respondents interact with your survey...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found