Skip to content

Instantly share code, notes, and snippets.

View rethna2's full-sized avatar

Rethna Ganesh rethna2

View GitHub Profile
@johanneslumpe
johanneslumpe / callModifierForSelectedBlocks.js
Last active February 23, 2022 13:54
Draft.js utilities to inspect/modify selected block ranges
import { EditorState, SelectionState } from 'draft-js';
import getSelectedBlocks from './getSelectedBlocks';
/**
* Calls a provided `modifier` function with a selection for each
* selected block in the current editor selection. Passes through additional
* arguments to the modifier.
*
* Note: At the moment it will retain the original selection and override
@rethna2
rethna2 / spa.html
Created July 27, 2018 05:18
A minimal prototype of Single Page Application (SPA)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SPA - demo</title>
<style>
.page {
@rethna2
rethna2 / pathFinder_part1.html
Created July 21, 2019 07:39
Display Maze based on the input
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title></title>
<style>
#inputArr{
width: 300px;
height: 200px;