Feature #20691

Add ballot boxes (☐,☑,☒) to Lists in Wiki Textile/Mardown (Redcarpet)

Added by Hans Ginzel almost 4 years ago. Updated over 1 year ago.

Status:NewStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:Wiki
Target version:-
Resolution:

Description

Add please ballot boxes

☐    U+2610        ballot box
☑    U+2611        ballot box with check
☒    U+2612        ballot box with cross

to Lists in both Textile and Markdown (RedCarpet) formatting engines.

It is a good convention from Zim. http://zim-wiki.org/manual/Help/Wiki_Syntax.html#Lists


Related issues

Related to Redmine - Feature #20698: Task list Textile/Mardown New

History

#2 Updated by Toshi MARUYAMA almost 4 years ago

#3 Updated by Stéphane Lavergne over 1 year ago

FYI this can be accomplished somewhat cleanly by creating macros in a plugin. This is the quick hack which I used, saved as plugins/redmine_wiki_checkboxes/init.rb:

require 'redmine'

Redmine::Plugin.register :redmine_wiki_checkboxes do
  name 'Redmine Wiki Checkboxes plugin'
  author 'Stephane Lavergne'
  description 'Adds x, z and o formatting macros'
  version '0.0.2'
  url 'https://github.com/vphantom'
  author_url 'https://github.com/vphantom'
  requires_redmine :version_or_higher => '3.4.0'
end

Redmine::WikiFormatting::Macros.register do
  desc "Unchecked checkbox" 
  macro :o do |obj, args|
    '<b style="font-size:133%;">&#x2610;</b>'.html_safe
  end
end

Redmine::WikiFormatting::Macros.register do
  desc "Checked checkbox" 
  macro :x do |obj, args|
    '<b style="font-size:133%;color:#009900;">&#x2611;</b>'.html_safe
  end
end

Redmine::WikiFormatting::Macros.register do
  desc "Crossed checkbox" 
  macro :z do |obj, args|
    '<b style="font-size:133%;color:#bb0000;">&#x2612;</b>'.html_safe
  end
end

They cannot be used as list bullets per se, but it still opens decent possibilities.

Also available in: Atom PDF