Sha256: 360cfdcfeaf1f21aa0d3fa4a2ed61be96ee86ad39cb77cabe3152066e5b93df0

Contents?: true

Size: 818 Bytes

Versions: 9

Compression:

Stored size: 818 Bytes

Contents

#= require bootstrap-wysihtml5
#= require brightcontent/wysithtml5-parser-rules
#= require bootstrap-wysihtml5/locales/nl-NL

$ ->
  editorLocale = $('body').data('editorLocale')

  $('[data-wysihtml5]').wysihtml5
    html: true
    locale: editorLocale
    parserRules: wysihtml5ParserRules
    events:
      load: ->
        editor = $("#insertable").data("wysihtml5").editor
        editor.focus()

  $("#attachments").on "click", ".insert_image", (e) ->
    e.preventDefault()
    editor.composer.commands.exec "insertImage",
      src: $(this).data("insertImage")

  $("#attachments").on "click", ".insert_link", (e) ->
    e.preventDefault()
    editor.composer.commands.exec "createLink",
      href: $(this).data("insertUrl")
      target: "_blank"
      rel: "nofollow"
      text: $(this).data("insertName")

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
brightcontent-core-2.3.0 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.2.2 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.2.1 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.2.0 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.1.5 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.1.4 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.1.3 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.1.2 app/assets/javascripts/brightcontent/core.js.coffee
brightcontent-core-2.1.1 app/assets/javascripts/brightcontent/core.js.coffee