Skip to content

Commit

Permalink
v0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterLawrence committed Oct 14, 2010
1 parent dd137b4 commit 82f1ea9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -23,5 +23,6 @@ History

12 Oct 2010 - v0.11 - fixed bug related to saving raw html in Wysiwyg mode.
14 Oct 2010 - v0.12 - preview now works in wysiwyg mode.
14 Oct 2010 - v0.13 - preview now works for google chrome and IE


5 changes: 5 additions & 0 deletions app/helpers/redmine_wysiwyg_textile/helper.rb
Expand Up @@ -126,6 +126,7 @@ def wikitoolbar_for_wysiwyg(field_id)
var text3=TheText.responseText;
text3 ='content%5Btext%5D='+escape(text3);
eval(ThePreviewFunction);
return (false);
}
function UpdatePreviewHtml() {
var TheText;
Expand All @@ -134,6 +135,7 @@ def wikitoolbar_for_wysiwyg(field_id)
TheText ='content%5Btext%5D='+escape(TheText);
new Ajax.Request('/convert/wysiwygtohtmltotextile', {asynchronous:false, evalScripts:false, method:'post', onSuccess:function(request){UpdatePreviewTextile(request)}, parameters:TheText});
}
return (false);
}
function GetPreviewFunction(textarea) {
var elemlist = document.getElementsByName(\"commit\")
Expand All @@ -145,9 +147,12 @@ def wikitoolbar_for_wysiwyg(field_id)
if (elem.onclick.toString().match(/Ajax.Updater.+preview/)){
PreviewElem=elem;
TheTextilePreviewFunction=PreviewElem.onclick.toString();
TheTextilePreviewFunction=TheTextilePreviewFunction.replace(\"function onclick(event)\", \"\");
TheTextilePreviewFunction=TheTextilePreviewFunction.replace(\"function anonymous()\", \"\");
TheTextilePreviewFunction=TheTextilePreviewFunction.replace(\"return false;\", \"\");
ThePreviewFunction= TheTextilePreviewFunction.replace(\"Form.serialize(\\\"wiki_form\\\")\", \"text3\");
ThePreviewFunction= ThePreviewFunction.replace(\"Form.serialize(\\'wiki_form\\')\", 'text3');
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Expand Up @@ -11,7 +11,7 @@
name 'Redmine Wysiwyg Textile'
author 'P.J. Lawrence'
description 'A TinyMCE test application for Textile wiki pages'
version '0.12'
version '0.13'

wiki_format_provider 'textile wysiwyg', RedmineWysiwygTextile::WikiFormatter, \
RedmineWysiwygTextile::Helper
Expand Down

0 comments on commit 82f1ea9

Please sign in to comment.