
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
npm i -S ux-hash
또는 https://unpkg.com/ux-hash/dist/js/ux-hash.regacy.js
<div id="test"></div>
type Theme = {
bg:string, //해쉬태그의 백그라운드 컬러. rgba값 추천
color:string, //해쉬태그의 폰트컬러
key:string //#,@같은 해쉬태그 키값
};
const themes: Theme[] = [{key:'#',bg: 'rgba(23,23,23,.3)', color: '#fff'}];
new UxHash('#test', themes);
textarea
를 직접 수정하지 않고#test
에 스타일을 줍니다. <div id="test" class="test"></div>
.test {
line-height: 3;
word-spacing: 1px;
color: red;
font: ~~~~~;
}
직접 수정해야할 땐,
selector > textarea, selector > display
로
두개의 셀렉터에 동일한 스타일을 주어야 합니다.
.test > textarea,
.test > div{
line-height: 3;
word-spacing: 1px;
color: red;
font: ~~~~~;
}
textarea
에 직접 접근하여 value
를 변경했거나, const hash = new UxHash('#test', themes);
hash.keyEvent();
//또는
UxHash.keyEvent('#test', themes);
모든 라이브러리가 많은 기능을 담아야 할 필요는 없다고 생각합니다.
모 프로젝트 진행 당시, 기획자들에겐 대단한 에디터보다
textarea의 기본기능에 컬러변경, 배경색지정등의 단순한 기능만으로 충분히 만족한다는 사실을 깨닳았습니다.
그래서 간단히 만들어 낼 순 없을까를 고민하다 제작하게 되었습니다.
이 라이브러리는 textarea와 value값을 공유하는 div태그를 css를 동일하게 사용하여 완벽하게
겹쳐 둔 상태입니다.
보통의 글자는 투명으로 처리하고, 특징적인 문자들에 대해서 컬러 또는 배경색을 지정하여
마치 에디터인마냥 흉내내고 있습니다.
FAQs
Library to help you write hashtags in textarea
We found that ux-hash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.