在线文本分列工具
评论 0 热度 54
想在WORD里面分列插入代码,于是就写了这个工具,通过迭代把文字分成等高的N列(因为考虑到字符不等宽,没法计算如何分割)。但是,等我写完这玩意之后,突然想起来css里面有个属性就是column,我捏麻QAQ!!!
I wanna insert code in WORD column by column, so I wrote this tool to divide text into N columns of equal height. However, after I finished this work, it occurred to me that there's a column module in CSS.
Damn it :(
附带一个JS书签,用来跳转到runoob对高亮代码分列。
javascript: (function(){
if (window.location.host != "c.runoob.com"){
window.location.href="https://c.runoob.com/front-end/5536/";
}else{
var sp = prompt("columns:");
$("#format_code pre").css({"column-count":sp, "white-space":"pre-wrap", "word-break":"break-all"})
}
})();