Code Monkey home page Code Monkey logo

Comments (10)

KillerCodeMonkey avatar KillerCodeMonkey commented on August 16, 2024

this has nothing to do with the angular module.
You can do this with quill-themes.

There you can overwrite the css-classes to build your own themes.
To use a custom theme read this:
http://quilljs.com/docs/themes/

from ng-quill.

matikun86 avatar matikun86 commented on August 16, 2024

I think you can't do what I'm saying with Quill themes as they are css files to customize the way it looks and I'm talking about changing the <option> tags that are in the <select class="ql-size" ...> element.

Right now the directive is configured as:

templateUrl: 'ngQuill/template.html'

and down below in the return $templateCache.put('ngQuill/template.html', it is hardcoded to:

'<select title="{{dict.size}}" class="ql-size" ng-if="shouldShow([\'size\'])">' +
  '<option value="10px">{{dict.small}}</option>' +
  '<option value="13px" selected="">{{dict.normal}}</option>' +
  '<option value="18px">{{dict.large}}</option>' +
  '<option value="32px">{{dict.huge}}</option>' +
'</select>' +

I was saying that would be nice to have a parameter to send font-size options as value-label objects. I.E.:

[{
  label: 'Paragraph',
  value: '14px'
}, {
  label: 'Subtitle',
  value: '18px'
}, {
  label: 'Title',
  value: '24px'
}]

Or to be able to configure another template file path and let each user deal with their own complex and exhausting html files ๐Ÿ˜

from ng-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on August 16, 2024

sry my fault.

feel free to implement it your self and send me a pull request ;)

from ng-quill.

matikun86 avatar matikun86 commented on August 16, 2024

@KillerCodeMonkey No problem!
I'm working in a PR right now. Maybe is not as good as to merge it as is but I hope in best case scenario it's an approach you can tweak.
I'll send you the PR today or tomorrow.

Thank you very much for the quick feedback!

from ng-quill.

matikun86 avatar matikun86 commented on August 16, 2024

PR created for this issue

from ng-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on August 16, 2024

i will change your code a little bit --> instead of working with the rootScope i will add a configProvider, that can be extended and clean configured.

why do you added $rootScop.message in the demo.html?

from ng-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on August 16, 2024

added config provider and created a new release

from ng-quill.

matikun86 avatar matikun86 commented on August 16, 2024

Oh no, I just used $rootScope because I needed to test it because otherwise I would have added a new controller to do that. But wasn't supposed to be clean at all.
i will change your code a little bit --> instead of working with the rootScope i will add a configProvider, that can be extended and clean configured. ๐Ÿ‘ awesome

from ng-quill.

arunvenugopal11 avatar arunvenugopal11 commented on August 16, 2024

@matikun86 @KillerCodeMonkey Hey guys, I'm wondering how I can add custom font size dropdown into the toolbar. Is there a demo I can refer to? Thanks!

from ng-quill.

KillerCodeMonkey avatar KillerCodeMonkey commented on August 16, 2024

from ng-quill.

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.