This time I will share jQuery Plugin and tutorial about GitHub-style Markdown Editor For jQuery – tail.writer, hope it will help you in programming stack.
The tail.writer JavaScript plugin turns textarea fields into WYSIWYG markdown editors, which support GitHub Flavored Markdown, BBCode and Textile Markup.
Build for jQuery 1.8.0 and later with vanilla JavaScript. With support for live preview, line/character/word counters and more.
Intallation:
5 |
$ npm install tail.writer --save |
How to use it:
1. Include a theme CSS of your choice on your html page.
1 |
< link rel = "stylesheet" href = "tail.writer.dark.css" > |
2 |
< link rel = "stylesheet" href = "tail.writer.github.css" > |
3 |
< link rel = "stylesheet" href = "tail.writer-white.css" > |
2. Include the main JavaScript on the page.
02 |
< script src = "tail.writer.js" ></ script > |
05 |
< script src = "tail.writer-bbcode.js" ></ script > |
08 |
< script src = "tail.writer-markdown.js" ></ script > |
11 |
< script src = "tail.writer-textile.js" ></ script > |
14 |
< script src = "tail.writer-full.js" ></ script > |
3. The editor currently supports 3 languages:
2 |
< script src = "./langs/tail.writer-all.js" ></ script > |
5 |
< script src = "./langs/tail.writer-de.js" ></ script > |
8 |
< script src = "./langs/tail.writer-pl.js" ></ script > |
4. Call the function on the textarea to generate a default markdown editor.
1 |
tail.writer( "textarea" ); |
5. All default settings to customize the markdown editor.
01 |
tail.writer( "textarea" ,{ |
13 |
doubleLineBreak: false , |
16 |
fullscreenParent: d.body, |
34 |
previewConverter: null , |
37 |
preventBindings: false , |
50 |
toolbarMultiLine: false , |
Changelog:
v0.4.1 (2019-05-26)
- Add: The new Polish Translation.
- Add: Support for module exporting, tested with browserify.
- Update: The package.jsonand bower.json variables.
- Update: Using classList to add / remove / check class names.
- Update: Using Object.assign only to merge / clone object properties.
- Update: Clone language strings (with the english ones, for backward compatibilities).
- Remove: Support for Internet Explorer 9.
v0.4.0 (2019-03-16)
- Info: This is the first version which supports different markup languages, therefore the package style has been adapted to the new environment. So tail.writer(.min).js doesn’t contain any markup button code anymore, use js/tail.writer-{markup}(.min).js or include the markup markups/tail.markup-{markup}.js in addition to the main file!
- Add: The new tail.writer-full(.min).js file contains all languages AND all markup actions!
- Add: The textile markup language (You can use the direct package tail.writer-textile(.min).js or the separate markup markup/tail.markup-textile.js in addition to the main file!
- Add: The bbCode markup language (You can use the direct package tail.writer-bbcode(.min).js or the separate markup markup/tail.markup-bbcode.js in addition to the main file!
- Add: Support as Asynchronous Module Definition, tested with requireJS (I’m new with AMD).
- Add: A complete new markup system and interface.
- Add: A complete new translation system and interface.
- Add: Support for the Markdown parser showdown.
- Add: Support for the textile parser textilejs.
- Add: Support for the BBCode parser tail.BBSolid.
- Add: New classNames option replaces classes and allows NULL (No custom classes), Boolean (true -> copy source textarea classes), String (space-separated classes) or Array (full with classname strings).
- Add: New debug option allows to dis-/enable the debug messages [Unfinished, Prepared].
Create A Flat Barometer With jQuery And CSS/CSS3 – Barometer.js,
”
source : jquery.net