2.0.2 • Published 2 months ago

@frankhoodbs/wysiwyg-cmp v2.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Wysiwyg Component

The component is a visual formatting wrapper, specifically designed for rich-text. It creates a utility wrapper designed to give rich-text content a consistent and customizable appearance. This is particularly useful when dealing with content from WYSIWYG editors, where the output can vary based on user input. The component ensures that such content is displayed consistently and aesthetically.

Il componente è un wrapper di formattazione visiva, specificamente progettato per i testi arricchiti. Crea un wrapper che conferire al contenuto del testo arricchito un aspetto coerente e personalizzabile. Questo è particolarmente utile quando si tratta di contenuti provenienti da editor WYSIWYG, dove l'output può variare in base all'input dell'utente. Il componente garantisce che tale contenuto venga visualizzato in modo coerente ed esteticamente gradevole.

Version License

API Reference

CSS variables

NamedefaultDescription
--wysiwyg-h1-font-weightinherith1 font-weight
--wysiwyg-h1-font-sizeinherith1 font-size
--wysiwyg-h1-line-heightinherith1 line-height
--wysiwyg-h1-font-familyinherith1 font-family
--wysiwyg-h2-font-weightinherith2 font-weight
--wysiwyg-h2-font-sizeinherith2 font-size
--wysiwyg-h2-line-heightinherith2 line-height
--wysiwyg-h2-font-familyinherith2 font-family
--wysiwyg-h3-font-weightinherith3 font-weight
--wysiwyg-h3-font-sizeinherith3 font-size
--wysiwyg-h3-line-heightinherith3 line-height
--wysiwyg-h3-font-familyinherith3 font-family
--wysiwyg-h4-font-weightinherith4 font-weight
--wysiwyg-h4-font-sizeinherith4 font-size
--wysiwyg-h4-line-heightinherith4 line-height
--wysiwyg-h4-font-familyinherith4 font-family
--wysiwyg-h5-font-weightinherith5 font-weight
--wysiwyg-h5-font-sizeinherith5 font-size
--wysiwyg-h5-line-heightinherith5 line-height
--wysiwyg-h5-font-familyinherith5 font-family
--wysiwyg-h6-font-weightinherith6 font-weight
--wysiwyg-h6-font-sizeinherith6 font-size
--wysiwyg-h6-line-heightinherith6 line-height
--wysiwyg-h6-font-familyinherith6 font-family
--wysiwyg-paragraph-font-weightinheritparagraph font-weight
--wysiwyg-paragraph-font-sizeinheritparagraph font-size
--wysiwyg-paragraph-line-heightinheritparagraph line-height
--wysiwyg-paragraph-font-familyinheritparagraph font-family
--wysiwyg-a-colordodgerbluetag a color
--wysiwyg-spacing-bottom0spacing below each element
--wysiwyg-table-cell-padding5px 10pxpadding of the table cells
--wysiwyg-table-border-width1pxtable border width
--wysiwyg-table-border-stylesolidtable border style
--wysiwyg-table-border-color#000000table border color
--wysiwyg-pre-max-height600pxtag pre max-height
--wysiwyg-pre-padding0.5em 2.5emtag pre padding
--wysiwyg-pre-bg-colornavytag pre background color
--wysiwyg-pre-color#fffffftag pre color
--wysiwyg-mark-bg-colornavytag mark background color
--wysiwyg-mark-color#fffffftag mark color

Usage/Examples

