Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@wattanx/lexical-vue
Advanced tools
Readme
Forked from lexical-vue
An extensible Vue 2 web text-editor based on Lexical.
For documentation and more information about Lexical, be sure to visit the Lexical website.
Requires Vue 2.7 (
>=3.0
, uselexical-vue.
)
Install lexical
and lexical-vue
:
npm install lexical lexical-vue # or pnpm or yarn
Below is an example of a basic plain text editor using lexical
and lexical-vue
.
<script setup lang="ts">
import { $getRoot, $getSelection } from 'lexical';
import { ref } from 'vue';
import {
LexicalAutoFocusPlugin,
LexicalComposer,
LexicalContentEditable,
LexicalHistoryPlugin,
LexicalOnChangePlugin,
LexicalPlainTextPlugin,
} from 'lexical-vue';
const config = {
theme: {
// Theme styling goes here
},
};
const onError = (error) => {
throw error;
};
// When the editor changes, you can get notified via the
// LexicalOnChangePlugin!
function onChange(editorState) {
editorState.read(() => {
// Read the contents of the EditorState here.
const root = $getRoot();
const selection = $getSelection();
console.log(root, selection);
});
}
// Two-way binding
const content = ref('');
</script>
<template>
<LexicalComposer :initial-config="config" @error="onError">
<LexicalPlainTextPlugin>
<template #contentEditable>
<LexicalContentEditable />
</template>
<template #placeholder>
<div>Enter some text...</div>
</template>
</LexicalPlainTextPlugin>
<LexicalOnChangePlugin v-model="content" @change="onChange" />
<LexicalHistoryPlugin />
<LexicalAutoFocusPlugin />
</LexicalComposer>
</template>
For a more complex example, check the rich text editor playground.
git checkout -b my-new-branch
git commit -a -m 'Description of the changes'
git push origin my-new-branch
MIT
FAQs
An extensible Vue web text-editor based on Lexical.
The npm package @wattanx/lexical-vue receives a total of 2 weekly downloads. As such, @wattanx/lexical-vue popularity was classified as not popular.
We found that @wattanx/lexical-vue 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.