Coffeescriptで多次元配列を指定する方法がわかりません。
下記はtinyMCEの設定なのですが、style_formatsの部分のような多次元になっている部分はどのように記述すれば良いのでしょうか。
よろしくお願いします。
lang
1 tinymce.init({ 2 language : 'ja', 3 inline : true, 4 hidden_input: false, 5 selector : 'div.text,h1,h2,h3,h4,h5,span.text', 6 theme: "modern", 7 plugins: [ 8 "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", 9 "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", 10 "save table contextmenu directionality emoticons template paste textcolor" 11 ], 12 content_css: "css/content.css", 13 toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l ink image | print preview media fullpage | forecolor backcolor emoticons", 14 style_formats: [ 15 {title: 'Bold text', inline: 'b'}, 16 {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}}, 17 {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}}, 18 {title: 'Example 1', inline: 'span', classes: 'example1'}, 19 {title: 'Example 2', inline: 'span', classes: 'example2'}, 20 {title: 'Table styles'}, 21 {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'} 22 ] 23 });
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2015/02/07 03:16