简体   繁体   English

javascript Trumbowyg wysiwyg编辑器没有显示活动按钮?

[英]javascript Trumbowyg wysiwyg editor not show active button?

javascript Trumbowyg wysiwyg editor not show active button ? javascript Trumbowyg wysiwyg编辑器not show active按钮?

With this code, when fill some char into editor and select all text and then press B button. 使用此代码,将一些char填入编辑器并选择所有文本然后按B按钮。 All text will bold but why B button not show active. 所有文字都会加粗,但为什么B按钮不显示活动状态。

REMARK : italic button [I] not show active too 备注:斜体按钮[I]也不显示活动状态

How can i do ? 我能怎么做 ?

http://plnkr.co/edit/hhlL0uPNJr16osyKzKRw?p=preview . http://plnkr.co/edit/hhlL0uPNJr16osyKzKRw?p=preview

.

.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
    <script src="https://cdn.rawgit.com/Alex-D/Trumbowyg/v2.4.1/dist/trumbowyg.min.js"></script>
    <link rel="stylesheet" href="//cdn.rawgit.com/Alex-D/Trumbowyg/v2.4.1/dist/ui/trumbowyg.min.css">

    <div id="main" role="main">
        <div id="editor">
        </div>
    </div>

    <script>
        /** Default editor configuration **/
        $('#editor').trumbowyg(
            {
                btns: [
                    ['bold', 'italic', 'underline', 'strikethrough']
                ]
            }
        );
    </script>

The btn names used in JavaScript have developer proper names. JavaScript中使用的btn名称具有开发人员专有名称。 For this purpose you must use script like this: 为此,您必须使用以下脚本:

btns: ['strong', 'em', 'del']

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

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