Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Bold / Italic / Strike / Underline buttons don't work correctly #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alanpca
Copy link

@alanpca alanpca commented Jun 12, 2013

  • Fixes Bold / Italic / Strike / Underline buttons don't work correctly #19
  • Problem: addRange or removeAllRanges kills the browser command states.
  • Store cache in commandCache
  • Add updateCommandCache and restoreCommandCache methods
  • Add support for command-with-arg buttons to be in an active state
  • Update command cache when running execCommand
  • Store and then update selected commands when selecting a toolbar button
  • Create the command cache by looking up the buttons that are in the DOM, set the default value to false

* Fixes steveathon#19
* Problem: addRange or removeAllRanges kills the browser command states.
* Store cache in commandCache
* Add updateCommandCache and restoreCommandCache methods
* Add support for command-with-arg buttons to be in an active state
* Update command cache when running execCommand
* Store and then update selected commands when selecting a toolbar button
* Create the command cache by looking up the buttons that are in the DOM, set the default value to false
@mreq
Copy link

mreq commented Jul 29, 2013

The cache doesn't work properly. See http://jsfiddle.net/mreq/6h8pw/1/ for an example. Try selecting a word and clicking bold and italic afterwards. The word is italic only as the boldness is somehow overriden. With the original file, the example works fine - http://jsfiddle.net/mreq/6h8pw/.

Commenting out everything connected with caching fixes that.

@alanpca
Copy link
Author

alanpca commented Jul 29, 2013

Hey @mreq, seems to have to do with using <a> tags for the data-edit commands. I'll take a look at why this is.

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

Successfully merging this pull request may close these issues.

Bold / Italic / Strike / Underline buttons don't work correctly
2 participants