File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
media-placeholders/src/main/java/org/wordpress/aztec/placeholders Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import org.wordpress.aztec.AztecContentChangeWatcher
2525import org.wordpress.aztec.AztecText
2626import org.wordpress.aztec.Constants
2727import org.wordpress.aztec.Html
28+ import org.wordpress.aztec.plugins.html2visual.IHtmlPreprocessor
2829import org.wordpress.aztec.plugins.html2visual.IHtmlTagHandler
2930import org.wordpress.aztec.spans.AztecMediaClickableSpan
3031import org.xml.sax.Attributes
@@ -52,7 +53,8 @@ class PlaceholderManager(
5253 Html .MediaCallback ,
5354 AztecText .OnMediaDeletedListener ,
5455 AztecText .OnVisibilityChangeListener ,
55- CoroutineScope {
56+ CoroutineScope ,
57+ IHtmlPreprocessor {
5658 private val adapters = mutableMapOf<String , PlaceholderAdapter >()
5759 private val positionToIdMutex = Mutex ()
5860 private val positionToId = mutableSetOf<Placeholder >()
@@ -585,4 +587,11 @@ class PlaceholderManager(
585587 private const val TYPE_ATTRIBUTE = " type"
586588 private const val EDITOR_INNER_PADDING = 20
587589 }
590+
591+ override fun beforeHtmlProcessed (source : String ): String {
592+ runBlocking {
593+ clearAllViews()
594+ }
595+ return source
596+ }
588597}
You can’t perform that action at this time.
0 commit comments