Fixing an mceInsertContent bug, the execCommand is now the mceInsertRawHTML

This commit is contained in:
Gustavo Cruz
2012-12-07 09:54:12 -04:00
parent 758528ba9a
commit 610072205b
5 changed files with 19010 additions and 1653 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmGrids(field_name, url, type, win) {
function pmGrids(field_name, win) {
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
var strPluginPath = tinyMCE.activeEditor.plugins.pmGrids.getPluginURL(); // get the path to the uploader plugin
var strScriptURL = strPluginPath + "/pmGrids.html";
@@ -61,6 +61,7 @@ function closePluginPopup(){
}
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, serializedHTML);
closePluginPopup();
}

View File

@@ -31,7 +31,7 @@
// this function can get called from the plugin inint (above) or from the callback on advlink/advimg plugins..
// in the latter case, win and type will be set.. In the rist case, we will just update the main editor window
// with the path of the uploaded file
function pmGrids(field_name, url, type, win) {
function pmGrids(field_name, win) {
//tinyMCE.activeEditor.anyVariable='path/to/ProcessMaker'
var strPluginPath = tinyMCE.activeEditor.plugins.pmGrids.getPluginURL(); // get the path to the uploader plugin
var strScriptURL = strPluginPath + "/pmGrids.html";
@@ -61,7 +61,7 @@ function closePluginPopup(){
}
function updateEditorContent(serializedHTML){
tinyMCE.activeEditor.execCommand('mceInsertContent', false, serializedHTML);
tinyMCE.activeEditor.execCommand('mceInsertRawHTML', false, serializedHTML);
closePluginPopup();
}

View File

@@ -65,13 +65,13 @@ $(document).ready(function () {
var insertFormatedGrid = function(){
var gridName = $("#gridList option:selected").text();
var tableCode = "<table>"
var gridCode = "<!--"+gridName+"@>-->";
var gridCode = "<!--@>"+gridName+"-->";
var headerCode = "<tr>";
var fieldCode = "<tr>";
$('#listContainer .headerField').each(function(i){
if (this.checked == true) {
headerCode += "<td>"+$('#'+this.value).val()+"</td>";
headerCode += "<th>"+$('#'+this.value).val()+"</th>";
fieldCode += "<td>"+$('#prefixList').val()+$('#field_'+this.value).val()+"</td>";
}
});

View File

@@ -84,7 +84,7 @@
"name": "tinymce",
"full": "gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js",
"mini": "gulliver/js/tinymce/jscripts/tiny_mce/tiny_mce_src.js",
"minify": true
"minify": false
}
],
"build" : true,