使用jquery.cleditor.css从文本框插入数据库,然后使用HTML标记

时间:2015-01-21 08:26:36

标签: php jquery html css textarea

我正在使用cleditor到我的应用程序来创建一个交互式texarea。你可以从中得到它:cleditor

cleditor css的默认值如下:

    .cleditorMain {border:1px solid #ddd; padding:0 1px 1px; background-color:white}
    .cleditorMain iframe {border:none; margin:0; padding:0}
    .cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:20pt Arial,Verdana; resize:both; outline:none /* webkit grip focus */}
    .cleditorToolbar {background: url('../img/toolbar.gif') repeat}
    .cleditorGroup {float:left; height:26px}
    .cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('../img/buttons.gif')}
    .cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
    .cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
    .cleditorPopup {border:solid 1px #999; background-color:white; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
    .cleditorList div {padding:2px 4px 2px 4px}
    .cleditorList p,
    .cleditorList h1,
    .cleditorList h2,
    .cleditorList h3,
    .cleditorList h4,
    .cleditorList h5,
    .cleditorList h6,
    .cleditorList font {padding:0; margin:0; background-color:Transparent}
    .cleditorColor {width:150px; padding:1px 0 0 1px}
    .cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
    .cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
    .cleditorPrompt input,
    .cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
    .cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}

我的问题是2:

  1. 当我使用提交按钮向数据库提交一些文本时,html标记仍然是纯文本?如何在提交之前将其删除? 例如,我输入:“Hello”输入“World”,然后,在mysql表中提交文本看起来像这样“Hello”标签br“World
  2. 如何更改textarea的宽度,我尝试更改iframe并调整大小,仍然无法正常工作?
  3. 感谢您的帮助

0 个答案:

没有答案