2013-07-17 39 views
0

我想知道是否可以刪除Kendo編輯器的字體顏色工具中的一些顏色... 其實我有這個。Kendo編輯器中的自定義字體顏色工具

@(Html.Kendo().Editor() 
       .Name("Editor") 
       .Tools(tools => tools.Clear().FontColor()) 
       .HtmlAttributes(new { @class = "some_class" }) 
       .Events(e => e.Change("someEvent")) 
    ) 

我只需要允許紅色和綠色的顏色。

在此先感謝。

回答

0

試試這個代碼,

下面的代碼執行在頁面加載事件。 如果條件必須顯示哪種顏色顯示

$(".k-palette,.k-reset").find('ul.k-palette').find('li').each(function() { 
       if ($(this).attr('aria-label') === "#ffccff") 
{    
        $(this).css('display','block'); 
       } 
       else { $(this).css('display', 'none'); } 
      }); 
相關問題