[Angularjs] markdown editor modules: Install markdown angular-marked and highlight.js

Angularjs Markdown Modules Hypercubed/angular-marked highlight.js: Syntax highlighting for the Web Install markdown angular-marked and highlight.js Install modules: bower install –save highlightjs bower install –save angular-marked index.html: <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <!– build:css(client) app/vendor.css –> <!– bower:css –> <link rel=”stylesheet” href=”bower_components/highlightjs/styles/default.css” /> . . . <!– endbower –> <!– endbuild –> . .…

Read More

[bootstrap-markdown] show and hide markdown editor programmatically

html: [html] Edit [/html] Angularjs: [js] editComment(comment){ var self = this; var editor = angular.element($(`#${comment._id}`)); editor.markdown({autofocus: true, savable: true, hideable:true, onSave: function(e) {//e: markdown editor self.Blog.saveComment({ id: self.blog._id, comment_id: comment._id, content: e.getContent() }).$promise .then(() => { //angular.element($(‘.md-editor’)).children(‘.md-footer’).html(‘Comment is updated.’); var el = angular.element($(‘.md-editor’)).parents(‘.panel’); el.css( “background-color”, “#ffeeff” ); setTimeout(() => { el.css( “background-color”, “#ffffff” ); },…

Read More