seditor

dgw::seditor widget

dgw::seditor - extended Tk text editor widget with toolbar buttons, configurable syntax highlighting, window splitting facilities and right click popup menu for standard operations like cut, paste etc.

DEMO

The dgw::seditor configured at creation time with support for some markdown hilighting

package require dgw::seditor
dgw::seditor .top -hilights {{md header ^#.+}    
                         {md comment ^>.+} 
                         {md keyword _{1,2}[^_]+_{1,2}}  
                         {md string {"[^"]+"}}}
pack .top -side top -fill both -expand true ;#"  
.top configure -filetypes {{Markdown Files}  {.md}}

# create a sample Markdown file and load it later
set out [open test.md w 0600] 
puts $out "# Header example\n"
puts $out "_keyword_ example\n"
puts $out "Some not hilighted text\n"
puts $out "> some markdown quote text\n"
puts $out "## Subheader\n"
puts $out "Some more standard text with two \"strings\" which are \"inside!\"" 
close $out
.top loadFile test.md

dgw::seditor demo image


Attachments: