#127 Maxchars v.2.0 - Limit your editor to maximum characters

open
nobody
None
5
2014-08-27
2008-04-25
lcampanis
No

People have been asking for it, I ended up writing it myself... Now you are able to restrict the number of character in your TinyMCE editors and display the number of characters left, nice n' easy!

It works with TinyMCE3.x . I have tested it with IE 7.0, Safari Version 3.1 (5525.13) and FF 2.0.0.14

It works when the user Pastes or while Typing...

DIRECTIONS:

1. Add the unzipped directory in your tiny_mce/plugins/ folder
2. Add maxchars to your plugins list
3. In your init function for the editor add:
max_chars : 100,
max_chars_indicator : "lengthBox",

OPTIONS:

max_chars: (int: Maximum Characters), max_chars_indicator: (string: The id of an INPUT or any tag that accepts innerHTML in js (ie. DIV, SPAN))

RESTRICTIONS:

I haven't made it to work with BBcode. However it works with plain or HTML code.

Enjoy!

Discussion

1 2 3 4 > >> (Page 1 of 4)
  • lcampanis
    lcampanis
    2008-04-25

    Logged In: YES
    user_id=1598374
    Originator: YES

    File Added: maxchars.zip

     
  • lcampanis
    lcampanis
    2008-04-29

    Logged In: YES
    user_id=1598374
    Originator: YES

    Version 1.1:

    You can now call the plugin by using tinyMCE.execInstanceCommand('textareaID',"CheckMaxChars"); Useful when submitting forms and you want to cleanup messy code or trim spaces, etc, this will update it for you.
    File Added: maxcharsv1.1.zip

     
  • Logged In: NO

    Hello,

    I type, or paste, in the editor a string that has a number of characters equal to the max limit of characters set with max_chars, and I add some formatting like bold, italic, links, lists.

    Then, if I try to type another character to exceed the max_chars value, this character is automatically deleted, but it deletes even ALL text formatting! It removes even all newlines and separation by paragraphs.

    I have TinyMce 3.0.5 and I tried with Firefox 2.0 and IE 6.0.

     
  • lcampanis
    lcampanis
    2008-05-12

    Logged In: YES
    user_id=1598374
    Originator: YES

    V.1.2 - Fixed Text formatting issue.
    File Added: maxcharsv1.2.zip

     
  • lcampanis
    lcampanis
    2008-05-12

    • summary: Limit your editor to maximum characters --> Maxchars v.1.2 - Limit your editor to maximum characters
     
  • lcampanis
    lcampanis
    2008-05-13

    Logged In: YES
    user_id=1598374
    Originator: YES

    V.1.3 - Fixed inner element text. You can now use the plugin with any element you want not inly INPUT. To do so just give the element's id. An element could be a SPAN, DIV, LI, etc...
    File Added: maxcharsv1.3.zip

     
  • lcampanis
    lcampanis
    2008-05-13

    Logged In: YES
    user_id=1598374
    Originator: YES

    This plugin is part of a mass update on our Sourceforge website.
    Some plugins are really old and might not function with the
    latest version of TinyMCE.

    You should upgrade to latest and then check if this plugin is
    neccessary and still functioning.

    Thank you for using TinyMCE, and please, continue to submit
    plugins, we are constantly reviewing them to scout what me might
    add in future versions of TinyMCE. Your plugin have a higher
    chance of making it if they are well coded to about the same
    standards as the rest of TinyMCE, documentation is also a very
    big plus.

    /TinyMCE Team

     
  • lcampanis
    lcampanis
    2008-05-13

    • summary: Maxchars v.1.2 - Limit your editor to maximum characters --> Maxchars v.1.3 - Limit your editor to maximum character
     
1 2 3 4 > >> (Page 1 of 4)