Comments (15)
Thanks for the detailed description. I'll look into it.
For the time being, you can double click results to copy them without line breaks.
from jotoba.
Oh yeah, you are right. I guess we can go with this approach then!
from jotoba.
Related bug -- trying to select the Kanji text with Yomichan doesn't work, it can only select one Kanji at once. I believe this is because of the HTML structure --
- furigana-kanji-container
- furigana = こと
- first kanji = 言
- furigana-kanji-container
- furigana = ば
- second kanji = 葉
Jisho handles it in this way:
- furigana container
- furigana for first kanji = こと
- furigana for second kanji = ば
- kanji = 言葉
This way is better since the Kanji are continuous in HTML.
from jotoba.
@Yukaru-san I can take this one on if it's not a priority for you, let me know if that's ok
from jotoba.
One of the reasons I decided to go with the current format is because there were some cases in which Jisho was kinda ugly (see the comparison below).
If you have an idea on how to improve this, you can give it a try!
[My son is busy studying for the examinations tomorrow.]
from jotoba.
Yeah, I'll give it a shot!
from jotoba.
Solved the Yomichan issue, but enabling ctrl-c copy while maintaining correct spacing for kanji is going to be very difficult or impossible. @StoneLabs @Yukaru-san thoughts on click-to-copy? Like clicking on the kanji will copy to clipboard?
from jotoba.
Here's a quick fiddle I made that I think solves the issue: https://jsfiddle.net/Lkdqsjrx/
Basically, it just abuses display: table
to align the items properly. As a plus, if you want to enable copying the ruby text, you can do it without it interfering with copying the kanji.
from jotoba.
Here's a quick fiddle I made that I think solves the issue: https://jsfiddle.net/Lkdqsjrx/
Basically, it just abuses
display: table
to align the items properly. As a plus, if you want to enable copying the ruby text, you can do it without it interfering with copying the kanji.
Hmmm, I still get a tab between the kanji when I paste that into notepad. But I really like your use of display: table -- I was trying to fiddle more with flex boxes but couldn't resolve the copy-paste. I think there's definitely a way to work this.
from jotoba.
What about this one? https://jsfiddle.net/jfw89cdh/
This one uses flexboxes and uses display: content
(from this stackoverflow answer) to get rid of the weirdness.
EDIT:
Actually, scratch literally everything. Just use actual ruby
tags.
https://jsfiddle.net/fp0eg49x/
from jotoba.
Your <ruby> approach seems to be working quite nicely. It will still put spaces between segments though.
https://jsfiddle.net/wkjp3yc8/
from jotoba.
Solved the Yomichan issue, but enabling ctrl-c copy while maintaining correct spacing for kanji is going to be very difficult or impossible. @StoneLabs @Yukaru-san thoughts on click-to-copy? Like clicking on the kanji will copy to clipboard?
I'd be fine with click-to-copy if need be. It is currently implemented like that anyway (using a double click)
from jotoba.
Your <ruby> approach seems to be working quite nicely. It will still put spaces between segments though.
https://jsfiddle.net/wkjp3yc8/
You need to make sure that there are no spaces between the elements.
from jotoba.
Only thing is that the approach doesn't help with the Yomichan issue. sigh...
Edit: Solved! Just have to remove all the spaces. https://jsfiddle.net/dpbon94r/
from jotoba.
Solved with #14
Thanks for the contributions!
from jotoba.
Related Issues (20)
- Display odaka pitch accent more explicitly HOT 1
- Double results HOT 1
- Inconsistent voice indicator HOT 2
- Double clicking kanji-less words gives "meaning copied to clipboard" HOT 1
- Odaka pitch visualization is either partly or entirely broken HOT 1
- Jisho-esque wildcard search HOT 1
- Dark Mode Kanji Stroke Diagrams HOT 1
- Furigana sometimes not being properly split HOT 5
- Vietnamese reading of kanji HOT 2
- Audio playback in Safari (still) broken HOT 3
- Include JLPT tag in API word search result HOT 6
- Refocus the search bar after hitting enter and searching, without having to press forward slash HOT 3
- Typo in 'archaism'
- For some words, sentences returned do not contain the word at all HOT 1
- API search page cannot be reached HOT 2
- Kanji animations/ stroke orders no longer showing HOT 1
- Internal server error HOT 1
- How to self-host API? HOT 5
- CTRL not working in Searchbar on Mac HOT 2
- な particle is a verb HOT 3
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 jotoba.