Coder Social home page Coder Social logo

prettycode.plugin's Introduction

=== PrettyCode โ€ข Code syntax highlighting with CodeMirror ===
Contributors:      Maxime BJ
Tags:              block
Tested up to:      5.9
Stable tag:        1.0.7
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

A simple block to highlight code with 20+ languages and 50+ themes, for the WordPress editor.

== Description ==

The prettiest syntax highlighting block for the WordPress editor.
Live edit your code snippets in the admin with bracket matching, customize colors with more thant 50 themes (Base16, Monokai, Material, Zenburn, Hopscotch...).
Compatible with major languages: HTML, CSS, JS, JSX, Stylus, Sass, PHP, Python, C, C++, C#, Java, XML, Shell, JSON, Go, Swift...

This block uses CodeMirror. You may have seen this block before on the Advanced Gutenberg Blocks plugins few years ago. It's now an updated and standalone block.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/prettycode` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Go to a post and click on 'Add block'
4. Search for 'PrettyCode'

== Frequently Asked Questions ==

= Which languages are available? =

All major language are available: HTML, CSS, JS, JSX, Stylus, Sass, PHP, Python, C, C++, C#, Java, XML, Shell, JSON, Go, Swift...

= Can I add more languages ? =

Yes, by using the filter `prettycode_languages_list`.

= Can I customize the appearance? =

Sure! You have access to 50+ dark and light themes like Base16, Monokai, Material, Zenburn, Hopscotch...

= Can I contribute? =

Yep! The public repository is right here: https://github.com/maximebj/prettycode.plugin

== Screenshots ==

== Changelog ==

= 1.0.7 =
* Fixed code editor line height

= 1.0.6 =
* Added translation for JS files
* Fixed a bug with PHP block

= 1.0 =
* Initial release

== Third Party ==

This plugins uses some third party libraries:

- WordPress create-block by gziolo - https://www.npmjs.com/package/@wordpress/create-block
- CodeMirror - https://github.com/codemirror/CodeMirror
- react-codemirror2 by scniro - https://github.com/scniro/react-codemirror2

A big thanks to their respective creators and maintainers!

prettycode.plugin's People

Contributors

maximebj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

prettycode.plugin's Issues

.CodeMirror-sizer min-height is incorrect until the window.resize event is triggered

On the frontent, the size of .CodeMirror-sizer is calculated via Javascript but the min-height property is incorrect until a windows resize event is triggered.

I've just added a window.dispatchEvent(new Event('resize')); on document ready state for debug purpose and that is enough to solve the problem.

So I think the block height calculation is done slightly too early.

What do you think?

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.