steveathon / bootstrap-wysiwyg

Tiny bootstrap-compatible WYSIWYG rich text editor
MIT License
661 stars 1.71k forks source link

Changed library to be OOP #79

Closed codewithtyler closed 8 years ago

codewithtyler commented 8 years ago

Not only is the library now completely object-oriented, but I've also added JSCS and updated JSHint so that the library now has a consistent code style.

This can be changed later if needed, but the code style I chose to use is the jQuery Style Guide. I chose it because we were already following most of it's guidelines. I did; however, have to make a couple necessary changes to this style.

  1. I updated the maximumLineLength to be 175 characters. I did this because we have several if statements that exceed this limit. Some of our functions also have several parameters which makes the function declaration rather long. In the jQuery Style Guide a line can only be 100 characters and setting this to 175 gets around that limit with our long lines.
  2. Last, I had to update the validateLineBreaks to allow for CRLF. This is due to the way Git handles line breaks.

Special Thanks Goes Out To:

codewithtyler commented 8 years ago

@steveathon because of how much code was changed, what do you think about increasing the version number to 1.1 instead of 1.0.6?

andymac-2 commented 8 years ago

In response to maximum line length, if statements and function calls can be separated onto multiple lines, as per JQuery guidelines, It is a good rule to have short line lengths, as some people have thin screens, large text or like two text files abreast.

DerDu commented 8 years ago

+1 Sweet!

johnkpaul commented 8 years ago

So glad to have seen this come along so much since we chatted first a few months ago. Great job @RandomlyKnighted!

steveathon commented 8 years ago

This is awesome - we're re-targeting to 2.0-dev because it's a big change so we can test it out a bit before we merge it completely.