首页 文章

如何在ckEditor中永久添加包含单元格的表

提问于
浏览
0

我是Javascript的垃圾和ckeditor的新手......

我需要向ckeditor添加一个包含单元格的表,但不是从编辑器本身添加 . 基本上,当用户打开ckeditor时,我希望表格出现在ckeditor中 . 所以他们可以在表格中填写信息 .

这与我想做的类似:http://ckeditor.com/ckeditor_4.3_beta/samples/plugins/sourcedialog/sourcedialog.html

如果你看一下编辑器,你可以看到一些文字 .

我可以看到ckeditor使用iFrame所以我试图找到iFrame代码以便将表格代码添加到它但我找不到它 .

任何人都可以帮忙吗?

1 回答

  • 0

    当用户打开包含CKEditor的页面时, <textarea> 元素中已有的内容就在那里,因为它只是在此页面的HTML中提供 . 打开您引用的页面的来源,您将看到:

    <textarea cols="80" id="editor2" name="editor2" rows="10">
        This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.
    </textarea>
    

    请注意:您提到的样本是针对CKEditor 4.3 beta,它是在2013年发布的,您应该使用最新的稳定版本(现在是4.4.7) .

    您还可以使用以下两种CKEditor功能之一:

相关问题