File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,5 +158,17 @@ const renderOutputs = () => {
158158 reactRoot . render ( React . createElement ( React . Fragment , null , reactNode ) ) ;
159159} ;
160160
161+ for ( const el of [ reactPreviewEl , quillHtmlPreviewEl , semanticHtmlPreviewEl ] ) {
162+ new MutationObserver ( ( mutations ) => {
163+ for ( const m of mutations ) {
164+ const parent = m . target . parentElement ;
165+ if ( ! parent ) continue ;
166+ parent . style . animation = 'none' ;
167+ void parent . offsetWidth ;
168+ parent . style . animation = '' ;
169+ }
170+ } ) . observe ( el , { characterData : true , subtree : true } ) ;
171+ }
172+
161173quill . on ( 'text-change' , renderOutputs ) ;
162174renderOutputs ( ) ;
Original file line number Diff line number Diff line change @@ -150,3 +150,12 @@ pre {
150150# editor {
151151 min-height : 240px ;
152152}
153+
154+ @keyframes dom-flash {
155+ from { background-color : rgba (250 , 204 , 21 , 0.3 ); }
156+ to { background-color : transparent; }
157+ }
158+
159+ .preview-shell * {
160+ animation : dom-flash 0.6s ease-out;
161+ }
You can’t perform that action at this time.
0 commit comments