@@ -3,10 +3,6 @@ import { addLink, addScript } from '../../../BootstrapBlazor/modules/utility.js'
33import Data from '../../../BootstrapBlazor/modules/data.js'
44import EventHandler from '../../../BootstrapBlazor/modules/event-handler.js'
55
6- if ( window . BootstrapBlazor === void 0 ) {
7- window . BootstrapBlazor = { } ;
8- }
9-
106export async function init ( id , invoker , methodGetPluginAttrs , methodClickPluginItem , height , value , lang , langUrl , hasUpload ) {
117 const el = document . getElementById ( id )
128 if ( el === null ) {
@@ -45,7 +41,6 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI
4541
4642 const showSubmit = el . getAttribute ( "data-bb-submit" ) === "true"
4743 option . toolbar = toolbar ;
48- reloadCallbacks ( id , option ) ;
4944 if ( hasUpload ) {
5045 option . callbacks . onImageUpload = async files => {
5146 editor . files = files
@@ -142,23 +137,6 @@ export async function init(id, invoker, methodGetPluginAttrs, methodClickPluginI
142137 await initEditor ( ) ;
143138}
144139
145- const reloadCallbacks = ( id , option ) => {
146- const events = [ 'Blur' , 'BlurCodeview' , 'Change' , 'ChangeCodeview' , 'DialogShown' , 'Enter' , 'Focus' , 'ImageUpload' , 'ImageLinkInsert' , 'ImageUploadError' , 'Init' , 'Keydown' , 'Keyup' , 'Mousedown' , 'Mouseup' , 'Paste' , 'Scroll' ] ;
147-
148- const callbacks = window . BootstrapBlazor ?. SummerNote ?. callbacks ;
149- const cb = callbacks ?. find ( i => i . id === id ) ;
150- if ( cb ) {
151- events . forEach ( event => {
152- const method = cb [ `on${ event } ` ] ;
153- if ( method ) {
154- option . callbacks [ `on${ event } ` ] = function ( ) {
155- method . apply ( this , arguments ) ;
156- } ;
157- }
158- } ) ;
159- }
160- }
161-
162140export function update ( id , val ) {
163141 const editor = Data . get ( id )
164142 if ( editor . $editor ) {
0 commit comments