• Register
1 vote
2k 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,250 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 18 views
18 views
Problem <script>document.cookie = "humans_21909=1"; document.location.reload(true)</script>
asked Feb 8 charles mathews 3.8k points
0 votes
1 answer 6 views
6 views
Problem: When building a link that is for the sole purpose of executing href, there are 2 ways to write the code. Which is better, in terms of functionality, page load speed, validation purposes, etc? <a href="#" onclick="myJsFunc();">Run javascript Code</a> or <a href="javascript:void(0)" onclick="myJsFunc();">Run JavaScript Code</a>
asked Feb 12 sasha 8.4k points
1 vote
1 answer 66 views
66 views
Problem : I am very new to Linux and currently trying to learn Linux. I want to login to my elementaryOS but I am stuck in the loop I simply tried to enter my password and after that I tried to press enter and I was back to login again. I also tried to enter my ... after spending lot of time and efforts on it still unable to fix it so now I am looking for the Linux experts help to fix above error.
asked May 1, 2020 stewart 4k points
2 votes
2 answers 74 views
74 views
Problem: ___ view shows the document on a mock sheet of paper in the document window?
asked Mar 23, 2020 ArifulIslam 7.5k points
1 vote
2 answers 54 views
54 views
Problem: Hypertext markup language specifies how text, graphics, video, and sound are placed on a document?
asked Mar 23, 2020 ArifulIslam 7.5k points
0 votes
1 answer 216 views
216 views
Problem : My blog feed showing me following error today: This page contains the following errors: error on line 2 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error
asked Dec 6, 2019 alecxe 7.5k points