File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
packages/pluggableWidgets/rich-text-web/src/utils Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import QuillTableBetter from "./formats/quill-table-better/quill-table-better";
1717import MxUploader from "./modules/uploader" ;
1818import MxBlock from "./formats/block" ;
1919import CustomClipboard from "./modules/clipboard" ;
20+ import { WhiteSpaceStyle } from "./formats/whiteSpace" ;
2021class Empty {
2122 doSomething ( ) : string {
2223 return "" ;
@@ -28,6 +29,7 @@ class Empty {
2829Quill . debug ( "error" ) ;
2930Quill . register ( { "themes/snow" : MendixTheme } , true ) ;
3031Quill . register ( CustomListItem , true ) ;
32+ Quill . register ( WhiteSpaceStyle , true ) ;
3133Quill . register ( CustomLink , true ) ;
3234Quill . register ( CustomVideo , true ) ;
3335Quill . register ( CustomImage , true ) ;
Original file line number Diff line number Diff line change 1+ import { Scope , StyleAttributor } from "parchment" ;
2+
3+ const config = {
4+ scope : Scope . INLINE ,
5+ whitelist : [
6+ "normal" ,
7+ "pre" ,
8+ "pre-wrap" ,
9+ "pre-line" ,
10+ "nowrap" ,
11+ "wrap" ,
12+ "break-spaces" ,
13+ "collapse" ,
14+ "inherit" ,
15+ "initial" ,
16+ "revert" ,
17+ "unset"
18+ ]
19+ } ;
20+
21+ export class WhiteSpaceStyleAttributor extends StyleAttributor { }
22+ export const WhiteSpaceStyle = new WhiteSpaceStyleAttributor ( "whitespace" , "white-space" , config ) ;
You can’t perform that action at this time.
0 commit comments