将<span样式>凯迪托
change the <span style> of ckeditor
我在表单的texares中使用了ckeditor,但网站的背景是黑色的,所以我想要更改默认样式。我有一个基本的工具栏:
CKEDITOR.replace( 'editor1',
{
toolbar : [ [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-',
'Link', 'Unlink','-']]
});
我想更改的跨度样式是(默认):
<span style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans; font-size: 11px;
line-height: 14px; text-align: justify; ">
哪里可以更改默认值??
您想要做的是使用自定义样式:
CKEDITOR.addStyleSet( 'myStyles', [
{
name: 'Custom span',
element: 'span',
styles:
{
'color': 'rgb(0,0,0)',
'font-family': 'Arial, Helvetica, sans',
'font-size': '11px',
'line-height': '14px',
'text-align': 'justify'
}
}
]);
CKEDITOR.replace( 'editor1', { styleSet: 'myStyles:/styles.js' } )
请参阅:http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles
<textarea cols="100" id="editor1" name="editor1" rows="10">This is some sample text</textarea>
<script type="text/javascript">
// Replace the <textarea id="editor1"> with an CKEditor instance.
var editor = CKEDITOR.replace( 'editor1' );
editor.on( 'instanceReady', function( ev ){
//set the background properties
this.document.$.childNodes[1].childNodes[1].style.backgroundColor = 'Blue';
editor.focus();
});
</script>
相关文章:
- 将<span样式>凯迪托
- 排序<李><Ul>根据<span>内部<李>
- 如何隐藏空<span>在IE中使用javascript.(注意,在其他浏览器中工作正常)
- 点击功能在<span>
- 如何获得<span>价值
- 将换行符写入<span>元素
- jQuery访问列表视图->ul->李->span->img
- javascript页面加载检查是否存在具有特定类的span(在<tr>下),如果不存在,则删除整个<
- 如何在单击按钮时显示文本(按钮被<span></span>标记包围)
- Kendo UI-将Text()括起来的文本转换为<span>编码HTML
- 充满<span>标签
- 选择2模板<span>文本</span>在选择渲染中
- 如何在<span>在<tr>具有不同行为的标签(onclick)
- 白内障患者可以't点击嵌入式<span>内部<a>要素
- 如何从HTML<输入>元素设置为<span>使用JavaScript.innerHTML
- 用<为纯文本字符串着色;span>元素
- a<span>在DOM中动态附加
- <的缺少单击事件;span>内部<按钮>元素
- 求和字符串在<span></span>使用javascript
- 如何将处理程序附加到<span>