GithubHelp home page GithubHelp logo

Comments (18)

sushmithakumar avatar sushmithakumar commented on May 22, 2024 2

2018-03-28-18-42-38
This is the error when used ng serve

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024 1

Do not worry, you can use it in the same way, I'll show you an example:

HTML CODE

<quill-editor id="detailEditTxt" name="detailEditTxt" [(ngModel)]="var_detailString"
                    [options]="editorOptions">
                </quill-editor>

TYPE SCRIPT CODE

// Configurations
    // Specific options for toolbox
    public toolbarOptions = [['bold', 'italic'], ['link', 'image']];

    // Set options
    public editorOptions = {
        placeholder: 'Write your text here ...'
        , modules: {
            toolbar: this.toolbarOptions
          }
    };

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

I can help you, I have integrated the project with Angular 5, what is the doubt you have?

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

OK, I'll explain my case:
I install:
npm ngx-quill-editor --save

in app.module.ts:

import { QuillEditorModule } from 'ngx-quill-editor';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    QuillEditorModule,
  ], ...

Then, on the project:,

TS page:
public my_string: string;

HTML page:
<quill-editor name="detailEditTxt" [(ngModel)]="my_string"></quill-editor>
This will place all the text, images and links to videos that you write in the variable "my_string".
To see the result, just place a button that will run console.log (this.my_string).

Try it and tell me. In case of any error, please share it here.

Regards!

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

Hi!
The variable "my_string" is the data model, this can be a simple string variable or an attribute of a data model. in this example, i use the variable "v_text":

captura de pantalla 2018-03-22 a la s 16 31 18

captura de pantalla 2018-03-22 a la s 16 23 29

Within the attribute or variable, all the content that is being introduced in the quill control will be stored, text with format, images (these are automatically converted to base64), links to videos, etc. Everything is stored in HTML format.

captura de pantalla 2018-03-22 a la s 16 28 02

Into DataBase
This would show the content inside the variable "v_text":

captura de pantalla 2018-03-22 a la s 16 25 58

All that html text, you store it in database, you send it by mail, etc.

If you want to add a style sheet, what you comment is correct, your snow.css style sheet can be placed in the angular-cli.json file, in the "styles" section, example:

"styles": [
         "styles.css",
         "assets / styles / sidenav.css",
]

I hope I have helped you, if you have more questions, please write them here, to help you.

regards!

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

haa ok!,
In this web it will help you to personalize the editor:
https://quilljs.com/docs/modules/toolbar/

ngx-quill-editor is developed based on quilljs.

Regards!

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

What is the error?

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

Please, attach too your code please.

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

npm ngx-quill-editor --save
So 2.2.4 version got installed .
In app.module.ts file
import { QuillEditorModule } from 'ngx-quill-editor';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
QuillEditorModule,
], ...
TS page:
public my_string: string;

HTML page:
<quill-editor name="detailEditTxt" [(ngModel)]="my_string">

Till here it was fine
It appeared with all the tools in it.
After that to customize where I needed only bold italic underline image and link
For that I used
Configurations
// Specific options for toolbox
public toolbarOptions = [['bold', 'italic'], ['link', 'image']];

// Set options
public editorOptions = {
    placeholder: 'Write your text here ...'
    , modules: {
        toolbar: this.toolbarOptions
      }
};

Initially it was working though it had one error..
For the semi-colon in the above piece of code.
Then after doing some alterations with the comma and semicolon.It gave me this error when I tried to clean build the file ng build as initially with editor options I was getting one error but rendered on chrome later when used ng build and ng serve got webpack compile failed and the lines of error above attached.

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

After adding it started giving error as ngx quill editor not found..Then I changed this line
import { QuillEditorModule } from 'ngx-quill-editor'; to import { QuillEditorModule } from './node_modules/ngx-quill-editor';

I'm using angular cli

from ngx-quill-editor.

sushmithakumar avatar sushmithakumar commented on May 22, 2024

1.5.0 and angular/compiler-cli version 5.0.0

from ngx-quill-editor.

ShiruJan avatar ShiruJan commented on May 22, 2024

mmm ok,
update the version to "ngx-quill-editor": "2.2.2" and you start again from the beginng.

When it works again, add the controls configuration.

from ngx-quill-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.