Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
grahamgr3

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...