Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@dvwd/paper-wysiwyg
Advanced tools
A minimalistic yet powerful VueJs WYSIWYG built on Tiptap 2, inspired by Outline Wiki
A minimalistic yet powerful VueJS 2 WYSIWYG, built on TipTap 2 and inspired by Outline wiki
npm install @dvwd/paper-wysiwyg
@todo make optional
<template>
<paper-wysiwyg v-model="content"></paper-wysiwyg>
</template>
<script>
import PaperWysiwyg from "@dvwd/paper-wysiwyg"
export default {
components: { PaperWysiwyg },
data() {
return {
content: '<p>Hello world</p>',
}
}
}
</script>
@import '@dvwd/paper-wysiwyg/dist/styles.css';
Most colours and styles you may want to change are CSS variables, have a look through src/styles,
specifically _settings.scss
.
Eg. Change the bubble menu background:
::root {
--paper-wysiwyg-color-bubble-bg: #000;
}
@import '../node_modules/@dvwd/paper-wysiwyg/src/styles/all';
To enable uploads, you just have to add a upload-url
prop. Eg
<paper-wysiwyg upload-url="/upload/image"></paper-wysiwyg>
The upload route should return JSON array of saved file paths.
<?php
Route::post('/upload/image', function(Request $request) {
$files = [];
if ($request->hasFile('images')) {
$uploadedFiles = $request->file('images');
foreach ($uploadedFiles as $file) {
if (! $file->isValid()) {
continue;
}
$name = uniqid().'_'.trim($file->getClientOriginalName());
$file->move(Storage::path('public/'.$path), $name);
$files[] = Storage::url($path.'/'.$name);
}
}
return $files;
});
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.
./node-docker.sh npm install
./node-docker.sh npm run build
./node-docker.sh npm run build && ./node-docker.sh npm run build:demo
FAQs
A minimalistic yet powerful VueJs WYSIWYG built on Tiptap 2, inspired by Outline Wiki
We found that @dvwd/paper-wysiwyg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.