/    Sign up×
Community /Pin to ProfileBookmark

Dojo editor indent command generate the blockquote instead of div element on firefox

Run the test codes on firefox:

[COLOR=”Blue”][B]<html>
<head>

<script djConfig=”parseOnLoad: true” src=”http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js”></script>

<script type=”text/javascript”>
dojo.require(“dijit.Editor”);
</script>

<link rel=”stylesheet” type=”text/css” href=”http://ajax.googleapis.com/ajax/libs/dojo/1.6.1/dijit/themes/tundra/tundra.css” />

<script>
dojo.addOnLoad(function(){
var editor = dijit.byId(“myEditor”);

editor .onLoadDeferred.addCallback(function(){
editor.attr(“value”, “<b>This is new content.</b>”);
});

});
</script>

</head>

<body class=”tundra”>

<div dojoType=”dijit.Editor” id=”myEditor”>
<p></p>
</div>

</body>
</html>[/B][/COLOR]

Typing words,and then clicking the indent command,using the firebug to see the words and you will find the words are surrounded by the the blockquote,not the div element.I’m surprise with this.

And another simple case:
[B][COLOR=”Blue”]
<html>
<head>

<title>test</title>

<meta http-equiv=”content-type” content=”text/html;charset=utf-8″ />
<script type=”text/javascript”>
window.onload = function(){
document.execCommand(‘indent’,false,false);
}
</script>
</head>
<body contentEditable=”true”>
www
</body>

</html>[/COLOR][/B]

the output is the div element.

Have you guys got the issue?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @twocold spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...