File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 14091409 timer : null ,
14101410 updating : false ,
14111411 iconRegistered : false ,
1412- iconName : 'evo-file '
1412+ iconName : 'link '
14131413 } ;
14141414 const showEvoNotice = ( text ) => {
14151415 if ( editor . notificationManager && typeof editor . notificationManager . open === 'function' ) {
15591559 results . forEach ( ( item ) => {
15601560 const text = item . title || item . pagetitle || item . alias || String ( item . id ) ;
15611561 const value = String ( item . id ) ;
1562- if ( ! evoState . iconRegistered && item . icon && tinymce ?. IconManager ?. add ) {
1563- tinymce . IconManager . add ( evoState . iconName , item . icon ) ;
1564- evoState . iconRegistered = true ;
1562+ let iconName = 'link' ;
1563+ if ( item && typeof item . icon === 'string' && item . icon . trim ( ) ) {
1564+ const rawIcon = item . icon . trim ( ) ;
1565+ if ( rawIcon . indexOf ( '<svg' ) !== - 1 && tinymce ?. IconManager ?. add ) {
1566+ if ( ! evoState . iconRegistered && evoState . iconName !== 'link' ) {
1567+ tinymce . IconManager . add ( evoState . iconName , rawIcon ) ;
1568+ evoState . iconRegistered = true ;
1569+ }
1570+ if ( evoState . iconRegistered ) {
1571+ iconName = evoState . iconName ;
1572+ }
1573+ } else {
1574+ iconName = rawIcon ;
1575+ }
15651576 }
1566- items . push ( { text, value, icon : evoState . iconRegistered ? evoState . iconName : 'none' } ) ;
1577+ items . push ( { text, value, icon : iconName } ) ;
15671578 map [ value ] = item ;
15681579 } ) ;
15691580 evoState . searchItems = items ;
Original file line number Diff line number Diff line change 5959 return strcmp ($ aTitle , $ bTitle );
6060 });
6161
62- $ iconHtml = '' ;
63- if (function_exists ('svg ' )) {
64- try {
65- $ iconHtml = svg ('tabler-file ' )->toHtml ();
66- } catch (\Throwable $ e ) {
67- $ iconHtml = '' ;
68- }
69- }
62+ $ iconHtml = 'link ' ;
7063
7164 $ output = [];
7265 foreach ($ rows as $ row ) {
You can’t perform that action at this time.
0 commit comments