Skip to content

Instantly share code, notes, and snippets.

@tscolari
Last active December 23, 2015 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tscolari/6601711 to your computer and use it in GitHub Desktop.
Save tscolari/6601711 to your computer and use it in GitHub Desktop.
$.sceditor.command.set(
"h1",
{
exec: function(content) {
"[h1]"+content+"[/h1]"
},
txtExec: ["[h1]", "[/h1]"]
}
)
$.sceditorBBCodePlugin.bbcode.set(
"h1",
{
allowsEmpty: true,
tags: {
h2: {
"class" : "heading1"
}
}
format: function(element, content) {
return "[h1]"+content+"[/h1]"
},
html: format(token, attrs, content) {
return "<h2 class='heading1'>"+content+"</h2>"
}
}
)
$.sceditor.command.set(
"h2",
{
exec: format(content) {
return "[h2]"+content+"[/h2]"
},
txtExec: ["[h2]", "[/h2]"]
}
)
$.sceditorBBCodePlugin.bbcode.set(
"h2",
{
allowsEmpty: true,
tags: {
h1: {
"class" : "heading2"
}
}
format: function(element, content) {
return "[h2]"+content+"[/h2]"
},
html: function(token, attrs, content) {
return "<h2 class='heading2'>"+content+"</h2>"
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment