Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dvwd/paper-wysiwyg

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dvwd/paper-wysiwyg - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "@dvwd/paper-wysiwyg",
"description": "A minimalistic yet powerful VueJs WYSIWYG built on Tiptap 2, inspired by Outline Wiki",
"version": "1.0.2",
"version": "1.0.3",
"author": "Jeremy graham <mail@jez500.com>",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -6,2 +6,6 @@ # Paper Wysiwyg

## Demo
[See Paper WYSIWYG in action](https://jez500.github.io/paper-wysiwyg/)
## Install

@@ -39,21 +43,25 @@

## Building
## Styling
### Docker
### Import the CSS
```scss
@import '@dvwd/paper-wysiwyg/dist/styles.css';
```
If node is not installed but docker is, just use the helper scripts to run npm.
#### Overriding styles
#### Install dependencies
```bash
./node-docker.sh npm install
```
Most colours and styles you may want to change are CSS variables, have a look through [src/styles](src/styles),
specifically `_settings.scss`.
#### Build package (dist)
```bash
./node-docker.sh npm run build
Eg. Change the bubble menu background:
```css
::root {
--paper-wysiwyg-color-bubble-bg: #000;
}
```
#### Build demo
```bash
./node-docker.sh npm run build && ./node-docker.sh npm run build:demo
### Alternatively import the SCSS
```scss
@import '../node_modules/@dvwd/paper-wysiwyg/src/styles/all';
```

@@ -66,3 +74,3 @@

```javascript
<paper-wysiwyg upload-url="/post/backend/route"></paper-wysiwyg>
<paper-wysiwyg upload-url="/upload/image"></paper-wysiwyg>
```

@@ -101,2 +109,32 @@

});
```
```
## Building
### Docker
If node is not installed but docker is, just use the helper scripts to run npm. If node is installed,
just remove `./node-docker.sh` from below commands.
#### Install dependencies
```bash
./node-docker.sh npm install
```
#### Build package (dist)
```bash
./node-docker.sh npm run build
```
#### Build demo
```bash
./node-docker.sh npm run build && ./node-docker.sh npm run build:demo
```
## Who made this happen
* Created by [Jeremy Graham](https://jez.me)
* Everyone who contributed to [TipTap](https://github.com/ueberdosis/tiptap) and its plugins
* Authors of [Outline editor](https://github.com/outline/rich-markdown-editor)
* Table component by [Carl Bradshaw](https://github.com/carldawg)
* Skills provided by [Doghouse Agency](https://doghouse.agency/) and [District CMS](https://www.districtcms.com/)

@@ -26,3 +26,3 @@ import uploader from "./Extensions/WysiwygUpload"

{name: 'link', icon: 'link', label: 'Link', callback: 'setLink', key: '---'},
{name: 'image', icon: 'image', label: 'Image', callback: 'addImage', key: ''},
{name: 'image', icon: 'image', label: 'Image', callback: 'addImage', key: '', visibility: this.canUpload},
{name: 'table', icon: 'table', label: 'Table', method: 'insertTable', args: {rows: 3, cols: 3, withHeaderRow: true}, key: ''},

@@ -71,2 +71,10 @@ ],

/**
* Can upload an image.
*
* @returns {boolean}
*/
canUpload() {
return !! this.editor.options.editorProps.uploadUrl
},
/**
* Generic upload wrapper.

@@ -103,4 +111,14 @@ */

return ranges ? {from: ranges[0].$from.pos, to: ranges[0].$to.pos} : {from: 1, to: 1}
},
/**
* Is a given menu link visible.
*
* @param item
* @returns {boolean|*}
*/
itemVisible(item) {
if (typeof item.visibility === 'function') return item.visibility()
return item.visibility !== false;
}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc