【问题标题】:Tiny editor is not getting post value微小的编辑器没有获得后期价值
【发布时间】:2013-07-24 17:49:40
【问题描述】:

这是我正在使用的代码

<textarea name="tinyeditor" id="tinyeditor" style="width: 800px; height: 500px"></textarea>
<script>
   var editor = new TINY.editor.edit('editor', {
    id: 'tinyeditor',
    width: 750,
    height: 350,
    cssclass: 'tinyeditor',
    controlclass: 'tinyeditor-control',
    rowclass: 'tinyeditor-header',
    dividerclass: 'tinyeditor-divider',
    controls: ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|',
        'orderedlist', 'unorderedlist', '|', 'outdent', 'indent', '|', 'leftalign',
        'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n',
         'image', 'hr', 'link', 'unlink', '|', 'print'],
    footer: true,
    fonts: ['Verdana','Arial','Georgia','Trebuchet MS'],
    xhtml: true,        
    bodyid: 'editor',
    footerclass: 'tinyeditor-footer',
    toggle: {text: 'source', activetext: 'wysiwyg', cssclass: 'toggle'},
    resize: {cssclass: 'resize'}
   });
</script>

我的帖子输出是这样的

Array ( [tinyeditor] => [templatename] => test [content] => [textedito] => [Submit_x] => 48 [Submit_y] => 14 ) 

如果我从文本区域中删除 id="tinyeditor" 则发布值即将到来

【问题讨论】:

  • 为什么要使用 codeigniter-2 和 codeigniter-url 标签?
  • 我在codeigniter中实现这就是为什么!!!!!!!!!,请帮助我
  • 在发布之前,您很可能没有正确地将 tinyeditor 值移动到原始文本区域。 阅读 tinyeditor 的文档。
  • 你能发布一个链接到它的文档吗?除了代码中的 cmets 和简短的自述文件,我找不到文档页面

标签: php jquery codeigniter iframe rich-text-editor


【解决方案1】:

你需要用JS从编辑器发布数据:

$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });

.submit 是提交按钮的类别

【讨论】:

    【解决方案2】:

    简单的方法:

    粘贴你的脚本:

    var editor = new TINY.editor.edit('editor', { id: '小编辑器', 等等……

    在按钮表单上

    input type="submit" value="Envoyer" onClick="editor.post();"

    等等

    【讨论】:

      猜你喜欢
      • 2010-10-12
      • 1970-01-01
      • 2012-02-16
      • 1970-01-01
      • 1970-01-01
      • 2016-10-20
      • 2021-03-28
      • 2016-01-30
      • 2018-04-08
      相关资源
      最近更新 更多