Code Monkey home page Code Monkey logo

ace-freely's Introduction

Ace Freely

An Ace Editor field type for Craft CMS

Installation

  1. Move the 'acefreely' folder into your Craft plugins folder.
  2. Go to Settings > Plugins in the Craft control panel.
  3. Install the Ace Freely plugin.
  4. You can now create Ace Freely fields from within Settings > Fields.

Usage

There are a few different ways to use Ace Freely depending on how you want to output your content.

Code Sample

Wrap the field's value in a <pre> element to output a code sample.

<pre>{{ entry.aceFreelyFieldHandle }}</pre>

HTML, CSS or JS Sample

Pass HTML, CSS, or JavaScript content through Twig's raw filter.

{{ entry.aceFreelyFieldHandle | raw }}

Markdown Sample

Pass Markdown content through Craft's markdown filter.

{{ entry.aceFreelyFieldHandle | markdown }}

Twig Sample

Pass Twig content through Ace Freely's ace_parse filter.

{{ entry.aceFreelyFieldHandle | ace_parse }}

ace-freely's People

Contributors

httpster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ace-freely's Issues

ace_parse eroor

You write in your docs that twig code should go along with | ace_parse

So if I write:

<pre>{{ entry.cellCode|ace_parse }}</pre>

An error appears:

Variable "entry" does not exist

Yet without the filter entry does indeed exist.

Theme Frontend

Hi.

How do I pass along the code highlighting theme to the front-end?

<pre>{{ entry.cellCode | raw }}</pre>

This prints the code correctly. But there isn't any Styling applied. Whats the catch here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.