2.8.108 • Published 9 months ago

loongtex-code v2.8.108

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

npm.io

Code Tool for Editor.js

Code Tool for the Editor.js allows to include code examples in your articles.

npm.io

Installation

Install via NPM

Get the package

npm i --save-dev @editorjs/code

Include module at your application

const CodeTool = require('@editorjs/code');

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Load from CDN

You can load specific version of package from jsDelivr CDN.

https://cdn.jsdelivr.net/npm/@editorjs/code@2.0.0

Require this script on a page with Editor.js.

<script src="..."></script>

Usage

Add a new Tool to the tools property of the Editor.js initial config.

var editor = EditorJS({
  ...
  
  tools: {
    ...
    code: CodeTool,
  }
  
  ...
});

Config Params

FieldTypeDescription
placeholderstringCode Tool's placeholder string

Output data

This Tool returns code.

{
    "type" : "code",
    "data" : {
        "code": "body {\n font-size: 14px;\n line-height: 16px;\n}",
    }
}
2.8.107

9 months ago

2.8.108

9 months ago

2.8.105

9 months ago

2.8.106

9 months ago

2.8.104

9 months ago

2.8.103

9 months ago

2.8.100

2 years ago

2.8.99

2 years ago

2.8.98

2 years ago

2.8.97

2 years ago

2.8.101

2 years ago

2.8.102

2 years ago

2.8.70

2 years ago

2.8.74

2 years ago

2.8.73

2 years ago

2.8.72

2 years ago

2.8.71

2 years ago

2.8.78

2 years ago

2.8.77

2 years ago

2.8.76

2 years ago

2.8.75

2 years ago

2.8.79

2 years ago

2.8.81

2 years ago

2.8.80

2 years ago

2.8.85

2 years ago

2.8.84

2 years ago

2.8.83

2 years ago

2.8.82

2 years ago

2.8.89

2 years ago

2.8.88

2 years ago

2.8.87

2 years ago

2.8.86

2 years ago

2.8.92

2 years ago

2.8.91

2 years ago

2.8.90

2 years ago

2.8.96

2 years ago

2.8.95

2 years ago

2.8.94

2 years ago

2.8.93

2 years ago

2.8.59

2 years ago

2.8.58

2 years ago

2.8.63

2 years ago

2.8.62

2 years ago

2.8.61

2 years ago

2.8.60

2 years ago

2.8.67

2 years ago

2.8.66

2 years ago

2.8.65

2 years ago

2.8.64

2 years ago

2.8.68

2 years ago

2.8.57

2 years ago

2.8.56

2 years ago

2.8.55

2 years ago

2.8.54

2 years ago

2.8.52

2 years ago

2.8.51

2 years ago

2.8.50

2 years ago

2.8.49

2 years ago

2.8.48

2 years ago

2.8.47

2 years ago

2.8.46

2 years ago

2.8.45

2 years ago

2.8.44

2 years ago

2.8.43

2 years ago

2.8.42

2 years ago

2.8.41

2 years ago

2.8.40

2 years ago

2.8.39

2 years ago

2.8.38

2 years ago

2.8.37

2 years ago

2.8.36

2 years ago

2.8.35

2 years ago

2.8.34

2 years ago

2.8.33

2 years ago

2.8.32

2 years ago

2.8.31

2 years ago

2.8.30

2 years ago

2.8.29

2 years ago

2.8.28

2 years ago

2.8.27

2 years ago

2.8.25

2 years ago

2.8.23

2 years ago

2.8.22

2 years ago

2.8.21

2 years ago

2.8.20

2 years ago

2.8.19

2 years ago

2.8.18

2 years ago

2.8.17

2 years ago

2.8.15

2 years ago

2.8.14

2 years ago

2.8.13

2 years ago

2.8.12

2 years ago

2.8.11

2 years ago

2.8.10

2 years ago

2.8.8

2 years ago

2.8.7

2 years ago

2.8.6

2 years ago

2.8.5

2 years ago

2.8.4

2 years ago

2.8.3

2 years ago

2.8.2

2 years ago

2.8.1

2 years ago

2.8.0

2 years ago