Skip to content

Turn any textarea into a lightweight markup language (LML) editor.

License

Notifications You must be signed in to change notification settings

jimsafley/LmlEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

LML Editor

Turn any textarea into a lightweight markup language (LML) editor.

<script type="text/javascript" src="/js/vendor/LmlEditor.js"></script>

<div id="lml-editor-buttons"></div>
<textarea id="lml-editor-textarea"></textarea>

<script>
// Initialize the LML editor.
var lmlEditor = new LmlEditor(
    document.getElementById('lml-editor-textarea'),
    document.getElementById('lml-editor-buttons')
);
// Add the bundled set of MediaWiki buttons.
lmlEditor.addMediawikiButtons();
// Add an individual MediaWiki button.
lmlEditor.addButton('wikitext-editor-button-signature', 'Signature', "", "-- ~~~~\n");
</script>

Translations

To translate button titles, add a "data-lml-editor-translations" data attribute to the button container containing a JSON object where keys are original strings and values are translated strings.

<div id="lml-editor-buttons" data-lml-editor-translations="{&quot;Underline&quot;:&quot;Subrayar&quot;}"></div>

About

Turn any textarea into a lightweight markup language (LML) editor.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published