question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, @JiHong88 Editor very good

I used editor.getContents(); to validators to get text values to receive notifications, but in this case it gets the whole code of textarea instead of key text. Only get text, is there any method to do that, I’m using formvalidation. Take a look at the code and look through the link below for info. Thanks in advance.

            "post[content2]": {
                validators: {
                    callback: {
                        message: 'The contents must be between 5 and 2000 characters long',
                        callback: function(value) {
                            // Get the plain text without HTML
                            const text = editor.getContents({
                                //format: 'text'
                            });
                            return text.length <= 2000 && text.length >= 5;
                        }
                    }		
                }
            }

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
anhdoantmcommented, Jul 8, 2020

they only work on github or gitee, you need to report to the website vendors that they operate, cssscript also needs to report, they are long-standing websites or large storage places for code and they will stop working action. What worries me is that they bring viruses into these software, if that is very dangerous, we do not know what their purpose is. I have downloaded it and have deleted it now.

0reactions
JiHong88commented, Jul 12, 2020

The 2.31.1 version has been updated. If this issue has not been resolved, please reopen this issue. Thank you.

PS: The lack of other attributes in editor is that something is wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NetSuite Applications Suite - File.getContents()
//Add additional code ... var fileObj = file.load({ id: 145 }); if (fileObj.size < 10485760){ fileObj.getContents(); } ... //Add additional code ...
Read more >
GetContents Method (ConsoleWindow) - Micro Focus
Returns the contents of the console. Syntax. lsContents = consoleWindow .GetContents ([ sItemIdentifier ]). Variable, Description ...
Read more >
getContents (NotesStream - JavaScript)
Represents a stream of binary or character data. The stream can be associated with a file. getContents (NotesStream - JavaScript™). Copies stream contents...
Read more >
GetContent - Amazon Connect Wisdom - AWS Documentation
Retrieves content, including a pre-signed URL to download the content.
Read more >
Help getContents · Issue #435 · JiHong88/suneditor - GitHub
I used editor.getContents(); to validators to get text values to receive notifications, but in this case it gets the whole code of textarea ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found