You are designing a text editor that allows users to apply m…
You are designing a text editor that allows users to apply multiple formatting styles (e.g.: bold, italic, underline, highlight) to text in any combination. The system should allow formatting to be added or removed dynamically at runtime. Which design approach would you choose?