Changes for page ContentEditable

Last modified by mflorea on 2010/07/06 16:39

From version 19.1
edited by mflorea
on 2010/07/06 18:33
Change comment: There is no comment for this version
To version 20.1
edited by mflorea
on 2010/07/06 18:36
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +5,3 @@
1 -{{velocity}}
2 -$xwiki.ssx.use("ContentEditable")
3 -{{/velocity}}
4 -
5 5  {{html clean="false"}}
6 6  <script type="text/javascript">
7 7  function onAction(hook){
... ... @@ -8,7 +8,7 @@
8 8   var iframe = document.createElement('iframe');
9 9   iframe.style.border = '1px solid black';
10 10   iframe.addEventListener('load', function() {
11 - iframe.contentWindow.document.body.innerHTML = '<p>before<span contentEditable="false" class="readOnly" onclick="this.className=\'readOnly readOnly-selected\'">text</span>after</p>';
7 + iframe.contentWindow.document.body.innerHTML = '<link rel="stylesheet" type="text/css" href="/xwiki/bin/ssx/Test/ContentEditable?language=en"/><p>before<span contentEditable="false" class="readOnly" onclick="this.className=\'readOnly readOnly-selected\'">text</span>after</p>';
12 12   //iframe.contentWindow.document.designMode = 'on';
13 13   iframe.contentWindow.document.body.contentEditable = true;
14 14   iframe.focus();