3.0.2 • Published 2 years ago

tinymce-plugin-codeblock v3.0.2

Weekly downloads
3
License
MIT
Repository
-
Last release
2 years ago

CodeBlock TinyMCE Plugin npm

Welcome stranger! This is a repo containing the codeblock TinyMCE plugin.

The development server

By running the npm start command you start the development server and open a browser window with an instance of TinyMCE with your plugin added to it. This window will reload automatically whenever a change is detected in the index.html file in the static folder or in one of the JavaScript files in the src directory.

The production build

By running the npm run build command Webpack will create a dist directory with a child directory with the name of your plugin (codeblock) containing four files:

  • plugin.js - the bundled plugin
  • plugin.min.js - the bundles, uglified and minified plugin
  • LICENSE - a file explaining the license of your plugin (copied over from LICENSE)

Use

tinymce.init({
  plugins: 'codeblock code',
  toolbar: 'codeblock code',
  codeblock: {
    highlightStyle: "https://cdn.jsdelivr.net/highlight.js/9.10.0/styles/default.min.css", // highlight.js style
    codeTheme: 'default' // codemirror theme
  }
});

Options

  • highlightStyle: optional, highlight.js style url
  • codeTheme: optional, default value - 'default'
  • langs: optional, default value -
[
  { value: 'javascript', mode:'javascript', label: 'Javascript' },
  { value: 'html', mode:'xml', label: 'HTML' },
  { value: 'java', mode:'clike', label: 'Java' }
]
3.0.2

2 years ago

3.0.0

2 years ago

2.3.1

3 years ago

2.3.0

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago