
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
strapi-plugin-prompt-editor
Advanced tools
This editor is capable of integrating with AI, enhancing your writing and editing experience.
Stylish editor that works with ChatGPT and Gemini. Supports Strapi v5🎉
npm i strapi-plugin-prompt-editor
# config/plugins.js
...
'prompt-editor': {
enabled: true,
config: {
// It doesn't matter if it's just one or the other.
openai_api_key: process.env.OPENAI_API_KEY,
gemini_api_key: process.env.GEMINI_API_KEY
}
},
...
You can change the default settings for model and image size.
Selectable models can be changed from config.
// example
'prompt-editor': {
enabled: true,
config: {
openai_api_key: process.env.OPENAI_API_KEY,
gemini_api_key: process.env.GEMINI_API_KEY,
chatGPTTextModels: [
'gpt-4o',
'gpt-4o-mini',
'gpt-4',
'gpt-3.5-turbo'
],
geminiTextModels: [
'gemini-1.5-flash',
'gemini-1.5-pro',
'gemini-1.0-pro',
]
}
}
The fields of prompt-editor are in JSON format by default when retrieved through the API.
Therefore, we recommend implementing middlewares and converting them to HTML.
npm i @blocknote/server-util
import {Strapi} from '@strapi/strapi';
import {ServerBlockNoteEditor} from "@blocknote/server-util";
export default (config, {strapi}: { strapi: Strapi }) => {
return async (ctx, next) => {
await next()
const editor = ServerBlockNoteEditor.create();
const data = structuredClone(ctx.response.body.data)
const convertToHTML = async (item: any) => {
if (item.attributes.content === null) {
item.attributes.content = ''
} else {
try {
const block = JSON.parse(item.attributes.content)
item.attributes.content = await editor.blocksToHTMLLossy(block)
} catch (e) {
console.error(e)
}
}
return item
}
ctx.response.body.data = await Promise.all(data.map(item => convertToHTML(item)))
}
}
The editor of this plugin is based on BlockNote.
FAQs
This editor is capable of integrating with AI, enhancing your writing and editing experience.
The npm package strapi-plugin-prompt-editor receives a total of 3 weekly downloads. As such, strapi-plugin-prompt-editor popularity was classified as not popular.
We found that strapi-plugin-prompt-editor demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.