index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/CharCounter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/CharCounter/__test__/index.test.tsx | import React from 'react';
import { screen, render } from '@testing-library/react';
import { PluginFunctions } from '@draft-js-plugins/editor';
import { EditorState, ContentState } from 'draft-js';
import createCounterPlugin from '../../index';
jest.mock('linaria');
describe('CounterPlugin Character Counter', () => {... | 3,300 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/CustomCounter/index.tsx | import React, { ReactElement } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { CounterPluginTheme } from '../theme';
import { CounterPluginStore } from '..';
export interface CustomCounterPubProps {
limit?: number;
countFunction(text: string): number;
className?: string;
}
in... | 3,301 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/CustomCounter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/CustomCounter/__test__/index.test.tsx | import React from 'react';
import { screen, render } from '@testing-library/react';
import { EditorState, ContentState } from 'draft-js';
import { PluginFunctions } from '@draft-js-plugins/editor';
import createCounterPlugin from '../../index';
jest.mock('linaria');
describe('CounterPlugin Line Counter', () => {
co... | 3,302 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/LineCounter/index.tsx | import React, { ReactElement } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { EditorState } from 'draft-js';
import { CounterPluginTheme } from '../theme';
import { CounterPluginStore } from '..';
export interface LineCounterPubParams {
limit?: number;
className?: string;
}
in... | 3,303 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/LineCounter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/LineCounter/__test__/index.test.tsx | import React from 'react';
import { screen, render } from '@testing-library/react';
import { EditorState, ContentState } from 'draft-js';
import { PluginFunctions } from '@draft-js-plugins/editor';
import createCounterPlugin from '../../index';
jest.mock('linaria');
describe('CounterPlugin Line Counter', () => {
co... | 3,304 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/WordCounter/index.tsx | import React, { ReactElement } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { EditorState } from 'draft-js';
import { CounterPluginTheme } from '../theme';
import { CounterPluginStore } from '..';
export interface WordCounterPubParams {
className?: string;
limit?: number;
}
in... | 3,305 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/WordCounter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/counter/src/WordCounter/__test__/index.test.tsx | import React from 'react';
import { screen, render } from '@testing-library/react';
import { EditorState, ContentState } from 'draft-js';
import { PluginFunctions } from '@draft-js-plugins/editor';
import createCounterPlugin from '../../index';
jest.mock('linaria');
describe('CounterPlugin Word Counter', () => {
co... | 3,306 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/CHANGELOG.md | # Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## To Be Released
## 4.1.3
- adjust react peer dependency
## 4.1.2
- support react 18 in peer dependencies [#2701](https://github.com/draft-js-plugins/draft-js-plugi... | 3,307 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/README.md | # DraftJS Divider Plugin
_This is a plugin for the `@draft-js-plugins/editor`._
## Usage
see https://www.draft-js-plugins.com/plugin/divider
| 3,308 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/jest.config.js | const base = require('../../jest.config.base.js');
const packageName = require('./package').name;
module.exports = {
...base,
displayName: packageName,
name: packageName,
};
| 3,309 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/package.json | {
"name": "@draft-js-plugins/divider",
"version": "4.1.3",
"sideEffects": ["*.css"],
"description": "Divider Plugin for DraftJS",
"author": {
"name": "Ilkwon Sim",
"email": "simsim0709@gmail.com"
},
"repository": {
"type": "git",
"url": "https://github.com/draft-js-plugins/draft-js-plugins... | 3,310 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/tsconfig.json | {
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "lib"
},
"include": ["src"]
}
| 3,311 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src/index.tsx | import React, { ComponentType, ReactElement } from 'react';
import { EditorPlugin } from '@draft-js-plugins/editor';
import DefaultDivider, {
DefaultDividerProps,
} from './components/DefaultDivider';
import DefaultButton, {
DividerButtonProps,
DividerButtonPubProps,
} from './components/DividerButton';
import ad... | 3,312 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src/theme.ts | import { css } from 'linaria';
export interface DividerPluginTheme {
divider?: string;
}
export const defaultTheme = {
divider: css`
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
margin: 32px 0;
border: none; /* strip default hr styling */
... | 3,313 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src/components/DefaultDivider.tsx | import React, { ReactElement } from 'react';
import clsx from 'clsx';
import { DividerPluginTheme } from '../theme';
export interface DefaultDividerProps
extends React.HTMLAttributes<HTMLHRElement> {
className?: string;
theme?: DividerPluginTheme;
//removed types
block: unknown;
blockProps: unknown;
cust... | 3,314 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src/components/DividerButton.tsx | import React, { MouseEvent, ReactElement } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { EditorState } from 'draft-js';
export interface DividerButtonTheme {
buttonWrapper: string;
button: string;
active: string;
}
export interface DividerButtonPubProps {
theme?: DividerB... | 3,315 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src | petrpan-code/draft-js-plugins/draft-js-plugins/packages/divider/src/modifiers/addDivider.ts | import { EditorState, AtomicBlockUtils } from 'draft-js';
export default function addDivider(entityType: string) {
return (
editorState: EditorState,
data?: Record<string, unknown>
): EditorState => {
const contentState = editorState.getCurrentContent();
const contentStateWithEntity = contentState.... | 3,316 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/README.md | # DraftJS Plugins Docs

High quality plugins with great UX on top of [DraftJS](https://github.com/facebook/draft-js).
## Development
You must have [Node.js v5](https://nodejs.org/en/download/package-manager/) or later installed... | 3,317 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/env.d.ts | declare module '!!raw-loader!*' {
const contents: string;
export default contents;
}
| 3,318 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/next-env.d.ts | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
| 3,319 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/next.config.js | module.exports = {
eslint: {
// disable eslint checkt during next.js build as we are already check on regular builds
ignoreDuringBuilds: true,
},
};
| 3,320 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/package.json | {
"name": "@draft-js-plugins/docs",
"version": "4.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "exit 0",
"build:gh-pages": "next build",
"start": "next start",
"deploy:gh-pages": "rm -rf node_modules/.cache && next build && next export && touch out/.nojekyll && git add out... | 3,321 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/tsconfig.json | {
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolut... | 3,322 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/EditOnGithub.tsx | import React, { ReactElement } from 'react';
interface EditOnGithubProps {
filePath: string;
}
export default function EditOnGithub({
filePath,
}: EditOnGithubProps): ReactElement {
const editUrl = `https://github.com/draft-js-plugins/draft-js-plugins/edit/master/${filePath}`;
return (
// eslint-disable-n... | 3,323 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/AlternateContainer/AlternateContainer.module.css | .root {
border-bottom: 1px solid #eee;
padding-bottom: 3rem;
background: #F8FAFA;
}
| 3,324 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/AlternateContainer/AlternateContainer.tsx | import React, { ReactElement, ReactNode } from 'react';
import clsx from 'clsx';
import styles from './AlternateContainer.module.css';
import ContainerBox from '../ContainerBox/ContainerBox';
interface AlternateContainerProps {
className?: string;
children: ReactNode;
}
export default function AlternateContainer(... | 3,325 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Code/Code.module.css | .root {
position: relative;
margin-bottom: 2rem;
}
.root code {
font-family: 'Inconsolata';
}
.name {
position: absolute;
top: 0;
right: 0;
background: #f6f6f6;
border-bottom: 1px solid #ddd;
border-left: 1px solid #ddd;
border-bottom-left-radius: 4px;
padding: 0.25rem 1rem;
color: #888;
fon... | 3,326 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Code/Code.tsx | /* eslint-disable react/no-danger */
import React, { ReactElement } from 'react';
import clsx from 'clsx';
import 'prismjs/themes/prism.css';
import styles from './Code.module.css';
interface CodeProps {
code: string;
className?: string;
name?: string;
}
export default function Code({
code,
className,
na... | 3,327 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Container/Container.module.css | .root {
border-bottom: 1px solid #eee;
padding-bottom: 3rem;
}
| 3,328 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Container/Container.tsx | import React, { ReactElement, ReactNode } from 'react';
import clsx from 'clsx';
import styles from './Container.module.css';
import ContainerBox from '../ContainerBox/ContainerBox';
interface ContainerProps {
className?: string;
children: ReactNode;
}
export default function Container({
className,
children,
... | 3,329 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/ContainerBox/ContainerBox.module.css | .root {
min-width: 300px;
max-width: 640px;
margin: 0 auto;
padding-left: 15px;
padding-right: 15px;
}
| 3,330 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/ContainerBox/ContainerBox.tsx | import React, { ReactElement, ReactNode } from 'react';
import styles from './ContainerBox.module.css';
interface ContainerBoxProps {
children: ReactNode;
}
export default function ContainerBox({
children,
}: ContainerBoxProps): ReactElement {
return <div className={styles.root}>{children}</div>;
}
| 3,331 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,332 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/SimpleAlignmentEditor/colorBlockPlugin.js | import React from 'react';
const ColorBlock = React.forwardRef(
(
{
block, // eslint-disable-line no-unused-vars
blockProps, // eslint-disable-line no-unused-vars
customStyleMap, // eslint-disable-line no-unused-vars
customStyleFn, // eslint-disable-line no-unused-vars
decorator, //... | 3,333 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/SimpleAlignmentEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ababab;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
.... | 3,334 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/SimpleAlignmentEditor/index.js | import React, { Component } from 'react';
import {
convertFromRaw,
DefaultDraftBlockRenderMap,
EditorState,
} from 'draft-js';
import Immutable from 'immutable';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createAlignmentPlugin from '@draft-js-plugins/alignment';
import createF... | 3,335 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/ThemedAlignmentEditor/alignmentToolStyles.module.css | .alignmentTool {
left: 50%;
transform: translate(-50%) scale(0);
position: absolute;
border: 1px solid #111;
background: #333;
border-radius: 4px;
box-shadow: 0px 1px 3px 0px rgba(220, 220, 220, 1);
z-index: 2;
box-sizing: border-box;
}
.alignmentTool:after,
.alignmentTool:before {
top: 100%;
lef... | 3,336 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/ThemedAlignmentEditor/buttonStyles.module.css | .buttonWrapper {
display: inline-block;
}
.button {
background: #333;
color: #ddd;
font-size: 18px;
border: 0;
padding-top: 5px;
vertical-align: bottom;
height: 34px;
width: 36px;
border-radius: 4px;
}
.button svg {
fill: #ddd;
}
.button:hover,
.button:focus {
background: #444;
outline: 0; ... | 3,337 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/ThemedAlignmentEditor/colorBlockPlugin.js | import React from 'react';
const ColorBlock = React.forwardRef(
(
{
block, // eslint-disable-line no-unused-vars
blockProps, // eslint-disable-line no-unused-vars
customStyleMap, // eslint-disable-line no-unused-vars
customStyleFn, // eslint-disable-line no-unused-vars
decorator, //... | 3,338 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/ThemedAlignmentEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ababab;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
.... | 3,339 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/alignment/ThemedAlignmentEditor/index.js | import React, { Component } from 'react';
import {
convertFromRaw,
DefaultDraftBlockRenderMap,
EditorState,
} from 'draft-js';
import Immutable from 'immutable';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createAlignmentPlugin from '@draft-js-plugins/alignment';
import createFocu... | 3,340 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createLinkPlugin from '@draft-js-plugins/anchor';
import createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';
import {
ItalicButton,
BoldButton,
UnderlineButton,
} from '@draft-js-plu... | 3,341 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/CustomInlineToolbarEditor/buttonStyles.module.css | .buttonWrapper {
display: inline-block;
}
.button {
background: #333;
color: #ddd;
font-size: 18px;
border: 0;
padding-top: 5px;
vertical-align: bottom;
height: 34px;
width: 36px;
border-radius: 4px;
}
.button svg {
fill: #ddd;
}
.button:hover, .button:focus {
background: #444;
outline: 0; ... | 3,342 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/CustomInlineToolbarEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,343 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/CustomInlineToolbarEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';
import createLinkPlugin from '@draft-js-plugins/anchor';
import {
ItalicButton,
BoldButton,
UnderlineButton,
} from '@dr... | 3,344 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/CustomInlineToolbarEditor/linkStyles.module.css | .input {
height: 34px;
width: 220px;
padding: 0 12px;
font-size: 15px;
font-family: inherit;
background-color: transparent;
border: none;
color: #ddd;
}
.input:focus {
outline: none;
}
.input::placeholder {
color: #aaa;
}
.inputInvalid {
color: #e65757;
}
.link {
color: #2996da;
text-decor... | 3,345 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/CustomInlineToolbarEditor/toolbarStyles.module.css | .toolbar {
left: 50%;
transform: translate(-50%) scale(0);
position: absolute;
border: 1px solid #111;
background: #333;
border-radius: 4px;
box-shadow: 0px 1px 3px 0px rgba(220,220,220,1);
z-index: 2;
box-sizing: border-box;
}
.toolbar:after, .toolbar:before {
top: 100%;
left: 50%;
border: sol... | 3,346 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/SimpleLinkPluginEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,347 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/anchor/SimpleLinkPluginEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';
import createLinkPlugin from '@draft-js-plugins/anchor';
import {
ItalicButton,
BoldButton,
UnderlineButton,
} from '@dr... | 3,348 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createCounterPlugin from '@draft-js-plugins/counter';
import React from 'react';
// Creates an Instance. At this step, a configuration object can be passed in
// as an argument.
const counterPlugin = cr... | 3,349 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,350 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/CustomCounterEditor/counterStyles.module.css | .counter {
color: white;
background-color: #353535;
display: inline-block;
min-width: 50px;
border-radius: 10px;
padding: 2px;
text-align: center;
margin-bottom: 5px;
}
.counterOverLimit {
color: tomato;
background-color: #353535;
display: inline-block;
min-width: 50px;
border-radius: 10px;
... | 3,351 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/CustomCounterEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,352 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/CustomCounterEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createCounterPlugin from '@draft-js-plugins/counter';
import editorStyles from './editorStyles.module.css';
import counterStyles from './counterStyles.module.css';
const theme = {
counter: c... | 3,353 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/SimpleCounterEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,354 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/counter/SimpleCounterEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createCounterPlugin from '@draft-js-plugins/counter';
import editorStyles from './editorStyles.module.css';
const counterPlugin = createCounterPlugin();
const { CharCounter, WordCounter, LineC... | 3,355 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createDividerPlugin from '@draft-js-plugins/divider';
import React from 'react';
const dividerPlugin = createDividerPlugin();
// The Editor accepts an array of plugins. In this case, only the divider... | 3,356 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,357 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider/DividerWithSideToolbarEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,358 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/divider/DividerWithSideToolbarEditor/index.js | import React, { Component } from 'react';
import { convertFromRaw, EditorState } from 'draft-js';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createFocusPlugin from '@draft-js-plugins/focus';
import createSideToolbarPlugin from '@draft-js-plugins/side-toolbar';
import createDividerPlug... | 3,359 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import React from 'react';
const imagePlugin = createImagePlugin();
// The Editor accepts an array of plugins. In this case, only the imagePlugin
// ... | 3,360 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,361 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop/CustomImageEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,362 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/drag-n-drop/CustomImageEditor/index.js | import React, { Component } from 'react';
import { convertFromRaw, EditorState } from 'draft-js';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import createFocusPlugin from '@draft-js-plugins/focus';
import createBlockDndPlugin from '... | 3,363 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createEmojiPlugin from '@draft-js-plugins/emoji';
import React from 'react';
// Creates an Instance. At this step, a configuration object can be passed in
// as an argument.
const emojiPlugin = createEm... | 3,364 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,365 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/CustomEmojiEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 2em;
}
| 3,366 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/CustomEmojiEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createEmojiPlugin from '@draft-js-plugins/emoji';
import editorStyles from './editorStyles.module.css';
const emojiPlugin = createEmojiPlugin({
useNativeArt: true,
});
const { EmojiSuggestio... | 3,367 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/SimpleEmojiEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,368 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/emoji/SimpleEmojiEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createEmojiPlugin from '@draft-js-plugins/emoji';
import editorStyles from './editorStyles.module.css';
const emojiPlugin = createEmojiPlugin();
const { EmojiSuggestions, EmojiSelect } = emoji... | 3,369 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,370 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus/SimpleFocusEditor/colorBlockPlugin.js | import React from 'react';
const ColorBlock = React.forwardRef(
(
{
block, // eslint-disable-line no-unused-vars
blockProps, // eslint-disable-line no-unused-vars
customStyleMap, // eslint-disable-line no-unused-vars
customStyleFn, // eslint-disable-line no-unused-vars
decorator, //... | 3,371 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus/SimpleFocusEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,372 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/focus/SimpleFocusEditor/index.js | import React, { Component } from 'react';
import { convertFromRaw, EditorState } from 'draft-js';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createFocusPlugin from '@draft-js-plugins/focus';
import createColorBlockPlugin from './colorBlockPlugin';
import editorStyles from './editorSt... | 3,373 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createHashtagPlugin from '@draft-js-plugins/hashtag';
import React from 'react';
// Creates an Instance. At this step, a configuration object can be passed in
// as an argument.
const hashtagPlugin = cr... | 3,374 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,375 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/CustomHashtagEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,376 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/CustomHashtagEditor/hashtagStyles.module.css | .hashtag {
color: #1CA782;
font-family: cursive;
}
| 3,377 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/CustomHashtagEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createHashtagPlugin from '@draft-js-plugins/hashtag';
import editorStyles from './editorStyles.module.css';
import hashtagStyles from './hashtagStyles.module.css';
const hashtagPlugin = create... | 3,378 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/SimpleHashtagEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,379 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/hashtag/SimpleHashtagEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createHashtagPlugin from '@draft-js-plugins/hashtag';
import editorStyles from './editorStyles.module.css';
const hashtagPlugin = createHashtagPlugin();
const plugins = [hashtagPlugin];
const ... | 3,380 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import React from 'react';
const imagePlugin = createImagePlugin();
// The Editor accepts an array of plugins. In this case, only the imagePlugin
// ... | 3,381 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,382 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,383 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor/index.js | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import ImageAdd from './ImageAdd';
import editorStyles from './editorStyles.module.css';
const imagePlugin = createImagePlugin();
const plu... | 3,384 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor/ImageAdd/index.js | import React, { Component } from 'react';
import styles from './styles.module.css';
export default class ImageAdd extends Component {
// Start the popover closed
state = {
url: '',
open: false,
};
// When the popover is open and users click anywhere on the page,
// the popover should close
compone... | 3,385 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/AddImageEditor/ImageAdd/styles.module.css | .addImage {
background: #FFF;
display: inline-block;
}
.addImagePopover {
margin-top: 10px;
background: #FFF;
position: absolute;
height: 54px;
width: 300px;
border-radius: 2px;
padding: 10px;
box-shadow: 0px 4px 30px 0px rgba(220,220,220,1);
z-index: 1000;
}
.addImageClosedPopover {
display: ... | 3,386 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/CustomImageEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,387 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/CustomImageEditor/index.js | import React, { Component } from 'react';
import { convertFromRaw, EditorState } from 'draft-js';
import Editor, { composeDecorators } from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import createAlignmentPlugin from '@draft-js-plugins/alignment';
import createFocusPlugin f... | 3,388 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/CustomImageEditor/mockUpload.js | import { readFile } from '@draft-js-plugins/drag-n-drop-upload';
/*
*
* @name: mockUpload
* @desc: Custom file upload function. Simulates a file upload.
* @param {[File], formData} data: consists of an array of files that have been uploaded and a formData object composed of those same files.
* @param {function([{name:... | 3,389 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/SimpleImageEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.options {
margin-bottom: 20px;
}
| 3,390 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/image/SimpleImageEditor/index.js | import React, { Component } from 'react';
import { convertFromRaw, EditorState } from 'draft-js';
import Editor from '@draft-js-plugins/editor';
import createImagePlugin from '@draft-js-plugins/image';
import editorStyles from './editorStyles.module.css';
const imagePlugin = createImagePlugin();
const plugins = [ima... | 3,391 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/gettingStarted.js | // It is important to import the Editor which accepts plugins.
import Editor from '@draft-js-plugins/editor';
import createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';
import React from 'react';
// Creates an Instance. At this step, a configuration object can be passed in
// as an argument.
const inlin... | 3,392 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/webpackConfig.js | module.exports = {
module: {
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
};
| 3,393 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/CustomInlineToolbarEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
.headlineButtonWrapper {
display: in... | 3,394 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/CustomInlineToolbarEditor/index.js | /* eslint-disable react/no-multi-comp */
import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createInlineToolbarPlugin, {
Separator,
} from '@draft-js-plugins/inline-toolbar';
import {
ItalicButton,
BoldButton,
UnderlineButton,
CodeB... | 3,395 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/SimpleInlineToolbarEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,396 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/SimpleInlineToolbarEditor/index.tsx | import React, {
ReactElement,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import { EditorState } from 'draft-js';
import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor';
import createInlineToolbarPlugin from '@draft-js-plugins/inline-toolbar';
import editorStyles from './editor... | 3,397 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/ThemedInlineToolbarEditor/buttonStyles.module.css | .buttonWrapper {
display: inline-block;
}
.button {
background: #333;
color: #ddd;
font-size: 18px;
border: 0;
padding-top: 5px;
vertical-align: bottom;
height: 34px;
width: 36px;
border-radius: 4px;
}
.button svg {
fill: #ddd;
}
.button:hover, .button:focus {
background: #444;
outline: 0; ... | 3,398 |
0 | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar | petrpan-code/draft-js-plugins/draft-js-plugins/packages/docs/components/Examples/inline-toolbar/ThemedInlineToolbarEditor/editorStyles.module.css | .editor {
box-sizing: border-box;
border: 1px solid #ddd;
cursor: text;
padding: 16px;
border-radius: 2px;
margin-bottom: 2em;
box-shadow: inset 0px 1px 8px -3px #ABABAB;
background: #fefefe;
}
.editor :global(.public-DraftEditor-content) {
min-height: 140px;
}
| 3,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.