Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$.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
You can’t perform that action at this time.