← すべてのドキュメント

editor.createToolbarDropDown

既定のスタイルでツールバーにドロップダウンを作成します。詳しくはプラグインの例を参照してください。

構文

editor.createToolbarDropDown(option,cmdname)

パラメーター

型:object

option オブジェクトでは、fillinput と fillpanel のオプションを設定できます。

型:String

コマンドの名前。

パラメーター

型:HTMLElement

ツールバーのドロップダウン。

使用例

var editor1 = new RichTextEditor("#div_editor1");
var option={}
option.fillinput=function(span){span.innerText='select..'}
option.fillpanel=function(panel){panel.style.width='80px';panel.innerHTML='<div>a</div><div>b</div>'}
var dropdown=editor1.createToolbarDropDown(option,"mycmd");
editor1.container.parentNode.insertBefore(dropdown,editor1.container);