• Register
1 vote
3.3k views

Problem:

 
I need to sort this issue out, any help out there?

document.body.contenteditable = 'true'; document.designmode='on'; void 0

15 10 7
8,940 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

To fix your issue you must remove the contenteditable attribute as shown in below code snippet for your reference.

var mydemo_editable = document.getElementById('mydemo-editable');

var mydemo_button = document.getElementById('mydemo-button');
mydemo_editable.setAttribute('contenteditable',true);
mydemo_button.onclick = function() {
  delete mydemo_editable.removeAttribute('contenteditable');
}
<div id="mydemo-editable">This is editable</div><button id="mydemo-button">Make not editable</button>

To fix your issue you can also try to set the attribute contenteditable to false as shown in below code snippet for your reference.

varmy demo_editable = document.getElementById('mydemo-editable');
var mydemo_button = document.getElementById('mydemo-button');
mydemo_editable.setAttribute('contenteditable',true);
mydemo_button.onclick = function() {
  delete mydemo_editable.setAttribute('contenteditable',false);
}
<div id="mydemo-editable">This is editable</div><button id="mydemo-button">Make not editable</button>

If above solutions are not helping you then you can try below method to fix your issue.

a)      You need to first hit the F12 to inspect your page

b)      After that you can right-click on a top-most element a <html> tag

c)      Now from a resulting context menu you should select "Edit as HTML"

d)      You should focus your editable HTML and then you should hit Ctrl+A to select all

e)      Then you can hit Ctrl+C to simply copy the page's HTML to the clipboard

f)       Now you can make your edits to your contenteditable section

g)      After doing above steps you should repeat steps 1 through 4

h)      Finally press Ctrl+V to paste over your edited HTML with your page's original HTML

Hope my above solutions help you in fixing your issue.

5 4 2
17,150 points
Hi,

I hope you are in good health. I am a passionate reader and writer as well.

I am writing you to present an offer that can benefit both of us.

I want to publish a guest post article on your website and will send you some topic ideas for that.

The article however, will be of great quality and is free of cost. If my ideas interest you, I would send the article on the selected topic idea chosen by you. I would just need you to provide me a backlink within the main article.
Please get back with your kind response to this offer.

I look forward to your prompt response.

Have a great day!

Regards.

Annika Wells
Good article
0 votes

Today we will learn how to edit any website directly from our browser. If we have ever wanted to edit a website quickly so that we can see or show someone how it will look, then we can use this code.

Now, we will learn how to use it:

Step-1: Highlight the following code:

 javascript:document.body.contentEditable = 'true'; document.designMode='on'; void 0

Step-2: Drag the highlighted text into your bookmarks bar.

Step-3: Now we can click anywhere on a page and start editing, directly from our browser.

Then instantly we’ll be able to edit the text on this page from our browser. Reload the page to quit editing.

Or we will be able to leave edit mode by changing our command to the following:

javascript:document.body.contentEditable='false'; 
document.designMode='off'; void 0

 

Use of this code:

1.To show how a client how their site should look

2.Edit a website so your designer knows what you want

3.Make your bank account look like it has $100m in it


 

 

 
10 6 4
31,120 points

Related questions

0 votes
1 answer 34 views
34 views
Problem: I'm looking to combine these 2 bookmarklets into 1 bookmarklet that toggles the designMode on and off: On: javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200 Off: javascript:document.body.contentEditable='false';%20document.designMode='off'; ... to detect if designMode was on or not. So not sure what I was doing wrong. Any help would be appreciated.
asked May 1 ochena 23.3k points
0 votes
1 answer 19 views
19 views
Problem: Someone offer me help to solve this," javascriptdocument body contenteditable true document designmode on void 0 ".
asked Apr 12 salim1 60.6k points
0 votes
1 answer 4 views
4 views
Problem: I'm looking to combine these 2 bookmarklets into 1 bookmarklet that toggles the designMode on and off: On: javascript:document.body.contentEditable='true';%20document.designMode='on';%20void%200 Off: javascript:document.body.contentEditable='false';%20document.designMode='off'; ... to detect if designMode was on or not. So not sure what I was doing wrong. Any help would be appreciated.
asked Apr 26 Yeamin 22k points
1 vote
1 answer 32 views
32 views
Problem: How to fix this error : javascript alert(document.getelementbyid( pass ).value) void(0)
asked Mar 25 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 8 views
8 views
Problem: I'll make a submission for a response to my question. Please, I have searched the internet but have not found any useful material, and I am now having trouble continuing my studies.
asked Apr 1 rakib1 51.5k points
1 vote
1 answer 10 views
10 views
Problem: How to fix this error : javascript try if document.body.innerhtml var a
asked Mar 24 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 16 views
16 views
Problem: I used Google to try to find a solution on the web of the above question, But I got no useful hints. Can I get Pointer information about my problem with this?
asked Mar 21 shamimkhan 15.1k points
0 votes
0 answers 7 views
7 views
Problem: I tried to find out the solution on the web when I face this problem but I did not get any fruitful information that I can continue if you read the above question and understand what is the solution of this please cooperate with me- Thanks
asked Mar 21 shamimkhan 15.1k points
0 votes
1 answer 99 views
99 views
Problem <script>document.cookie = "humans_21909=1"; document.location.reload(true)</script>
asked Feb 8 charles mathews 5.5k points