English 中文(简体)
IPW 编辑
原标题:IPWEditor with jQuery

我正试图与IPWEditor一道用 j子书写一个单元。

主要任务是能够绕过一块小块,如果一个用户在干iv上重复点击,则四粒会与锡兰采融为一体,另一件事是,在点击 but子时,会增加一个新的四块。

来源代码:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.ipweditor-1.2.1.js"></script>
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.js"></script>
<script>
    $(function() {
        $( .text ).live( click , function() {
            $(this).draggable( {containment:  parent });
        });

        var ed = new tinymce.Editor( content , {
            mode: "exact",
            theme: "advanced",
            plugins: "emotions,table",
            theme_advanced_toolbar_location: "top",
            theme_advanced_statusbar_location: "bottom",
            theme_advanced_resizing: true,
            theme_advanced_buttons1: "bold,italic,underline,strikethrough,sup,sub,charmap,fontselect,fontsizeselect,forecolor,backcolor,",
            theme_advanced_buttons2: "copy,paste,undo,redo,|,hr,blockquote,bullist,numlist,outdent,indent,justifyleft,justifycenter,justifyright,|,image,emotions,",
            theme_advanced_buttons3: "",
            table_default_cellspacing: 0,
            table_default_border: 1,
            remove_linebreaks : false
        });

        $( .test ).live( dblclick ,function(){
            $(this).editable({
                tooltip : "",
                indicator :  Saving... ,
                type:  wysiwyg ,
                editor: ed,
                submit: save ,
                cancel: cancel 
            });
        }); 

    }); 

    function displaymessage()
    {
        $(".boxContainer").append("<div class= text test  style= width: 280px  onClick= $(this).addClass(&#39;selectedBorder&#39;)  onmouseout= $(this).removeClass(&#39;selectedBorder&#39;) > Click me! I am editable and WYSIWYG!!!</div>");
    }
</script>
<style>
    p {margin:0; padding: 0;}
    .text {cursor:pointer; line-height: 100%; border: 1px dotted transparent;}
    .selectedBorder {border: 1px dotted black;}
</style>


</head>
<body>    
<div class="boxContainer" style="border: solid thin gray; width: 1000px; height: 500px">
    <div class="text test" style="width: 280px" onClick="$(this).addClass( selectedBorder )" onmouseout="$(this).removeClass( selectedBorder )">
        <b> Click me! I am editable and WYSIWYG!!!</b>
    </div>
</div>
<button type="button" class="newBox" onclick="displaymessage();">Add new box</button>
</body>
</html>

现在,在我点击“Add个新的盒子”纽顿时,出现了新的四分之四。 四分五裂是可笑的,当我对新的四分点进行双重点击时,四分五分之四是不容置疑的,但当我试图点上光子时,没有发生。

任何人都可以向我提供int或帮助。

非常感谢。

Best Respect / Johnny

问题回答

托顿将提交编辑所在表格。 但是,我不能看到你的任何形式! 除纽尔州外,只有一小gger,可以把编辑内容放在可以储存到b的文字上。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签