bn-wysiwyg
This Blognode project allows to add a What You See Is What You Get editor to any angular application.
Installation
npm install bn-wysiwyg --save
Add it to your main app module:
import { BnWysiwyg } from 'bn-wysiwyg';
@NgModule({
imports: [BnWysiwyg]
})
And use it in your Application:
<bn-wysiwyg></bn-wysiwyg>
Configuration
The configuration is based on attributes and tags you can add to your project to change the behavior.
Non inline browser
By default the Wysiwyg editor is an inline editor. If you like to use an editor panel instead you need to
disable the inline mode. Afterwards you can place the editor component anywhere on the page.
<bn-wysiwyg [inline]="false"></bn-wysiwyg>
<bn-editor></bn-editor>
Asigned editor panel
The editor panel is assigned to all <bn-wysiwyg>
on the page. To assign it to a specific one, you need to assign
it via the for
attribute. It accepts any valid query selector.
<bn-wysiwyg class="example" [inline]="false"></bn-wysiwyg>
<bn-editor for=".example"></bn-editor>