Socket
Socket
Sign inDemoInstall

markdown-editor-shell

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.1.0

6

js/markdown-editor-shell.js

@@ -15,3 +15,3 @@ /*

markdownToHtmlConvertor: function (markdown) { return markdown; },
customButtons: [],
additionalButtons: [],
window: window

@@ -53,3 +53,3 @@ };

markdownToHtmlConvertor: opts.markdownToHtmlConvertor || defaultSettings.markdownToHtmlConvertor,
customButtons: opts.customButtons || defaultSettings.customButtons,
additionalButtons: opts.additionalButtons || defaultSettings.additionalButtons,
window: opts.window || defaultSettings.window

@@ -388,3 +388,3 @@ };

var toolbarElement = wrapElement.getElementsByClassName("markdown-editor-header")[0];
var buttonGroups = self._renderButtons(self.toolbar);
var buttonGroups = self._renderButtons(self.toolbar.concat(self.settings.additionalButtons || []));
for (var i = 0; i < buttonGroups.length; i++) {

@@ -391,0 +391,0 @@ toolbarElement.insertBefore(buttonGroups[i], toolbarElement.childNodes[toolbarElement.childNodes.length - 1]);

{
"name": "markdown-editor-shell",
"version": "1.0.1",
"version": "1.1.0",
"description": "Client-side markdown editor shell which compatible with any renderer engine.",

@@ -5,0 +5,0 @@ "main": "js/markdown-editor-shell.js",

@@ -6,2 +6,4 @@ # Markdown Editor Shell

Client-side markdown editor shell which compatible with any renderer engine.
## Example of usage

@@ -16,3 +18,35 @@ ```javascript

[Demo](http://htmlpreview.github.io/?https://github.com/T-Alex/MarkdownEditorShell/blob/master/demo/index.html)
## Options
### container
_string_ or _object_, an Id of ```textarea``` element or element itself for wrapping in ```MarkdownEditorShell```.
### fullscreenButtonTitle
_string_, the title of fullscreen button which will be shown by mouse over. Defaults to ```Enter Fullscreen```.
### previewButtonTitle
_string_, the title of preview button which will be shown by mouse over. Defaults to ```Toggle Preview Mode```.
### markdownToHtmlConvertor
_function_ that represents converter from markdown text (input parameter) to html (output value).
### additionalButtons
_array_ of groups of ```buttons``` to display in toolbar.
Each group should represent the following object:
```javascript
{
name: "", // name of group
buttons: [ // array of group buttons
{
title: "Bold", // title of button
className: "glyphicon glyphicon-bold", // class of button
action: buttonAction(e) // a function that represents the action of button, where e is instance of plugin
}
]
}
```
## License
Markdown Editor Shell is under the [MIT license](LICENSE.md).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc