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

127
Views
Sending a request from react to express using CKEDITOR 5

import React, { Component, useState,useEffect } from 'react';
import { CKEditor } from '@ckeditor/ckeditor5-react';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import axios from 'axios';
import parse from 'html-react-parser';
import load from './fun_load';

function App () {
const [Data,setData]=useState('');
const handleChange=(event,editor)=>{
 setData(editor.getData());
}
  const handleClick=async()=>{
    console.log(Data);
    let res=await axios.post("/send",Data);
    console.log(res);
   
  }
  useEffect(() => {
    // load();
  },)
  
            return (
            <div className="Ap">
                <h2>Using CKEditor 5 build in React</h2>
                <CKEditor
                    editor={ ClassicEditor }
                    onChange={ ( event, editor ) => {
                     handleChange(event,editor)
                  } }
                />
                
                <button type='submit' onClick={handleClick}>Submit</button>
                {
                Data===""?
                <div>Fun</div>:
                <div style={{ marginLeft:'0px' }}>{parse(Data)}</div>
                }
                
            </div>
        );
    }


export default App;
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.6.3/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.6.3/umd/react-dom.production.min.js"></script>

When i send request using Axios for example a paragraph ABCd in backend in when i did req.body the body was={ABCd :''} why is there a colon and it is after ever tag

this is just gibberish so that question gets posted:

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As axios expects an object in post data

let res=await axios.post("/send",{Data});
about 4 years ago · Juan Pablo Isaza Report
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!