You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have put together a few libraries and tools to make a convenient all in one WYSIWYG Markdown Editor and preview. All of that with a simple AngularJS Directive call. I plan to use this mainly for online documentation but it could be useful for many other reasons. Also planning to add a 1-click button for simple copy+paste to email.
6
6
7
7
[Marked.js](https://github.com/chjj/marked) is awesome for markdown preview and [Highlight.js](https://highlightjs.org/) is a must for easy code viewing with colors highlighting. The [Bootstrap-Markdown](http://www.codingdrama.com/bootstrap-markdown/) is a really great and simplified WYSIWYG editor which was simply missing integration with AngularJS and so I created a Directive to handle that. For all of these great tools, we will use their AngularJS version for easier integration (for example `Marked.js` and `Angular-Marked`)
8
8
9
-
###How to use it?
10
-
#####Creation
9
+
## How to use it?
10
+
#### Creation
11
11
Simply create a `<textarea>` with an `ngModel` and a call to the Directive.
12
-
At the end, all you need is: `<textarea markdown-editor="" rows="10" ng-model="markdown"></textarea>`
You can also pass any options from the [Bootstrap-Markdown](http://www.codingdrama.com/bootstrap-markdown/) by passing these options as an object to the directive.
16
-
Like this: `<textarea markdown-editor="{'iconlibrary': 'fa'}"...` or multiple options `<textarea markdown-editor="{'iconlibrary': 'fa', addExtraButtons: true}"...`
19
+
Like this: `<textarea markdown-editor="{'iconlibrary': 'fa'}"...` or multiple options
I really thought that some buttons were missing to go a great job (Strikethrough & Table). So I added them to the directive, though they are not enabled by default, you need to enable them manually if you want them or not.
20
-
Like this: `<textarea markdown-editor="{addExtraButtons: true}"...`
0 commit comments