GithubHelp home page GithubHelp logo

Comments (17)

w8tcha avatar w8tcha commented on September 25, 2024

you can set the char limit in the config file....

config.wordcount = {

 // Whether or not you want to show the Char Count
showCharCount: true,

// Option to limit the characters in the Editor, for example 200 in this case.
charLimit: 200

};

from ckeditor-wordcount-plugin.

wgpenney avatar wgpenney commented on September 25, 2024

How do we set wordcount limit dynamically per instance at runtime? Is there a property like editor.wordcount.limit?

from ckeditor-wordcount-plugin.

glendlockhart avatar glendlockhart commented on September 25, 2024

It seems to me although there was previously a word count limit in configuration it seems to have been commented out.... I think another approach or a bit of a hack maybe required

from ckeditor-wordcount-plugin.

advieirabr avatar advieirabr commented on September 25, 2024

Someone discover how to set limit dynamically per instance at runtime?

I can set just one limit (in config.js or using extraPlugins: 'wordcount' in CKEDITOR.replace)

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

you need to define the confg for each instance...

CKEDITOR.replace('editor1',
			    {
			        extraPlugins: 'ordcount',
			        wordcount: {
			            showCharCount: true,
			            maxCharCount: 400
			        }
			    });

editor1 is the id of the editor instance

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
the length of variable bound to input widget is not matching with character count.
i have set the word count property as
// Whether or not you want to show the Paragraphs Count
showParagraphs: true,

// Whether or not you want to show the Word Count
showWordCount: true,

// Whether or not you want to show the Char Count
showCharCount: true,

// Whether or not you want to count Spaces as Chars
countSpacesAsChars: true,

// Whether or not to include Html chars in the Char Count
countHTML: true,

// Maximum allowed Word Count, -1 is default for unlimited
maxWordCount: -1,

// Maximum allowed Char Count, -1 is default for unlimited
maxCharCount: 500,

following are the issues i am facing.

  1. when i enter the first word , it count as 9 character.
  2. it count space as random count.

i just want synchronization with input variable and the no. of characters we are typing in input widget. So that the length of variable and character count must be same.

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

In my tests the count is always correct. you enabled countHTML which means it also counts the HTML which is generated by the editor as chars ( which you only see when you switch to the source view)

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
i have changed countHTML to false. actually i have set onChange action to input field. In that function i am checking the condition( Length(CampaignOverViewInput.TypedValue) > 500). So whenever i started entering the content it started giving validation error after 491, sometimes 468 i.e randomly. So what should i do to synchronize the ckeditor count with variable bound with input field.

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

i dont really understand what you are trying to do without seeing any code sorry. if you need to get the char count value of the editor you could use the onChange event and grab the count from the editor

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
i want to save the value in database. what is happening ,when i calculate the length of variable bound to input field , it show different length than the character count shown at the bottom end of the editor. I want to synchronize both count. i had set the properties as follows

// Whether or not you want to show the Paragraphs Count
showParagraphs: false,

// Whether or not you want to show the Word Count
showWordCount: false,

// Whether or not you want to show the Char Count
showCharCount: true,

// Whether or not you want to count Spaces as Chars
countSpacesAsChars: true,

// Whether or not to include Html chars in the Char Count
countHTML: true,

// Maximum allowed Word Count, -1 is default for unlimited
maxWordCount: -1,

// Maximum allowed Char Count, -1 is default for unlimited
maxCharCount: 500,

// Option to limit the characters in the Editor, for example 200 in this case.
charLimit: 500,
count

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

Sorry but i'm unable to help you. the counter in the editor is correct. And you didnt post any code on how your counter counts.

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
i am attaching you oml file
abcb3.zip

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

Okay and what tool do i need to open the file?

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
Service studio

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

Download link please or do I need buy that?

from ckeditor-wordcount-plugin.

lovish0008 avatar lovish0008 commented on September 25, 2024

@w8tcha
https://www.outsystems.com/home/downloadsdetail/76/1141/

You have to make the id first on outsystem platform

from ckeditor-wordcount-plugin.

w8tcha avatar w8tcha commented on September 25, 2024

i added the current count to the editor you can get the current count via editorInstance.wordCount.charCount

from ckeditor-wordcount-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.