Froala编辑器 - 除了First Line上的数据外,没有数据被获取 [英] Froala editor - no data is getting fetch except data on First Line

查看:475
本文介绍了Froala编辑器 - 除了First Line上的数据外,没有数据被获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经整合了froala,但正如我的问题所述,我只能获取第1行的数据。当我按回车并在第2行输入任何内容时,它没有获取。

I have integrated froala but as my question states, i am only able to fetch the data which is on line 1. When i press enter and type anything on line 2, it is not getting fetch.


以下是图片代表和我的代码。

Below please find image respresentation and my code.

home.html的图片

家庭网站中的js代码

  onsubmit(value: any) {

    this.TAG = $('#froala-editor_child').html();
    console.log("fetching value2");
    console.log(this.TAG);

home.html代码

<div id="froala-editor"><div id="froala-editor_child">Hello, Froala inline!</div></div>
<button (click)="onsubmit(com.value)">Click me</button>

我希望我能够完全解释我的问题。请指导如何解决此问题。

I hope i am able to fully explain my problem. Please guide how can this issue be resolved.

推荐答案

获取编辑后的HTML的正确方法是使用编辑器内部 html.get 方法: https:// www.froala.com/wysiwyg-editor/examples/getHTML

The correct way of getting the edited HTML is by using the editor internal html.get method: https://www.froala.com/wysiwyg-editor/examples/getHTML.

这篇关于Froala编辑器 - 除了First Line上的数据外,没有数据被获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