0.7.0 • Published 5 years ago

cause-report-configuration v0.7.0

Weekly downloads
-
License
MPL-2.0
Repository
-
Last release
5 years ago

ReportConfiguration

Installing with npm

$ npm install --save cause-report-configuration

Initialization of the Text-Editor Component

In order to use the Text-editor, make sure to import TextEditorModule in your module and add it to the import list:

imports: [
    ...
    TextEditorModule
  ],

After that, you can call an instance with html.

<app-text-editor 
       #textEditor 
       id="textEditor" 
       [(documentContent)]="selectedTemplate.data" 
       [(placeholders)]="placeholders" 
       (loadDataEvent)="openDialog()" 
       (saveDataEvent)="saveTemplate()">
</app-text-editor> 

The editor component offers various inputs and outputs which can bind to your own components. You can add two-way binding to the data contained within the editor. You can send a list of placeholder options that will be embedded within the editor's menu. You can bind callbacks to decide what to do when the load or save button is pressed.

Customization

To see all available features of CKEditor, please visit the official website: https://ckeditor.com/ckeditor-4/

Customization of the editor's appearance

To change how the editor looks, you need to modify the css file: 'src/assets/document-editor.css'

Customization of the editor's menus

All settings can be tinkered with within the configuration file ('src/app/text-editor/shared/ckeditor-configuration.ts'). If you wish to add custom buttons that don't exist anywhere, please follow the following guide: https://stackoverflow.com/questions/1957156/how-to-add-a-custom-button-to-the-toolbar-that-calls-a-javascript-function

Customization with plugins

The CKEditor community is very active and offers a wide selection of plugins: https://ckeditor.com/cke4/addons/plugins/all These plugins can be downloaded directly and added to the directory: './src/assets/ckeditor/plugins' To include them in the editor's instance, make sure to modify the configuration file ('./src/app/text-editor/shared/ckeditor-configuration.ts') by adding the name of the plugin to the following line: extraPlugins: 'widget,tabletools,imageresizerowandcolumn,NAME_OF_THE_NEW_PLUGIN',.

You can also dynamically load a plugin from an external directory by adding window.CKEDITOR.plugins.addExternal(NAME_OF_THE_NEW_PLUGIN, PATH_TO_YOUR_PLUGIN_DIRECORY); before this.editor = window.CKEDITOR.replace('editor', ckeditorConfiguration); is called in './src/app/text-editor/test-editor.component.ts'.

You can even design your own plugins to interact with the editor. Find more information here: https://ckeditor.com/docs/ckeditor4/latest/guide/plugin_sdk_sample.html When designing your own plugins, it is important to place them in the './src/assets/custom_plugins/' folder to avoid overwriting them when updating the plugins' folder within the ckeditor.

0.7.0

5 years ago

0.6.81

5 years ago

0.6.80

5 years ago

0.6.79

5 years ago

0.6.78

5 years ago

0.6.67

5 years ago

0.6.66

5 years ago

0.3.23

5 years ago

0.3.22

5 years ago

0.3.21

5 years ago

0.2.22

5 years ago

0.2.20

6 years ago

0.2.19

6 years ago

0.2.18

6 years ago

0.2.17

6 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago