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 Widget from 'remotestorage-widget';
// 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...
connect() {
this.rs = new RemoteStorage({cache: false});
this.rs.access.claim('encryptic', 'rw');
this.rs.on('authing', () => this.onRSAuth());
this.rs.on('error', err => this.onRSError(err));
this.rs.connect(this.ui.address.val().trim());
}
constructor(configs) {
this.address = configs.remotestorageAddress;
this.token = configs.remotestorageToken;
/**
* RemoteStorage instance
*
* @prop {Object}
*/
this.rs = new RemoteStorage({modules: [Module], cache: false});
this.rs.access.claim('encryptic', 'rw');
this.rs.on('disconnected', () => {
delete this.rs;
});
}
import * as RemoteStoragePackage from 'remotestoragejs';
const RemoteStorage = RemoteStoragePackage.default || RemoteStoragePackage;
export const LCHStorageClientForModules = function (modules) {
let remoteStorage = new RemoteStorage({
modules: modules,
});
let outputData = {};
outputData.remoteStorage = remoteStorage;
modules.forEach(function (e) {
remoteStorage.access.claim(e.name, 'rw');
remoteStorage.caching.enable(`/${ e.name }/`);
outputData[e.name] = remoteStorage[e.name];