@contentarchitect/code

0.0.1 • Public • Published

Code

This is an block for ContentArchitect editor.

Properties

  • Syntax highlighting with PrismJS
  • Editor side rendering. On viewing no require JS. Just HTML.

Usage

You can create an bundle from PrismJS Download Page. And then click on DOWNLOAD JS and DOWNLOAD CSS. Then:

<link rel="stylesheet" href="prism.css" />
<script src="prism.js"></script>

<script src="unpkg.com/@contentarchitect/editor"></script>
<script src="unpkg.com/@contentarchitect/code"></script>

<script>
ContentArchitect.Blocks.register(Code)
</script>

<content-architect>
  <div data-block="Code" data-lang="js">
    <pre>
      <code>
        // This is an code block    
      </code>
    </pre>
  </div>
</content-architect>

And now your code block ready.

/@contentarchitect/code/

    Package Sidebar

    Install

    npm i @contentarchitect/code

    Weekly Downloads

    1

    Version

    0.0.1

    License

    ISC

    Unpacked Size

    24.4 kB

    Total Files

    10

    Last publish

    Collaborators

    • cihad