File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/editors/sharedComponents/TinyMceWidget Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,12 @@ export const replaceStaticWithAsset = ({
124124
125125 // Check if this is a direct /static/filename.ext pattern (should be converted)
126126 // vs /static/images/filename.ext pattern (should NOT be converted)
127- const isDirectStaticFile = isStatic && ! assetSrc . substring ( 8 ) . includes ( 'images/' ) ;
127+ const isDirectStaticFile = ( isStatic || assetSrc . startsWith ( '/asset' ) ) && ! assetSrc . substring ( 8 ) . includes ( 'images/' ) ;
128128
129129 const staticName = assetSrc . substring ( 8 ) ;
130130 const assetName = parseAssetName ( src ) ;
131131 const displayName = isStatic ? staticName : assetName ;
132- const isCorrectAssetFormat = assetSrc . startsWith ( '/asset' ) && assetSrc . match ( / \/ a s s e t - v 1 : \S + [ + ] \S + [ @ ] \S + [ + ] \S + [ @ ] / g) ?. length >= 1 ;
132+ const isCorrectAssetFormat = assetSrc . match ( / \/ a s s e t - v 1 : \S + [ + ] \S + [ @ ] \S + [ + ] \S + [ @ ] / g) ?. length >= 1 ;
133133
134134 // assets in expandable text areas do not support relative urls so all assets must have the lms
135135 // endpoint prepended to the relative url
You can’t perform that action at this time.
0 commit comments