Vaadin rich text editor html form to javascript file

Hello,
I am making a project where you can use the vaadin rich text editor to make a page and save it.
The editor sits inside a html form which action goes to a javascript file.
I am having problems to get the editor with in the javascript file is it because it doesn’t go with the form or is there a way?

my html code

			<form id="create-form" class="page-info" action="/api/newdata" method="post">
                <input type="text" name="title" placeholder="Title" id="title" required>
                <input type="text" name="description" placeholder="Description" id="description" required>
                <input type="text" name="tags" placeholder="Tags" id="tags" required>
                <vaadin-rich-text-editor name="content" class="page-creator" theme="compact" id="editor"></vaadin-rich-text-editor>
                <button type="submit" id="saveButton">Save</input>
            </form>

the javascript file

router.post('/', function (request, res, next) {
    const pathcontent = path.join(__dirname, '..', 'data', 'contents.json');
    let rawData = fs.readFileSync(pathcontent, 'utf8');
    let data = JSON.parse(rawData);
	fs.writeFile(pathcontent, JSON.stringify(data, null, 2), 'utf8', err => {
        if (err){
            throw err;
        }
    });
}

Regards,
Jesse