liaoas / cobalt Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
现在是每次重新打开,都没有历史记录了,建议添加一下历史记录保存功能
我这里使用的是1.2.3版本,查看了源码考虑是换行符的处理问题
在BookTextService.java文件中考虑用DataCenter.textContent = getText(content);
替换 DataCenter.textContent = content.text();
private static String getText(Element parentElement) {
StringBuilder working = new StringBuilder();
for (Node child : parentElement.childNodes()) {
if (child instanceof TextNode) {
working.append(((TextNode) child).text());
}
if (child instanceof Element) {
Element childElement = (Element) child;
// do more of these for p or other tags you want a new line for
if (childElement.tag().getName().equalsIgnoreCase("br")) {
working.append("\n");
}
working.append(getText(childElement));
}
}
return working.toString();
}
另:我本地代码还是1.2.2的,是1.2.3版本代码还没有上传吗,谢谢
滚动一次顶多1~2行。
另,沉浸模式似乎有问题,选不了章节。
试了很多epub和txt都不行,epub用SumatraPDF可以正常打开阅读
idea的版本是2024.1
update: 把idea更新到2024.1.2也不行
希望可以优化一下,可以自己调整搜索跟文本内容部分的空间占用
最好可以把搜索那部分做成可以隐藏的.
辛苦作者了
按哪都卡,下一章卡,跳转卡,滚动卡
大佬抽空弄弄呗
无论哪个搜索都不行可以自定义搜索数据来源么
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.