Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from "react";
// import 'react-quill/dist/quill.bubble.css';
import {
loadUserData,
} from 'blockstack';
import RemoteStorage from 'remotestoragejs';
import Widget from 'remotestorage-widget';
// import ImageResize from 'quill-image-resize-module';
// import axios from 'axios';
import QuillEditorPublic from '../QuillEditorPublic.js'; //this will render Yjs...
import QuillEditorPrivate from '../QuillEditorPrivate.js';
const wordcount = require("wordcount");
const { decryptECIES } = require('blockstack/lib/encryption');
const remoteStorage = new RemoteStorage({logging: false});
const widget = new Widget(remoteStorage);
export default class TestDoc extends Component {
componentDidMount() {
window.$('.modal').modal();
window.$('.dropdown-button').dropdown({
inDuration: 300,
outDuration: 225,
constrainWidth: false, // Does not change width of dropdown to that of the activator
hover: false, // Activate on hover
gutter: 0, // Spacing from edge
belowOrigin: false, // Displays dropdown below the button
alignment: 'left', // Displays dropdown with edge aligned to the left of button
stopPropagation: false // Stops event propagation
}
);
// import ImageResize from 'quill-image-resize-module';
// import TextEdit from '../TextEdit.js'; //this will render Yjs...
// import SummernotePublic from '../SummernotePublic.js'; //this will render Yjs...
import SummernotePublic from '../SummernotePublic.js'; //this will render Yjs...
// import ReactQuillTextEditor from '../ReactQuillTextEditor.js';
import Timer from '../Timer.js'; //trying this...
import axios from 'axios';
const wordcount = require("wordcount");
// const Font = ReactQuill.Quill.import('formats/font');
const { encryptECIES } = require('blockstack/lib/encryption');
const { decryptECIES } = require('blockstack/lib/encryption');
const { getPublicKeyFromPrivate } = require('blockstack');
const remoteStorage = new RemoteStorage({logging: false});
const widget = new Widget(remoteStorage);
// Font.whitelist = ['Roboto', 'Lato', 'Open Sans', 'Montserrat'] ; // allow ONLY these fonts and the default
// ReactQuill.Quill.register(Font, true);
// Quill.register('modules/imageResize', ImageResize);
function getMonthDayYear() {
const today = new Date();
const day = today.getDate();
const month = today.getMonth() + 1;
const year = today.getFullYear();
const monthDayYear = month + "/" + day + "/" + year;
return monthDayYear
}
//this function is for TextEdit...
function strip(html) {