CSS for TextBox to adjust paragraph and line spacing

0
0

Hi,

I am using a textbox as a text editor, and would like to be able to adjust the line and paragraph spacing. I am following CSS practices (I think) for that, but it doesn’t seem to work. I have added a stylesheet to the form, and added:

.tbtext { line-height: 150% ; }

And set the TextBox to use this class. I tested it with the .rotate270 example I found here in the forums, and that one worked. But my CSS has no effect.

Is this possible to do with a TextBox?

Thanks!

-John

  • You must to post comments
0
0

Hi, for Textbox line spacing
– Did you tried with fonts property lineHeight? whit this you can control the paragraph spacing in textbox

here a picture about it

Regards

 

 

  • You must to post comments
0
0

Talking about your request with dev team, an cool approach to customise control TextBox as Editor could be as follow

– Handling keyboard on the server works but creates a request on each keystroke. It’s easy to attach a client side handler.
– The TextBox control in Wisej is a container, the real <input> is inside because Wisej also adds optional tool buttons, labels.
See attached sample:
Two things:
1) the lineHeight can only be set by creating a font. In the sample see /Themes
2) type something and press “h” the javascript will replace it with Hello! and move the caret.
See ClientEvents on the textbox, javascript is in Page1.resx and textbox properties inside Page1.Desdigner.cs

HTH

Regards

  • John Nagle
    Thanks for that, the example works fine. I will need to go backwards from the caret position (including the word that the caret is on) to match, say, the previous 5 words against a list of magic words that come from the user using some forms I provide. I’m not super clear on how the C# communicates/shares data with the javascript to make that work. Also, at what point does the content of a TextBox normally sync with the C# control running back on the server? Is it when the control loses focus? Is it sending the entire contents back, or is it only sending keystrokes? I guess what I’m trying to ask is….as I’m typing, where does the data live and when does client and server sync?
  • You must to post comments
0
0

Hi Paul,

I tried to install via Nuget TinyEditor last night and it appears to be incompatible with WiseJ3.

There are 2 things I’m trying to accomplish via the TextBox: responsiveness (i.e. not laggy when typing large amounts of text) and monitoring the keystrokes, caret position, etc. so I can monitor the text for keywords in real time. The TextBox control, so far in my testing, seems to give me the performance I need to do what I’m trying to do. (I haven’t simulated slow connections yet to see what that does to the user experience.)

So my thought was to modify the CSS to adjust line/paragraph spacing to what I’m looking for. The properties allow me to change the font and font size, but not the line or paragraph spacing.

Does that make sense?

Thanks!

-John

  • You must to post comments
0
0

Hi Paul,

I tried to install via Nuget TinyEditor last night and it appears to be incompatible with WiseJ3.

There are 2 things I’m trying to accomplish via the TextBox: responsiveness (i.e. not laggy when typing large amounts of text) and monitoring the keystrokes, caret position, etc. so I can monitor the text for keywords in real time. The TextBox control, so far in my testing, seems to give me the performance I need to do what I’m trying to do. (I haven’t simulated slow connections yet to see what that does to the user experience.)

So my thought was to modify the CSS to adjust line/paragraph spacing to what I’m looking for. The properties allow me to change the font and font size, but not the line or paragraph spacing.

Does that make sense?

Thanks!

-John

  • You must to post comments
0
0

Hi John

Hi

Thanks for your interest in Wisej
For we could better understand of your goal, If you can send us a runnable little sample test will be help

By the way, this cool free wisej extensions maybe be useful.
CKEditor
https://github.com/iceteagroup/wisej-extensions/tree/2.5/Wisej.Web.Ext.CKEditor
https://docs.wisej.com/extensions/extensions/ckeditor

TinyEditor
https://github.com/iceteagroup/wisej-extensions/tree/2.5/Wisej.Web.Ext.TinyEditor
https://docs.wisej.com/extensions/extensions/tinyeditor

Regards

 

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.