Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49253

How to insert text in TinyMCE Editor where the cursor is?

$
0
0

@setu1421 wrote:

I am trying to use angular2-tinymce library in my project. I have successfully integrated tinymce in my module. But i could not find any way to insert text from where the cursor is in the tinymce editor.

// in add-progress-note.module.ts file
@NgModule({
  declarations: [
    AddProgressNotePage,
  ],
  imports: [
    IonicPageModule.forChild(AddProgressNotePage),
    TinymceModule.withConfig({
      menubar: false,
      plugins: ['textcolor'],
      toolbar: 'forecolor',
      resize: false,
      statusbar: false
    })
  ]
})

// in add-progress-note.html file
<ion-row class="note-editor" id="noteArea">
            <app-tinymce class="note-input-textarea" [(ngModel)]='noteText' (ngModelChange)="onChangeNote()"></app-tinymce>
</ion-row>

// in add-progress-note.ts file
  onChangeNote(): void {
    console.log(this.noteText);
  }

I have see these links: link1 and link2. But i could not write the callback in setup config of TinymceModule

How to incorporate text inserting from cursor in tinymce editor in my code?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49253

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>