Giter Club home page Giter Club logo

list-style's People

Contributors

hphoeksma avatar paxuclus avatar prgfx avatar

Watchers

 avatar  avatar

Forkers

prgfx upassist

list-style's Issues

State of the plugin

I looked into enabling the options for ordered lists, but I came across some things I don't want to touch before I am sure about the intentions behind them.

  • list-style-type attribute
    This plugin uses an additional attribute on the list. This results in invalid HTML. Rather it should apply e.g. a data-list-style attribute.

  • list-style as attribute
    I assume this plugin uses an additional attribute rather than the CSS property (as done by the ckeditor module) to allow for more flexibility with custom properties that are not valid CSS?

  • class names
    This plugin describes list-type presets with both title and value โ€“ value being

    the value of the list-style-type attribute of the list.

    That however is not the case. Instead the id/key of the preset is used. In fact as far as I can tell, that value is used to upcast an existing class name into the preset ID (and is then lost from the element). That's a bit confusing I think. Is this deliberate? I would have expected the preset value in the view.

  • breaking lists
    The list editing was pretty buggy for me, unfortunately, as the lists got split quite frequently even when selecting all content. In some parts, that I see connected to this issue, the plugin differs from the "original" ckeditor module. Is there a reason to this (i.e. to deliberately customize the "default" behavior)? I haven't checked, whether the ckeditor module has changed since the last changes here.

Apart from that there was a minor bug with the list-style menu staying open if I leave the element, while the button to close the menu is gone. This could be quickfixed with something like that on the button:

isOpen() {
	return this.shouldDisplayAdditionalButtons() && this.state.isOpen;
}

List-Styles configurable per element

I tried around a bit with

editorOptions:
  formatting:
    listStyle: boolean|null|{ol?: boolean|null|string[]|Record<string, boolean|null>, ul?: ...}

but I think this is not very readable. I think I would prefer a separate editor option:

editorOptions:
  listStyle:
    ol: boolean|null|string[]|Record<string, boolean|null>
    ul: boolean|null|string[]|Record<string, boolean|null>

With

  • true all available values
  • false|null none of these (only default? maybe no menu if only default is available, but maybe it should be possible to select the list and revert to default..)
  • string[] a list of enabled keys from the Lala.ListStyle.styles.{listType} setting
  • Record<string, boolean|null> a dictionary of keys from the setting and whether they should be enabled or not

Is there a preferred configuration?

Provide database migration for `list-style-type` attribute

Since #6, the list styles are stored in a new attribute (data-list-style-type). Currently, the plugin is able to work with the old (list-style-type) and the new attribute names. To clean up the js and css, there should be a migration that changes all existing nodes to use the new attribute name.

TODO:

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.