Froala editor - no data is getting fetch except data on First Line

房东的猫 提交于 2019-12-04 05:56:21

问题


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.

Image of my home.html

js code in home.ts

  onsubmit(value: any) {

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

home.html code

<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.


回答1:


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.



来源:https://stackoverflow.com/questions/49389762/froala-editor-no-data-is-getting-fetch-except-data-on-first-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!