Summernote 在浏览器中输出代码而不是格式化文本

Summernote outputting code instead of formatted text in the browser

我在 meteor 中使用 mpowaga/meteor-autoform-summernote 包。我能够成功地在数据库中插入数据,但是在浏览器中输出数据时它显示这样的代码

<p><b>abstract text comes here...</b></p> 

而不是

摘要文字出现...

文章架构

@Articles = new Meteor.Collection('articles');

Schema = {}

Schemas.Articles = new SimpleSchema
    abstract:
        optional:true
        type: String
        autoform:
            afFieldInput:
                type: 'summernote'
                class: 'abstract'
                height: 200

文章模板

<table class="table table-bordered article-table">
            <tbody>
                {{#each articles}}
                    <tr>
                        <td colspan="2">
                            <h3>{{title}}</h3>
                            <p class="abstract-wrapper">
                                <p class="abstracts">
                                    {{abstract}}
                                </p>
                            </p>
                        </td>
                        <td>
                            <button type="button" class="btn btn-primary edit">Edit</button>
                        </td>
                        <td>
                            <button type="button" class="btn btn-danger delete">Delete</button>
                        </td>
                    </tr>
                {{/each}}
            </tbody>
        </table>

您需要使用空格键模板的转义语法:

{{{abstract}}}

不会将其呈现为文本,而是呈现为 HTML。