All Projects → aem → docs-soap

aem / docs-soap

Licence: ISC License
Library to clean up the clipboard contents generated by google docs

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to docs-soap

Google-Docs-for-Mac
Native Google Docs app for Mac
Stars: ✭ 33 (+94.12%)
Mutual labels:  google-docs
draftjs-filters
Filter Draft.js content to preserve only the formatting you allow
Stars: ✭ 53 (+211.76%)
Mutual labels:  draft-js
rich-editor
A react editor component based on draftjs.
Stars: ✭ 15 (-11.76%)
Mutual labels:  draft-js
wagtaildraftail
🐦📝🍸 Draft.js editor for Wagtail, built upon Draftail and draftjs_exporter
Stars: ✭ 23 (+35.29%)
Mutual labels:  draft-js
draftjs exporter
Library to convert Draft.js ContentState to HTML
Stars: ✭ 77 (+352.94%)
Mutual labels:  draft-js
alice-docs
A simple and quick publishing framework utilizing Google Docs
Stars: ✭ 14 (-17.65%)
Mutual labels:  google-docs
React Text Selection Popover
Selection based Text UI made easy
Stars: ✭ 245 (+1341.18%)
Mutual labels:  draft-js
google-docs-mustaches
📝Interpolate Google Docs files using mustaches and formatters
Stars: ✭ 23 (+35.29%)
Mutual labels:  google-docs
bangle.dev
Collection of higher level rich text editing tools. It powers the local only note taking app https://bangle.io
Stars: ✭ 541 (+3082.35%)
Mutual labels:  draftjs
gdrive-dl
Download and sync Google Drive files and folders without account
Stars: ✭ 15 (-11.76%)
Mutual labels:  google-docs
downwrite
✍️ Markdown writing application that's down right, neat.
Stars: ✭ 103 (+505.88%)
Mutual labels:  draft-js
draft-js-katex-plugin
A Katex plugin for DraftJS.
Stars: ✭ 33 (+94.12%)
Mutual labels:  draft-js
Google-Docs-Desktop-OSX
A Super Simple Google Docs Desktop Client for Mac OSX Built in Javascript and MacGap
Stars: ✭ 35 (+105.88%)
Mutual labels:  google-docs
docs-vim
Use Google Docs like vim. Sorta.
Stars: ✭ 88 (+417.65%)
Mutual labels:  google-docs
Eorg
new version: https://github.com/SoftMaple/Editor
Stars: ✭ 27 (+58.82%)
Mutual labels:  draft-js
Draft Js Markdown Shortcuts Plugin
A DraftJS plugin for supporting Markdown syntax shortcuts
Stars: ✭ 252 (+1382.35%)
Mutual labels:  draft-js
google docs-ruby
A library which allows you to edit your spreadsheets with pleasure
Stars: ✭ 18 (+5.88%)
Mutual labels:  google-docs
draftjs-conductor
📝✨ Little Draft.js helpers to make rich text editors “just work”
Stars: ✭ 39 (+129.41%)
Mutual labels:  draft-js
asciidoc-googledocs-addon
Export Google Docs as AsciiDoc
Stars: ✭ 55 (+223.53%)
Mutual labels:  google-docs
graphql-blog-client
🚀 React Apollo client for a GraphQL blog.
Stars: ✭ 15 (-11.76%)
Mutual labels:  draft-js

docs-soap Build Status npm version codecov

docs-soap is a small (1.5kb minified/gzipped), simple library that can be used to transform clipboard contents from Google Docs into readable HTML. This library was born from the need to parse clipboard content from Google Docs into a DraftJS Rich Text Editor and fits nicely into Draft's handlePastedText hook.

This project was developed for use in a client-side project. To use in a Node environment, your project will also require jsdom-global.

New in 1.2.1

  • Comment are stripped from output. Fixes bug when pasting on Windows.

Exported API

module.exports = {
  default: docsSoap,
  docsSoap,
  parseHTML
};

Testing

Tests are written in Mocha, using expect for assertions. npm run test will run all tests in the test/ directory, allowing you to test the entire library's functionality at once. All contributions to the repository are expected to contain accompanying tests.

In the examples/ directory, there's a simple HTML example that, after running npm run build in the project root, can be used to test your changes or just see the library in action.

Installation

ESM

yarn add docs-soap
import docsSoap from 'docs-soap';

CommonJS

yarn add docs-soap
const docsSoap = require('docs-soap').default;

Script tag

<script src="https://unpkg.com/[email protected]/dist/docs-soap.min.js"></script>
var docsSoap = window.docsSoap;

Usage

const html =
  '<body id="docs-internal-guid-1234"><b><span style="font-weight:700">bold text</span><span style="font-style:italic">some italic text</span></b></body>';
const clean = docsSoap(html);
console.log(
  clean
); /* "<body><strong>some bold text</strong><i>some italic text</i></body>" */
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].