简体   繁体   English

如何删除CKEditor的textarea而仅使用其工具栏?

[英]How can i remove textarea of CKEditor and only use its toolbar?

I want to implement CKEditor for my web application. 我想为我的Web应用程序实现CKEditor。 I don't need it on every textarea, I want only one CKEditor toolbar on my navigation panel. 我不需要每个文本区域,我只需要导航面板上的一个CKEditor工具栏。 so for that I need to remove default textarea from CKEditor, all I am saying is how can i only use toolbar of CKEditor? 因此,我需要从CKEditor中删除默认的textarea,我要说的是我怎么只能使用CKEditor的工具栏?

See in image I have 2 textarea controls and both are having same toolbar, neither its not looks good nor its good way to implementation. 如图所示,我有2个textarea控件,并且都具有相同的工具栏,它看起来既不好也不是实现的好方法。 So i want a single toolbar on top of the page for my both textarea controls. 所以我想在页面顶部为我的两个textarea控件提供一个工具栏。

Here is my HTML code: 这是我的HTML代码:

<body>
<form method="post">
    <p>
        My Editor:<br />
        <textarea id="editor1" name="editor1"></textarea>
        <textarea id="editor1" name="editor2"></textarea>
        <script type="text/javascript">

        CKEDITOR.replace('editor1', { height: 100 });
        CKEDITOR.replace('editor2', { height: 200 });
        </script>
    </p>
    <p>
        <input type="submit" />
    </p>
</form>
</body>

In image i have shown circled area which I want. 在图像中,我显示了我想要的圆圈区域。

在此处输入图片说明

在此处输入图片说明

Most probably you are looking for the shared space plugin, see the example here: http://sdk.ckeditor.com/samples/sharedspace.html 最有可能您正在寻找共享空间插件,请参见此处的示例: http : //sdk.ckeditor.com/samples/sharedspace.html

The optional Shared Space plugin makes it possible to share the same editor toolbar and bottom bar among several CKEditor instances. 可选的Shared Space插件使在多个CKEditor实例之间共享相同的编辑器工具栏和底部栏成为可能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM