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
Copy file name to clipboardExpand all lines: readme.md
+68-3Lines changed: 68 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Angular Markdown Editor (Directive)
2
-
`1.0.9`
2
+
`1.1.0`
3
3
4
4
## What do we have?
5
5
In this package you a few libraries and tools to make a more convenient "all in one" WYSIWYG Markdown Editor with 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 (doc, blog, etc...). Also planning on adding a 1-click button for simple Copy+Paste to email.
@@ -57,8 +57,8 @@ _NOTE: Unfortunately, the "highlight.js" npm module doesn't seem to have proper
###### starting with Angular-Markdown-Editor version 1.1.0
92
+
You have access to all the Bootstrap Markdown Editor available events/hooks directly in the directive
93
+
94
+
_NOTE: It seems that Bootstrap Markdown Editor haven't releease any versions in a while but a lot of commits are still happening. If you want all the Events/Hooks to work, you should manually download the [Bootstrap Markdown Editor.js](https://github.com/toopay/bootstrap-markdown/tree/master/js) file yourself._
You can call any API functions defined in Markdown Editor, take a look at their API section [Bootstrap Markdown Editor - API functions](http://www.codingdrama.com/bootstrap-markdown/)
119
+
120
+
```javascript
121
+
/** Markdown event hook onFullscreen, in this example we will automatically show the result preview when going in full screen
122
+
* the argument (e) is the actual Markdown object returned which help call any of API functions defined in Markdown Editor
123
+
* @paramobject e: Markdown Editor object
124
+
*/
125
+
$scope.onFullScreenCallback=function(e) {
126
+
e.showPreview();
127
+
}
128
+
```
129
+
130
+
### External function calls through $rootScope.markdownEditorObjects
131
+
###### starting with Angular-Markdown-Editor version 1.1.0
132
+
For conveniencies and for possible external function calls, Angular-Markdown-Editor saves each of the Markdown Editors inside `$rootScope.markdownEditorObjects[editorName]`. This basically means that on any define editor, we could call any of the [Bootstrap Markdown Editor - API functions](http://www.codingdrama.com/bootstrap-markdown/).
133
+
This varies with previous subject of (Event Hooks), since using the `$rootScope.markdownEditorObjects` can be called at any and makes perfect for example on a function attached to a button (for example an external button for a Full Screen Preview as shown below).
0 commit comments