Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

75
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda