There are four options for creating a custom blot:
---------------+-------+
Inline | Block |
---------------+-------+
Embed |
---------------+-------+
Text |
/** | |
* we are going to upload file to s3 via node js by using | |
* aws-sdk - required | |
* busboy - required | |
* uuid - optional - for image renaming purpose | |
* with this library you can upload any kind of file to s3 via node js. | |
*/ | |
const AWS = require('aws-sdk'); | |
const UUID = require('uuid/v4'); |
const Moment = require('moment'); | |
const MomentRange = require('moment-range'); | |
require('moment-recur'); | |
export const moment = MomentRange.extendMoment(Moment); | |
export const DAY_SLOT = 'day' | |
export const HOUR_SLOT = 'hour' | |
export const SECOND_SLOT = 'second' |
{ | |
"so_SO":"Af-Soomaali", | |
"af_ZA":"Afrikaans", | |
"az_AZ":"Azərbaycan dili", | |
"id_ID":"Bahasa Indonesia", | |
"ms_MY":"Bahasa Melayu", | |
"jv_ID":"Basa Jawa", | |
"cx_PH":"Bisaya", | |
"bs_BA":"Bosanski", | |
"br_FR":"Brezhoneg", |
/** | |
* This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from | |
* a base64 string. | |
* Updated to use Promise (bluebird) | |
* Web: https://mayneweb.com | |
* | |
* @param {string} base64 Data | |
* @return {string} Image url | |
*/ | |
const imageUpload = async (base64) => { |
-- Retrieve descendants | |
-- ==================== | |
-- retrieve descendants of #4 | |
SELECT c.* | |
FROM Comments AS c | |
JOIN TreePaths AS t ON c.comment_id = t.descendant | |
WHERE t.ancestor = 4; | |
-- Retrieve ancestors |
// traditional way of writing code | |
const router = require('express').Router(); | |
router.get('/check', check); | |
module.exports = router; | |
async function check(req, res) { | |
someOtherFunction().then((a) => { | |
somethingElseFunction().then((b) => { | |
res.status(200).json({a: a, b: b}); | |
}).catch((error) => { |
import React from 'react' | |
import { BrowserRouter as Router, Switch } from 'react-router-dom' | |
import routes from './routes' | |
import FancyRoute from './components/tools/FancyRoute' | |
const App = props => | |
<Router> | |
<Switch> | |
{routes.map((route, i) => | |
<FancyRoute key={i} {...route} /> |
import Quill from 'quill'; | |
import {TaskerFigure} from './TaskerFigure'; | |
import Parchment from 'parchment'; | |
export class FigureOptions { | |
quill: Quill; | |
figure; | |
overlay; | |
linkRange; |
⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates
What this will cover
www.website.com
to website.com
index.html
)