Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

74
Views
Sending content from TinyMCE to Airtable

I've implemented TinyMCE on an app I've created, and would like to have it submit the textarea's content to Airtable on button click. The thought process is: retrieve the textarea data, pull some basic information about the user and the Airtable table I'd like to write to, and then create a new record. I'm running into trouble getting the function up and running, though; can anyone take a look at the code below and see where I'm going wrong?

For reference, here's what I have so far:

Header

<script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/airtable@0.11.3/lib/airtable.umd.min.js"></script>
<script src="https://cdn.tiny.cloud/1/myapikeyhere/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<script>
      tinymce.init({
        selector: '#mytextarea',
        branding: false
      });
</script>

Body

<textarea id="mytextarea">Start typing here!</textarea><br><br>
<button onclick="sendtoAirtable()" class="button">Create Post</button>
 
<script src="https://requirejs.org/docs/release/2.3.5/minified/require.js"></script>
<script>
    function sendtoAirTable(){
        var data = tinymce.instances.mytextarea.getData();
        saveToAirTable(data);
    
        function saveToAirTable(data){
            var userId = window['logged_in_user']['airtable_record_id']
            var base = new Airtable({apiKey: 'myapikey'}).base('airtablebaseid');
        }
    
        base('tablename').create([
            {
               "fields": {
                  "Content":data,
                  "User": [
                     userId
                  ]
               }
            }
        ], function(err, records) {
            if (err) {
                 console.error(err);
                 return;
                }
         });
    }
</script>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!