Jump to content
Larry Ullman's Book Forums

Toolbar Larry Ullman Is Using In This Forum In The Description Of Posts?


Recommended Posts

I am building a site from the info in this book. And the post I am writing as you read this has a toolbar at the top that allows me to add bold to text, and other cool options. Where could I get a toolbar like this for my website, so I can add it to form fields.? 

 

The main thing I am looking for is adding paragraphs when people type 2 carriage returns on their keyboard. So that the text area form field behaves like as if you are typing in a word processing document. Adding bold to text, italics, and underline would be great too, but as a beginner I can accept if the paragraphs is all I can handle code-wise. I do know some javascript, so if coding it involves that I might be able to. 

 

Any ideas on how to go about this would be wonderful!

Link to comment
Share on other sites

  • 3 weeks later...

Hi, thanks for the tip. I installed ckeditor but I am having trouble setting the maxlength that people can type into the textarea now that ckeditor is installed. I looked everywhere and cant find a solution. The maxlength in html doesn't apply anymore. 

Do you have javascript code that works.

Link to comment
Share on other sites

I will admit that the CKEditor interface is a bit annoying to get used to, but basically, you need to first get the container element of the text through some sort of DOM selector (or by looping through the CKEditor interfaces from the CKEditor object).

From there, you have to either use the value property or textContent/innerText to get the text within the container, and then reference the length property of that string.

 

It's hard to give a more specific answer than that without some code to reference, but that's the basic premise.

Link to comment
Share on other sites

 Share

×
×
  • Create New...