Comments (7)
Can you explain more why you don't want editor to be focused?
from roosterjs.
For example I have a situation, when I want to change the default background color and text color. I need to set doNotAdjustEditorColor
to true
so everything isn't set back to defaults when the theme(dark/light mode) is changed.
But in this case, if the editor wasn't focused before, and I change the theme and use setBackground
or setColor
functions, the editor will be focused by default.
I think there also may be issues with focus in case if there are a few rooster js editors on the same webpage.
Just to share more info, it's not a blocking issue for me, just wondering if this functionality can be improved.
from roosterjs.
Do you mean you want to change background color of the editor root DIV?
from roosterjs.
These ones:
from roosterjs.
Not quite understand. LifecyclePlugin is using the down level API setColor
to change background color, not setBackgroundColor
, they are two different thing.
from roosterjs.
setBackgroundColor
should only be used by ribbon button, when user click on the button to change color of selected text. In that case we expect editor to be focused so user can keep typing.
It should not be used in other case.
For all other cases, you can use the down level API setColor
instead.
from roosterjs.
I see, thanks for the clarifications! It would be great to have a link for setColor
in the documentation for setBackgroundColor
(or some other documentation in place) as sometimes it's not very easy to find this kind of documentation withou code checking.
from roosterjs.
Related Issues (20)
- If there is a list in a quote, clearFormat can't clear the quote HOT 1
- format state shows fontSize:1.5em in h2 element HOT 2
- Test case TableEditorTest is unstable
- Rooster Editor Alt Text Feature HOT 2
- autoUnlink will turn any link into plain text unconditionally HOT 2
- Text Color issue HOT 1
- How to listener focus and blur events HOT 1
- Options for Tabbing behaviour HOT 1
- [A11y] Keyboard focus is lost after inserting rows/columns with `editTable(editor, option)` api HOT 1
- Insert HTML from text HOT 2
- [A11y] New item in bulleted list doesn't use custom announcement HOT 1
- [A11y] Value returned for `announceListItemNumbering` in `announcerStringGetter` is not used when numbered list is created with `toggleNumbering` api HOT 1
- [A11y] Add annoncements when a bulleted and numbered lists are created HOT 2
- Images in tables are not properly copied from Word HOT 1
- Expose `DefaultSanitizers` to be available in public API HOT 1
- [A11y] Incorrect focus order when navigating within inserted table using up/down arrow keys HOT 2
- SelectionPlugin causes a runtime error when id in image tag starts with a digit
- Original Classes of Entity Wrapper are Threw Away HOT 1
- Two list types of bullet are the same.
- After modifying the list type and the indentation, the list types within the same list may be inconsistent.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roosterjs.