简体   繁体   English

夏季笔记:如何启用超链接“要显示的文本”字段

[英]Summernote: How to enable the hyperlink “Text to display” field

I use summernote for a website. 我在网站上使用summernote。 It works fine except for this: 除此之外,它工作正常:

When I create a new hyperlink simply by clicking on the link icon, I get that modal and I can create a new link, but I can't edit the "Text to display" field. 当我仅通过单击链接图标创建新的超链接时,便获得该模式,并且可以创建一个新的链接,但是我无法编辑“要显示的文本”字段。 It's disabled by the "disabled" HTML attribute. 已通过“禁用” HTML属性禁用了它。 Even if I try to remove that attribute in the inspector, the field becomes obviously but the content of it is ignored. 即使我尝试在检查器中删除该属性,该字段也将变得明显,但是其内容将被忽略。

I looked the doc and it seems not to exist a particular way to enable that. 我看了看文档,似乎不存在启用它的特定方法。 Maybe I'm wrong... 也许我错了...

Here is how I initialize it: 这是我如何初始化它:

$('.summernote').summernote({
        height: 200,
        toolbar: [
            ['style', ['style']],
            ['font', ['fontname']],
            ['size', ['fontsize']],
            ['text', ['bold','italic', 'underline', 'color']],
            ['height', ['height']],
            ['para', ['paragraph', 'ul', 'ol']],
            ['insert', ['link', 'video']],
            ['misc', ['fullscreen', 'codeview', 'undo', 'redo']]
        ]

    });

The Summernote editor's Link button appears to be designed to be clicked after text has been selected in the editor textarea. 在编辑器文本区域中选择了文本之后,Summernote编辑器的“链接”按钮似乎被设计为单击。 The selected text then shows up in the Link modal dialog in the Text to display readonly textbox. 然后,选定的文本将显示在“ 文本以显示只读”文本框中的“链接”模式对话框中。 It can't be edited in the modal dialog. 无法在模式对话框中对其进行编辑。 If you need it to say something different, first edit the text you plan to select in the editor textarea, then select that text, then click the Link button. 如果您需要说些不同的话,请首先在编辑器文本区域中编辑要选择的文本,然后选择该文本,然后单击“链接”按钮。

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

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