Sha256: d37b818bfb4ced222952b6df3c35971d7055619758d721a209ebfcd45523af75

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

document.addEventListener("DOMContentLoaded", () => {
  console.log("initing", document.body.classList.contains("theme-dark"))

  const themeOptions = document.body.classList.contains("theme-dark")
    ? {
        skin: "oxide-dark",
        content_css: "dark",
      }
    : {
        skin: "oxide",
        content_css: "default",
      }

  tinymce.init({ selector: "#default", ...themeOptions })
  tinymce.init({
    selector: "#dark",
    toolbar:
      "undo redo styleselect bold italic alignleft aligncenter alignright bullist numlist outdent indent code",
    plugins: "code",
    ...themeOptions,
  })
})

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mazer-rails-0.1.4 vendor/assets/javascripts/pages/tinymce.js
mazer-rails-0.1.3 vendor/assets/javascripts/pages/tinymce.js
mazer-rails-0.1.2 assets/javascripts/pages/tinymce.js