Comments (1)
const { parchment } = Quill.imports
const {
StyleAttributor,
Scope
} = parchment
class CustomBoldAttributor extends StyleAttributor{
constructor(){
return super( 'bold' , 'bold' ,{
scope: Scope.INLINE,
})
}
value( node ){
return node.style.fontWeight
}
add( node , value ){
node.style.fontWeight = value ? "bold" : ""
return true
}
remove( node ){
node.style.fontWeight = ""
}
}
//local registry
const registry = new parchment.Registry
registry.register( new CustomBoldAttributor , true )
//global registry
Quill.register( new CustomBoldAttributor , true )
may work
from quill.
Related Issues (20)
- Can't remove a single empty code-block with Backspace HOT 2
- feat: possibility to choose sources in undo and redo
- Custom softbreak problem HOT 1
- Deleting parent list leaves nested lists orphaned HOT 2
- clipboard.addMatcher breaks nested lists
- Does the interface language change not support? HOT 3
- Update modules without re-instantiating the editor? HOT 3
- Not work in uniapp h5 iOS safari HOT 1
- When pasting content from Word, images are not preserved
- Custom toolbar: buttons mouse clicks get broken if Quill is re-instantiated
- Copy: when copying a header element, the heading is not preserved
- How to Show a Cursor for Drop Location in Quill Editor While Dragging?
- 🔥 Implementing table with table-embed but can not as a standalone module HOT 1
- Size select element is not working correctly
- keyboard.addBinding for 13/Enter doesn't seem to have an effect HOT 3
- Shift + Enter Keyboard Shortcut Not Working in Quill 2.0.2 HOT 2
- Changing format using quill.formatText while editing causes omitting/adding some characters
- Quill misbehaves inside of Shadow DOM
- Delta error while inserting code block HOT 1
- The toolbar: false option is not working as expected
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 quill.