I am having a problem creating a custom style.
I would like to be able to wrap a div around selected text, it's easier to explain with a simple example.
I've created the following style:
The user then selects the following text and applies the style 'Test'.
What happens though is all tags are replace with a div tag:
What I was after doing was:
I would like to be able to wrap a div around selected text, it's easier to explain with a simple example.
I've created the following style:
<Style name="Test" element="div"> <Attribute name="class" value="test" /> </Style>
The user then selects the following text and applies the style 'Test'.
<h1>Head</h1> <p>Para</p>
What happens though is all tags are replace with a div tag:
<div class="test">Head</div> <div class="test">Para</div>
What I was after doing was:
<div class="test"> <h1>Head</h1> <p>Para</p> </div> How do I alter the style to achieve this? Thanks