Skip to content

Commit

Permalink
Updated Written
Browse files Browse the repository at this point in the history
  • Loading branch information
pier-oliviert committed May 30, 2016
1 parent ab8067b commit aa1887a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions lib/ecrire/app/assets/javascripts/admin/posts/content.coffee
@@ -1,11 +1,5 @@
ObserveJS.bind 'Editor.Content', class
loaded: =>
Written.Parsers.get('pre').highlightWith (element) ->
Prism.highlightElement(element, false)

Written.Parsers.get('code').highlightWith (element) ->
Prism.highlightElement(element, false)

if @element().dataset.bucket?
window.AWS = {
bucket: @element().dataset.bucket,
Expand All @@ -15,4 +9,10 @@ ObserveJS.bind 'Editor.Content', class
}

@written = new Written(this.element())
@written.initialize()

@written.parsers.get('pre')?.highlightWith (element) ->
Prism.highlightElement(element, false)

@written.parsers.get('code')?.highlightWith (element) ->
Prism.highlightElement(element, false)

2 changes: 1 addition & 1 deletion lib/ecrire/app/helpers/admin/posts_helper.rb
Expand Up @@ -19,7 +19,7 @@ def edit_content_tag(post)
contenteditable: true,
href: admin_post_path(@post.id) do |div|

namespace = Pathname.new(Rails.application.secrets.s3['namespace'] || '')
namespace = Pathname.new(Rails.application.secrets.fetch('s3', {})['namespace'] || '')

if Rails.application.secrets.has_key?(:s3)
div['data-bucket'] = Rails.application.secrets.s3['bucket']
Expand Down

0 comments on commit aa1887a

Please sign in to comment.