Sha256: 6b39536386425a24068980a9e39822cd69b24c1554949a19da282ce6177b6730
Contents?: true
Size: 596 Bytes
Versions: 3
Compression:
Stored size: 596 Bytes
Contents
module Marksmith module Helper def marksmithed(body) Marksmith::Renderer.new.renderer.render(body) end def marksmith_tag(name, **kwargs, &block) render partial: "marksmith/shared/editor", locals: { name: name, **kwargs } end def marksmith_asset_tags(*args, **kwargs) stylesheet_link_tag("marksmith", *args, **kwargs) + javascript_include_tag("marksmith.esm.js", *args, **kwargs) end # TODO: maybe inline svgs in the future def svg(name, options = {}) image_tag asset_path("marksmith/svgs/#{name}.svg"), options end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
marksmith-0.0.6 | lib/marksmith/helper.rb |
marksmith-0.0.5 | app/helpers/marksmith/helper.rb |
marksmith-0.0.4 | app/helpers/marksmith/helper.rb |