<wysiwyg-cmp>
  <h1>This is an H1</h1>
  <h2>This is an H2</h2>
  <h3>This is an H3</h3>
  <h4>This is an H4</h4>
  <h5>This is an H5</h5>
  <h6>This is an H6</h6>
  <p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur
    debitis exercitationem ipsum iusto perferendis porro rerum! Dolorum fugiat
    iusto neque.
  </p>
  <ul>
    <li>li element first</li>
    <li>li element second</li>
    <li>
      li element third
      <ul>
        <li>li element first</li>
        <li>li element second</li>
        <li>li element third</li>
        <li>li element fourth</li>
      </ul>
    </li>
    <li>li element fourth</li>
  </ul>
  <ol>
    <li>li element first</li>
    <li>
      li element second
      <ol>
        <li>li element first</li>
        <li>li element second</li>
        <li>li element third</li>
        <li>li element fourth</li>
      </ol>
    </li>
    <li>li element third</li>
    <li>li element fourth</li>
  </ol>
  <dl>
    <dt>Description lists</dt>
    <dd>A description list is perfect for defining terms.</dd>
    <dt>Euismod</dt>
    <dd>
      Vestibulum id ligula porta felis euismod semper eget lacinia odio sem
      nec elit.
    </dd>
    <dd>Donec id elit non mi porta gravida at eget metus.</dd>
    <dt>Malesuada porta</dt>
    <dd>Etiam porta sem malesuada magna mollis euismod.</dd>
  </dl>
  <table>
    <thead>
      <tr>
        <th>#</th>
        <th>Column heading</th>
        <th>Column heading</th>
        <th>Column heading</th>
      </tr>
    </thead>
    <tbody>
      <tr class="active">
        <th scope="row">1</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr>
        <th scope="row">2</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr class="success">
        <th scope="row">3</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr>
        <th scope="row">4</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr class="info">
        <th scope="row">5</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr>
        <th scope="row">6</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr class="warning">
        <th scope="row">7</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr>
        <th scope="row">8</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
      <tr class="danger">
        <th scope="row">9</th>
        <td>Column content</td>
        <td>Column content</td>
        <td>Column content</td>
      </tr>
    </tbody>
  </table>
  <blockquote cite="http://www.worldwildlife.org/who/index.html">
    <p>
      This. is a blockquote.
      <br />
      For 50 years, WWF has been protecting the future of nature. The world’s
      leading conservation organization, WWF works in 100 countries and is
      supported by 1.2 million members in the United States and close to 5
      million globally. WWF's unique way of working combines global reach with
      a foundation in science, involves action at every level from local to
      global, and ensures the delivery of innovative solutions that meet the
      needs of both people and nature.
    </p>
  </blockquote>
  <pre>
    <code>
      .post-title {
        margin: 0 0 5px;
        font-weight: bold;
        font-size: 38px;
        line-height: 1.2;
        and here's a line of some really, really, really, really long text, just to see how the PRE tag handles it and to find out how it overflows;
      }
    </code>
  </pre>
  <p>
    The following snippet of text is
    <strong>rendered as bold text</strong>
  </p>
  <p>
    The following snippet of text is
    <b>rendered as bold text</b>
  </p>
  <p>
    The following snippet of text is
    <em>rendered as italic text</em>
  </p>
  <p>
    The following snippet of text is
    <i>rendered as italic text</i>
  </p>
  <p>
    The following snippet of text is
    <dfn>rendered as italic text</dfn>
  </p>
  <p>
    The following snippet of text is
    <mark>rendered as marked text</mark>
  </p>
  <p>
    The abbreviation
    <abbr title="Seriously">srsly</abbr>
    stands for &ldquo;seriously&rdquo;.
  </p>
  <p>
    <small>This is some smaller text.</small>
  </p>
  <p>
    &ldquo;Nel mezzo del cammin di nosta vita...&rdquo; –
    <cite>Divina Commedia</cite>
  </p>
  <p>
    This tag will let you
    <del>strikeout text</del>
  </p>
  <p>
    This tag will let you
    <s>strikeout text</s>
  </p>
  <p><u>This line of text will render as underlined</u></p>
  <p>
    This tag should denote
    <ins>inserted</ins>
    text.
  </p>
  <p>
    <q>This tag is a quote followed by is author</q>
    – Steve Ballmer
  </p>
  <p>
    Getting our science styling on with H
    <sub>2</sub>
    O, which should push the 2 down.
  </p>
  <p>
    Still sticking with science and Isaac Newton’s E = MC
    <sup>2</sup>
    , which should lift the 2 up.
  </p>
  <p>
    Press
    <kbd>Ctrl</kbd>
    +
    <kbd>C</kbd>
    to copy text (Windows).
  </p>
  <p>
    The CSS
    <code>background-color</code>
    property defines the background color of an element.
  </p>
  <p>
    The area of a triangle is: 1/2 x
    <var>b</var>
    x
    <var>h</var>
    , where
    <var>b</var>
    is the base, and
    <var>h</var>
    is the vertical height.
  </p>
  <p>
    <samp>
      File not found.
      <br />
      Press F1 to continue
    </samp>
  </p>
  <address>
    Written by
    <a href="mailto:webmaster@example.com">Jon Doe</a>
    .
    <br />
    Visit us at:
    <br />
    Example.com
    <br />
    Box 564, Disneyland
    <br />
    USA
  </address>
  <br />
  <label>This is a label</label>
  <br />
  <a href="#">This is a link</a>
  <hr />
  <figure>
    <img width="1440" height="560" src="https://picsum.photos/1440/560" />
    <figcaption>This text is a figcaption</figcaption>
  </figure>
</wysiwyg-cmp>
2.0.2

2 months ago

2.0.1

2 months ago

1.5.16

2 months ago

1.5.15

2 months ago

1.5.10

4 months ago

1.5.12

4 months ago

1.5.11

4 months ago

1.5.14

4 months ago

1.5.13

4 months ago

1.5.9

4 months ago

1.5.4

6 months ago

1.5.8

6 months ago

1.5.7

6 months ago

1.5.3

6 months ago

1.5.2

7 months ago

1.5.1

7 months ago

1.5.0

7 months ago

1.4.17

7 months ago

1.4.15

8 months ago

1.4.14

8 months ago

1.4.16

8 months ago

1.4.13

8 months ago

1.4.11

9 months ago

1.4.12

9 months ago

1.4.10

10 months ago

1.4.9

10 months ago

1.4.8

10 months ago

1.4.6

10 months ago

1.4.7

10 months ago

1.4.3

10 months ago

1.4.2

10 months ago

1.4.1

10 months ago

1.3.16

1 year ago

1.3.15

1 year ago

1.3.11

1 year ago

1.3.10

1 year ago

1.3.8

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago