Browse Source

Fixed image align in markdown content

NGPixel 8 years ago
parent
commit
993bf83a44
2 changed files with 7 additions and 0 deletions
  1. 0 0
      assets/css/app.css
  2. 7 0
      libs/markdown.js

File diff suppressed because it is too large
+ 0 - 0
assets/css/app.css


+ 7 - 0
libs/markdown.js

@@ -244,6 +244,13 @@ const parseContent = (content) => {
     })
   })
 
+  // Apply align-center to parent
+
+  cr('img.align-center').each((i, elm) => {
+    cr(elm).parent().addClass('align-center')
+    cr(elm).removeClass('align-center')
+  })
+
   output = cr.html()
 
   return output

Some files were not shown because too many files changed in this diff