ObaidUrRehman / ng-drag-drop

Drag & Drop for Angular - based on HTML5 with no external dependencies. :tada:
MIT License
239 stars 123 forks source link

Drag data with angular inputs #145

Open westlakem opened 6 years ago

westlakem commented 6 years ago

Please remove sections that are not required.

Angular inputs cut off the html.

Component.ts

  order = [
    `<div> TEST</div>`,
    `<app-ngx-editor [placeholder]="'This is the first paragraph'" [spellcheck]="true" [(ngModel)]="text"></app-ngx-editor>`,
    `<h2>Subsection 1</h2>`,
    `<h1>Title</h1>`
  ];

HTML FILE:

<div droppable [dragData]=html (onDrop)="moveItem($event)" draggable="true" *ngFor="let html of order" [innerHTML]="html" ></div>

DOM RENDERING:

<div _ngcontent-c2="" draggable="true" droppable="" class="drag-handle" ng-reflect-drag-data="<app-ngx-editor [placeholder]="></div>

should maintain all the HTML content to render in the DOM