Search code examples
cssangularangular-directive

Change style/format of selected text - Angular


I'm creating forum and I want the forum to have an area for the user the enter the description, etc similar to what stackoverflow has. Is there's a tool already out there? if not, how can I format selected text in the textarea with angular.

<button (click)="boldSelectedText()">Bold Text</button>

<textarea rows="4" cols="50">
  At w3schools.com you will learn how to make a website. We offer free 
  tutorials in all web development technologies. 
</textarea>

In the picture below is a screenshot of how the one from SO looks like. If you see there a button to bold selected text.

enter image description here


Solution

  • https://docs.ckeditor.com/ckeditor5/latest/api/ good one for angular or you can google wysiwyg editor for angular