Hi @mhamstra thx for the fix,
now the clips work but his behaviour is special when you use the advanced:true
…
I’ll describe here the test done, but first I’ll provide my configuration.
The clips JSON for test
[{
"title":"right arrow",
"clip":"<i class='gfx gfx-arrow-right'></i><span class='gfx gfx-arrow-right'></span>",
"advanced":true
},{
"title":"p",
"clip":"<p>paragraph</p>",
"advanced":true
},{
"title":"pre",
"clip":"<pre>pre</pre>",
"advanced":true
},{
"title":"blockquote",
"clip":"<blockquote>blockquote</blockquote>",
"advanced":true
},{
"title":"only text",
"clip":"only text"
}]
Notes:
- for this test I use your Redactor v2.0.3.
- you will need some paragraph of text already writed
Test 1: insert the right arrow clip in the middle of a text
The result is that your HTML tag will be insert at the end of the paragraph and not at the cursor’s position.
Test 2: insert the p clip in the middle of a text
The result is that your HTML tag will be insert at the correct place, but will be converted to a span
with a inline style declaration!
Test 3: insert the pre clip in the middle of a text
The result is the same as test 2.
Test 4: insert the blockquote clip in the middle of a text
Nice! it woks like expected!
Add the HTML, split the paragraph in 2 paragraph. But this behaviour is valid only for this test.
Test 5: insert the only text clip in the middle of a text
Work perfectly. Inert the text in the right place.
Some considerations
- another test can by done on the tag
<a/>
- some important apsect for the usability are:
- insert the HTML in the correct place
- if possible allow the selection of the inserted HTML (in this moment if you try to select the clip right arrow will not be possible)
I hope that this test scenario can help you, in every case thx for your job