🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

LinedTextDiv is a lightweight jQuery plugin which converts any Div or Pre elements into a scrollable text/code editor with support for line numbers and custom scrollbars.

editor text-editor

Documentation

Lined Div or Pre using JQuery

A JQuery plugin that replaces the div or pre in the DOM with UI with line numbers and editor. This works with multiple div's or pre's and have multiple themes (coming soon).

Demo & Examples

http://www.techdining.com/plugins/jquery/lined-textdiv

Dependency

This plugin uses JQuery, so use the latest version. (3.1.1 in my case)

Setup

Download both js and css files and use it where ever needed. (CDN Links coming soon)

<link href="linedTextEditor-jquery.css" type="text/css" rel="stylesheet" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="linedTextEditor-jquery.js"></script>

Example Usage

HTML

<div class="lined"></div>

or

<pre class="lined"></pre>

JavaScript

$(function() {      $(".lined").linedTextEditor(); });

Parameters

This plugin accepts one parameter for now i.e., selectedLine.

$(function() { 	$(".lined").linedTextEditor({ 		selectedLine: 20, 	}); });

Screenshots

Image of Plugin


You May Also Like