Home  >  Article  >  Backend Development  >  关于Ueditor获取输入内容默认样式的问题

关于Ueditor获取输入内容默认样式的问题

WBOY
WBOYOriginal
2016-06-23 13:39:231294browse

我想在Ueditor初始化时给输入的内容加上样式,initialStyle配置了但是不好用,只是样式显示了,但是我在Action里得到的内容只是

xxxx

根本没有加上样式,我想问一下,这东西到底怎么用,如何能在为选择字体和字号的情况下给输入的内容加上一个指定样式,并且可以接收到存入数据库,我调查了一下,使用这个属性的时候编辑器是将样式加载在body的引用css内,只用当选中内容在更改字体和字号的时候才能在

标签内添加。如何可以在初始化的时候我就给内容添加一个指定默认的?有没有那位大神用过,麻烦告诉我一声。谢谢。


回复讨论(解决方案)

有没有人用过啊?

也遇到了相同的问题!求解

//customstyle
        //自定义样式,不支持国际化,此处配置值即可最后显示值
        //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置
        //尽量使用一些常用的标签
        //参数说明
        //tag 使用的标签名字
        //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同,
        //style 添加的样式
        //每一个对象就是一个自定义的样式
        //,'customstyle':[
        //      {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'},
        //      {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'},
        //      {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'},
        //      {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'}
        //  ]

请问楼主这个问题解决了么,我也遇到这个问题了,求赐教

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn