Skip to content

Instantly share code, notes, and snippets.

@isDipesh
Last active October 25, 2017 07:27
Show Gist options
  • Save isDipesh/6f8289e8ac132da702a7125b4c6489ba to your computer and use it in GitHub Desktop.
Save isDipesh/6f8289e8ac132da702a7125b4c6489ba to your computer and use it in GitHub Desktop.
Saleor: Adding WYSIWYG to Product Description form in Dashboard

Install trumbowyg

yarn add trumbowyg

Edit saleor/static/dashboard/js/dashboard.js

import 'trumbowyg/dist/trumbowyg.min.js';
import 'trumbowyg/dist/ui/trumbowyg.min.css';
import icons from 'trumbowyg/dist/ui/icons.svg';
$.trumbowyg.svgPath = icons;

$(document).ready(function() {
  $('#id_description').trumbowyg();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment