A custom field plugin for Strapi that allows administrators to write and manage CSS directly from the Strapi admin panel.
- 🎨 Custom field for CSS editing
- 🌈 Theme selection capabilities
- 🖥️ Full-screen editing mode
- ✅ Compatible with both Strapi v4 and v5
# Using npm
npm install strapi-plugin-css-editor
# Using yarn
yarn add strapi-plugin-css-editor
# Using pnpm
pnpm add strapi-plugin-css-editor
# Using npm
npm install strapi-plugin-css-editor@^4
# Using yarn
yarn add strapi-plugin-css-editor@^4
# Using pnpm
pnpm add strapi-plugin-css-editor@^4
For Strapi v4
Add the following to config/plugins.js
(create it if it doesn't exist):
module.exports = {
// ...
'css-editor': {
enabled: true,
},
// ...
};
For Strapi v5
Add the following to config/plugins.ts
(create it if it doesn't exist):
export default {
// ...
'css-editor': {
enabled: true,
},
// ...
};
- Navigate to Content-Type Builder in your Strapi admin panel
- Edit the content type where you want to add the CSS editor
- Click "Add another field"
- Under "Custom Fields" section, select "CSS Editor"
- Configure the field name and other settings
- Save your content type
When editing content:
- The CSS Editor field provides a code editor interface
- Write your CSS code in the editor
- Use the theme selector to switch between themes
- Click the full-screen button for a larger editing area
- Changes are saved along with your content
- Field not appearing: Make sure the plugin is properly installed and enabled in your configuration
- Styling not applying: Verify that your frontend is correctly pulling and applying the CSS values from your content
This plugin is released under the MIT License.
Created and maintained by NewProWeb.