Reputation: 361
I'm looking for an HTML-editor to embed in an Angular7 project. The user of the editor will be creating very simple web pages or making small edits to more complex pages. I originally thought a WYSISYG editor might do the trick but I'm finding out they aren't great for making edits to the source HTML. Does anyone have recommendations?
Here's a list of what I've considered so far:
Any suggestions that I may have overlooked?
Upvotes: 21
Views: 31386
Reputation: 847
this is the best way to implement text editor with angular easy simple and perfect work it,s work for me if any one need follow these lines of code
npm install @syncfusion/ej2-angular-richtexteditor --save
second step include the above library in app.module.ts like this
import { RichTextEditorAllModule } from '@syncfusion/ej2-angular-richtexteditor';
@NgModule({
declarations: [
AppComponent
],
imports: [
RichTextEditorAllModule
],
bootstrap: [AppComponent]
})
export class AppModule { }
and then in component view page use this line
<ejs-richtexteditor></ejs-richtexteditor>
this is result of the above text editor library
Upvotes: 9
Reputation: 41
I'm using the @kolkov/[email protected].
For solve problem's whit the special chars, I've created a replace function before sending the content for CRUD Rest API.
Code snippet :
unentityLtGt(html){
html = this.replaceAll(html,'<','<');
html = this.replaceAll(html,'>','>');
html = this.replaceAll(html,'""','"');
html = this.replaceAll(html,'""','"');
html = this.replaceAll(html,'"','"');
return html;
}
Upvotes: 4
Reputation: 576
Look no further -- I can really recommend CodeMirror :)
It's a very powerful but lightweight JS text editor which can be embedded in your html page and has a bunch of features such as..
..and it also supports HTML markup
my favorite feature is the autocompletion support -- like in your IDE you can use ctrl-space to autocomplete. You can try this feature here with the HTML example
disclaimer: I'm not a contributor to the project, but I have used it in some projects myself and would consider myself a fanboy.
Upvotes: 14
Reputation: 201
Take a look at PrimeNG and its editor, which is based on Quill Editor.
https://www.primefaces.org/primeng/#/editor
Upvotes: 5