Re: exposing underlining mechanism for IME?

On Fri, Nov 06, 2015 at 08:51:47AM +0100, Johannes Wilm wrote:
>  So the way you would handle those in cE=events would be:
> 
> 1. compositionstart event. JS registers this and knows it will add markers
> to everything until the compositionend event.
> 
> 2. beforeInput{editType: insertCharacter, isComposition: true, data : '´'}
> event. JS inserts the accent into the DOM where it wants, then marks the
> character using addCompositionMarker.
> 
> 3. compositionend event. JS decides the DOM is fine as it is and it removes
> the composition marker by running something like
> deleteCompositionMarker(range) over the characters that came out of the
> composition.

Sure, but I am a bit uneasy with addCompositionMarker.  Seems like
there could be more properties involved than underline thickness,
foreground and background color.  What if, instead, there was an API
function that returned the CSS property-value pairs for a composition
candidate---getCompositionStyle()?  The the editor could apply the
style, modify it, or ignore it, according to the author's preference.

Dave

-- 
David Young
dyoung@pobox.com    Urbana, IL    (217) 721-9981

Received on Friday, 6 November 2015 18:19:11 UTC