Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full toolbar options from Quilljs #295

Closed
TauanMatos opened this issue Nov 29, 2018 · 11 comments
Closed

Full toolbar options from Quilljs #295

TauanMatos opened this issue Nov 29, 2018 · 11 comments

Comments

@TauanMatos
Copy link

Is there a way to use this full option toolbar or I have to create a custom toolbar?

image

@TauanMatos TauanMatos changed the title Full toolbar from Quilljs Full toolbar options from Quilljs Nov 29, 2018
@KillerCodeMonkey
Copy link
Owner

KillerCodeMonkey commented Nov 29, 2018 via email

@KillerCodeMonkey
Copy link
Owner

did you got it?

@KillerCodeMonkey
Copy link
Owner

in the quilljs example they build it up with custom toolbar config

modules: {
        'syntax': true,
        'toolbar': [
          [{ 'font': [] }, { 'size': [] }],
          [ 'bold', 'italic', 'underline', 'strike' ],
          [{ 'color': [] }, { 'background': [] }],
          [{ 'script': 'super' }, { 'script': 'sub' }],
          [{ 'header': '1' }, { 'header': '2' }, 'blockquote', 'code-block' ],
          [{ 'list': 'ordered' }, { 'list': 'bullet'}, { 'indent': '-1' }, { 'indent': '+1' }],
          [ 'direction', { 'align': [] }],
          [ 'link', 'image', 'video', 'formula' ],
          [ 'clean' ]
    ]
 }

@test0017
Copy link

I have created the above modules in component but with [modules] its not working .

@KillerCodeMonkey
Copy link
Owner

are there some errors or could you share some code?

And you can checkout the linked demo - example repositories. there you have working examples :)

@patchworkfish
Copy link

Hi guys - similarity between this thread and "How to show all available buttons by default? #1335"

I cannot find a complete definition of setting the tool bar options using JSON, extending what is shown by @KillerCodeMonkey above (from the readme).
For example, if I want to show the align buttons next to each other rather then a list, I cannot find how to reference the LEFT align button! The below example shows center and right (found by trial and error) but left does not work! :

 var quillToolbarOptions = [
        ...
        [{ 'align': 'left'}, { 'align': 'center'}, {'align': 'right'}],
        ...
];

@KillerCodeMonkey
Copy link
Owner

this is a quill issue. and just checkout the quilljs repo and search the code for this:

https://github.com/quilljs/quill/blob/f32aa5f5360e90920d0a4ecf0d029c5135a24975/docs/index.html#L87

align left is the default alignment so it does not has a specific value... try empty string or null

@patchworkfish
Copy link

That did solve the specific text-align example there, thanks @KillerCodeMonkey. I had seen that HTML code example, but without your guidance couldn't make the leap.

@KillerCodeMonkey
Copy link
Owner

no probs 😉

@relidrissihsaini
Copy link

is there a possibility to add a table too at toolbar module ?

@KillerCodeMonkey
Copy link
Owner

KillerCodeMonkey commented Sep 4, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants