Mercurial Hosting > sceditor
diff src/formats/bbcode.js @ 17:a199722647d0
finish last commit
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 08 Aug 2022 12:28:55 -0600 |
parents | 0cb206904499 |
children | 1334920263a2 |
line wrap: on
line diff
--- a/src/formats/bbcode.js Sun Aug 07 21:41:55 2022 -0600 +++ b/src/formats/bbcode.js Mon Aug 08 12:28:55 2022 -0600 @@ -82,9 +82,7 @@ txtExec: ['[justify]', '[/justify]'] }, font: { - txtExec: function (caller) { - var editor = this; - + txtExec: function (editor, caller) { getEditorCommand('font')._dropDown( editor, caller, @@ -98,9 +96,7 @@ } }, size: { - txtExec: function (caller) { - var editor = this; - + txtExec: function (editor, caller) { getEditorCommand('size')._dropDown( editor, caller, @@ -114,9 +110,7 @@ } }, color: { - txtExec: function (caller) { - var editor = this; - + txtExec: function (editor, caller) { getEditorCommand('color')._dropDown( editor, caller, @@ -130,8 +124,8 @@ } }, bulletlist: { - txtExec: function (caller, selected) { - this.insertText( + txtExec: function (editor, caller, selected) { + editor.insertText( '[ul]\n[li]' + selected.split(/\r?\n/).join('[/li]\n[li]') + '[/li]\n[/ul]' @@ -139,8 +133,8 @@ } }, orderedlist: { - txtExec: function (caller, selected) { - this.insertText( + txtExec: function (editor, caller, selected) { + editor.insertText( '[ol]\n[li]' + selected.split(/\r?\n/).join('[/li]\n[li]') + '[/li]\n[/ol]' @@ -157,9 +151,7 @@ txtExec: ['[code]', '[/code]'] }, image: { - txtExec: function (caller, selected) { - var editor = this; - + txtExec: function (editor, caller, selected) { getEditorCommand('image')._dropDown( editor, caller, @@ -183,9 +175,7 @@ } }, email: { - txtExec: function (caller, selected) { - var editor = this; - + txtExec: function (editor, caller, selected) { getEditorCommand('email')._dropDown( editor, caller, @@ -200,9 +190,7 @@ } }, link: { - txtExec: function (caller, selected) { - var editor = this; - + txtExec: function (editor, caller, selected) { getEditorCommand('link')._dropDown( editor, caller, @@ -220,9 +208,7 @@ txtExec: ['[quote]', '[/quote]'] }, youtube: { - txtExec: function (caller) { - var editor = this; - + txtExec: function (editor, caller) { getEditorCommand('youtube')._dropDown( editor, caller,