These are chat archives for daviferreira/medium-editor

8th
Apr 2015
Peter E Higgins
@phiggins42
Apr 08 2015 13:08
\o/ thanks @daviferreira
the next one incoming (now that all the tooling and pieces are in a place) will be the largest diff ... slightly more complicated because I need to account for the paste object that is there now, but thinking I can do it. new mergeOptions implementation + a pattern for deprecated default values. then it is just a matter of one-by-one converting things to extensions and deprecating their old config values.
Davi Ferreira
@daviferreira
Apr 08 2015 13:10
I will leave that one to @nmielnik :shipit:
did you copy the getProp method from somewhere?
Peter E Higgins
@phiggins42
Apr 08 2015 17:13
dojo
but i hand wrote it so it isn't really copy
:)
Davi Ferreira
@daviferreira
Apr 08 2015 17:14
nah, just to keep the credits/reference
a link to the original source or something
Peter E Higgins
@phiggins42
Apr 08 2015 17:14
it was dojo-inspired (it's how dojo.require("foo.bar.baz.bam") used to work)
you'd end up with window.foo.bar.baz.bam = {}
i can add a quick credit line
also it won't have to live there long if you don't want to keep it around ... the idea I have for deprecated props is like:
{ deprecatedOption: [true, "new.location.in.nested.props", optionalForcedvalue] }
so if they new Editor(..., { deprecatedOption: false }) (eg: pass a non-default) the merger converts that to { "new":{ "location": { "in": { "nested": { "props": optionalForcedValue } } } }
Davi Ferreira
@daviferreira
Apr 08 2015 17:18
i don't mind
Davi Ferreira
@daviferreira
Apr 08 2015 17:18
i just noticed the different format
Peter E Higgins
@phiggins42
Apr 08 2015 17:19
(from link: ignore deprecated firstHeader etc, that was a feature I should do separately)
but what do you think of: new Editor(..., { headers:["h2","h3","h4"], buttons: ["heading1","heading2","heading3"] }) to support any number (0..5) of heading levels (leaving default of 2 and heading1 === h3, heading2 == h4 like is now
instead of new Editor(..., { firstHeader: "h2", secondHeader: "h3" })
Davi Ferreira
@daviferreira
Apr 08 2015 17:22
i like the idea, but I don't like it being different options
it should be a button option maybe?
Peter E Higgins
@phiggins42
Apr 08 2015 17:47
well it's taking two and combining them into one, and providing the feature (somehwere in issues?) that people wanted more than "just two" heading depths
though as one button would be ideal really? a dropdown?
also would like to consider "tri-state" buttons (like blockquote/pullquote example from medium, where hitting a button goes through 3 states or so)
could just name the buttons the heading depth and provide 6
buttons:["h3","h4"] becomes default
buttons:["h1","h2","h3","h4"] does same Heading button with different N