Product Description Editor Prototype (Dashboard Use Case)

by shamalj

HTML

<!-- Froala CSS -->
<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.min.css" rel="stylesheet">

<!-- Dashboard Layout -->
<div style="max-width: 800px; margin: 20px auto; font-family: Arial;">
  <h2>Edit Product Description</h2>

  <input 
    type="text" 
    placeholder="Product Name" 
    style="width: 100%; padding: 10px; margin-bottom: 10px;"
  />

  <textarea id="product-editor">
    <h3>Premium Wireless Headphones</h3>
    <p>Experience high-quality sound with noise cancellation.</p>
    <ul>
      <li>Bluetooth 5.0</li>
      <li>20-hour battery life</li>
      <li>Comfort-fit design</li>
    </ul>
  </textarea>
</div>

<!-- Froala JS -->
<script src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.min.js"></script>

<script>
  new FroalaEditor('#product-editor', {
    height: 300,
    toolbarButtons: [
      'bold', 'italic', 'underline',
      '|',
      'formatOL', 'formatUL',
      '|',
      'insertImage', 'insertLink',
      '|',
      'undo', 'redo'
    ]
  });
</script>