locked
trying to bold a telerik textbox RRS feed

  • Question

  • User-2146352328 posted

    Hi

    telerik textbox

    stxt = stxt + ' -LINKED WITH: ' + 'some text here'
    textboxt.set_value(stxt)

    and server side:

    telertext.Text = rlbAvailable.SelectedItem.Text & " -LINKED WITH: " & "some text here"

    I won't to make LINKED WITH bold . It won't work with bold element but from what I've read you can use innerhtml, so i tried:

    textboxt.set_value(stxt).innerHTML , but it won't do anything. or textboxt.innerHTML.set_value

    I could add a css class to specify bold but how would I tell it to select only whatever I use with bold?

    Also I have another issue here. I need also to set the bold through server side code but I can't find an innerHtml property.

    So is there a way?

    Thanks.

    Friday, December 7, 2018 10:01 AM

All replies

  • User1724605321 posted

    Hi sapator,

    Do you want to apply bold to the text except  LINKED WITH ?  If the control is RadInput , you can try to modify the predefined styles :

    https://docs.telerik.com/devtools/aspnet-ajax/controls/textbox/appearance-and-styling/styles 

    Since the problem is related to telerik control , i would suggest you post to telerik support :

    https://www.telerik.com/support 

    Best Regards,

    Nan Yu

    Monday, December 10, 2018 5:09 AM
  • User-2146352328 posted

    Hi Nan.

    The opposite. Only bold on LINKED WITH. Also if I apply a style, won't the style be applied to all the control elements? Or from apply and forth i will understand the bold sign?

    Thanks

    Monday, December 10, 2018 1:04 PM
  • User1724605321 posted

    Hi sapator ,

    Normally , you can't have multi-styled text within a input:text element. You'll need to use a custom text element using a div with `contenteditable` if you want formatted text :

    http://jsfiddle.net/jVqDJ/ 

    But i can't confirm with telerik textbox since i can't test it in my environment , you can confirm that in telerik's support channel .

    Best Regards,

    Nan Yu

    Tuesday, December 11, 2018 3:23 AM
  • User-2146352328 posted

    Hi.

    It has some properties but nothing on rendering words. https://demos.telerik.com/aspnet-ajax/textbox/appearance/styles/defaultvb.aspx?show-source=true

    I can't even seem to find innerHTML as I was thinking to <span> it up and put the desired style.

    So I would either leave it be for now and learn my lesson on not using super duper controls that essentially makes your work harder or change it for a regular textbox input. 

    Tuesday, December 11, 2018 3:07 PM
  • User1724605321 posted

    Hi sapator ,

    You may post to telerik  support forum which may find solution with telerik  controls.

    Best Regards,

    Nan Yu

    Wednesday, December 12, 2018 5:35 AM