The onInit function is used with users try to edit an existing document since we have to set the data prop with the editor initializes by running setContent(doc.document). We set the data prop in the CKEditor to set the value of the input of the rich text editor. We cannot do the same with CKEditor, so we write our own form handlers for the rich text editor. We wrap our React Bootstrap Form inside the Formik component to get the form handling function from Formik which we use directly in the React Bootstrap form fields. babelrc file in the backend folder and add: So that we run our app with Babel instead of the regular Node runtime. Īfter that we change the scripts section of package.json to have: "start": "nodemon -exec npm run babel-node. We install all of these by running npm i cors html-docx-js sequelize sqlite3 multer. ![]() We need Babel for run the app with the latest version of JavaScript, CORS for cross domain requests with front end, HTML-DOCX-JS for converting HTML strings to Word documents, Multer for file upload, Sequelize for ORM, and SQLite3 for our database. Then run npm i to install the packages Next we install our own packages. Then in the backend folder run npx express-generator to create the Express app. To start, we will create a project folder with the backend folder inside.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |