Comments (5)
Yep, most certainly. I'm currently in the process of updating add-ons for 2.1.41. I will have a look next week.
from anki__editor__apply__font_color__background_color__custom_class__custom_style.
that's great. thanks.
from anki__editor__apply__font_color__background_color__custom_class__custom_style.
I've updated it. You can apply spans again in the editor, and the styling will be visible.
Rangy will no longer work with the new editor code, so it will always use the "text" solution. The functionality of modifying the Editor CSS might be become a future Anki feature: ankitects/anki#1049.
Let me know if you find any more issues, @ijgnd.
from anki__editor__apply__font_color__background_color__custom_class__custom_style.
Thank you very much for updating to the new version.
In general it mostly works again. It doesn't work for me if the selection covers multiple paragraphs/divs. I tested in a new profile with only the custom styles add-on from addons.ankiweb with the binary 41beta6 for linux.
Example: When I have this in my field:
<div>one</div><div>two</div>
and I select the last letter of "one" and the first o "two" so that my selection is among two divs and I tell the add-on to apply a class I get the following source code:
<div>on</div><span class="bg_green"><div>e</div><div>t</div></span><div>wo</div>
no text is shown that has the styling from the class (because there's divs inside this span?)
from anki__editor__apply__font_color__background_color__custom_class__custom_style.
Another problem is that now line breaks are added.
Same example as before: When I have this in my field:
<div>one</div><div>two</div>
and I select the last letter of "one" and the first o "two" so that my selection is among two divs and I tell the add-on to apply a class with the old version/rangy it was rendered into two lines:
one
two
The modified source produced by the old version with rangy was <div>on<span class="bg_green">e</span></div><div><span class="bg_green">t</span>wo</div>
.
Now with the most recent version from 2021-03-03 after applying the highlighting it's rendered into four lines like this:
on
e
t
wo
I guess that's the result of "Rangy will no longer work"/"Do not use rangy -> it's not compatible with the editor window"?
You still load rangy into the webview (I mean this). Does this mean that in theory it could be adjusted to work again and maybe someone in the future will adapt it? I'll have to learn more html/js before I could investigate this which won't happen before the end of the summer. Or is there really no chance that rangy (that hasn't been changed in the last six years) can work due to your recent changes to the anki editor which now uses more recent browser technologies?
from anki__editor__apply__font_color__background_color__custom_class__custom_style.
Related Issues (20)
- ankiweb: raise minimum version required to 2.1.28 HOT 1
- Feature requests: Custom HTML wrapping HOT 1
- Sorting Entries
- 少了文件?
- Improvement in the backcolor category
- 2.1.41+ night-mode css not applied in editor HOT 3
- Text Wrapping function malfunctions when wrapping string contains quotation marks. HOT 1
- 2.1.41+ wrong colors in editor and in actual card HOT 2
- Simplifying the context menu - just an idea.
- Selection of multiple lines not recognised when disabling entries in options
- Add option to disable the dialog asking to auto update templates HOT 1
- Feature Request: Placeholder for text under selection
- Changing font family?
- shorten the red box? HOT 2
- clear formatting: It doesn't work
- broken in 2.1.50 (Attribute error, ...) HOT 8
- Change "class" name on all previously produced cards. HOT 2
- css not loaded into the editor in 2.1.60 (and presumably .55+) HOT 6
- shortcuts don't apply the setting(class, style, ...) intended
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 anki__editor__apply__font_color__background_color__custom_class__custom_style.