Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7030071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:37:18+00:00 2026-05-28T00:37:18+00:00

I need to validate a form. This form has some dropdowns and tinyMCE editor,

  • 0

I need to validate a form. This form has some dropdowns and tinyMCE editor, I am validating this form by appending the string “Required” after each field if it is blank, However I am unable to validate the tinyMCE editor, if the editor is blank, I tried something like

tinyMCE.get('tinyedotor').getContent();

but no luck.

here is my fiddle

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:37:19+00:00Added an answer on May 28, 2026 at 12:37 am

    getContent() should work just fine. Your fiddle doesn’t contain the form validation code for the editor value, which is quite crucial here. Try this:

    var editorContent = tinyMCE.get('tinyeditor').getContent();
    if (editorContent == '')
    {
        // Editor empty
    }
    else
    {
        // Editor contains a value
    }
    

    Forked fiddle

    Also note you’ve declared multiple id‘s for your select drop-down.

    Edit: You can get the id of the editor container with the getContainer() method: tinyMCE.get('tinyeditor').getContainer(). Inserting an error message after the editor would then be something like this:

    $('<span class="error">Editor empty</span>').insertAfter($(tinyMCE.get('tinyeditor').getContainer()));
    

    This, however, will create a new span each time the user clicks the submit button, so you’ll probably want to have an error message container with a unique id and check if the container already exists before inserting it.

    Edit 2: Updated fiddle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to validate that the text entered in a qlineedit has the form
I need to validate an XML string (and not a file) against a DTD
I need to validate this simple pick list: <select name=<%= key %>> <option value=ETC
I need to validate two user input fields against each other in seam. Field1
I'm new to Django, trying to process some forms. I have this form for
I m using jquery validator plugin. i need to validate some field with some
I have a form with set of dropdown fields, each of which has a
I have a registration form which I need to validate before submit. The form
I'm using this to validate my form and it is fine: $(document).ready(function() { $(#myform).validate();
Each form in the application has a set of radiobuttons. Once selected, only certain

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.