1

私はJqueryを初めて使用し、プロジェクトで使用しようとしています。

bPopupを使用してページを取得しました。bPopupでは、ポップアップdivにniceditを含めます。しかし、リッチテキストツールバーはめちゃくちゃになっているようです。誰かがそれを修正する方法を知っていますか?

以下は、出力のコードと例です。

ここに画像の説明を入力してください

niceditのツールバーは向きがまちまちになっているようです。しかし、通常のWebページ(ポップアップなし)でniceditを使用すると、問題なく動作します。

index.php ----

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <script type = "text/javascript" src = "http://code.jquery.com/jquery-1.7.2.min.js"></script> <!--This is for the interface-->
    <script type = "text/javascript" src = "http://dinbror.dk/downloads/jquery.bpopup-0.7.0.min.js"></script>
    <script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> 

</head>
<body>

<button>POP IT UP</button>

<div style = "position: relative; display:none; width:500px; height:500px; background-color:white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 25px 5px #999;">

<textarea id = "area1" name = "area1" cols = "40">
This is the default text in text box.
</textarea>
<script>
bkLib.onDomLoaded(function() {
    new nicEditor().panelInstance('area1');

});
</script>
</div>



<h1 style = "background-color : white">This is the content
   <script>
    // Semicolon (;) to ensure closing of earlier scripting
    // Encapsulation
    // $ is assigned to jQuery
    ;(function($) {
         // DOM Ready
        $(function() {

            // Binding a click event
            // From jQuery v.1.7.0 use .on() instead of .bind()
            $('button').on('click', function(e) {

                // Prevents the default action to be triggered. 
                e.preventDefault();

                // Triggering bPopup when click event is fired
                $('div').bPopup({
                    position: ['auto', 'auto'], //x, y
                    modal: true, //A transperant black layer behind
                    positionStyle: 'fixed', //Fix the popup in the middle
                    scrollbar: false,

                });

            });

        });

    })(jQuery);
    </script>


</body>
</html>
4

0 に答える 0