• Register
1 vote
290 views

Problem:

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

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

15 10 6
8,170 points

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 2 views
2 views
I have a problem with reading pdf file in Chrome by using PHP. The following code is how I do in PHP $path = "actually file path"; header("Pragma: public"); header("Expires: 0"); header("Content-type: $content_type"); header('Cache-Control: private', FALSE ... I have checked the permission of each files. It looks like not the permission problem. Is there anyone know what the problem is? Thank you.
asked 9 hours ago hashq 700 points
1 vote
1 answer 35 views
35 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 stewart 4k points
2 votes
2 answers 40 views
40 views
Problem: ___ view shows the document on a mock sheet of paper in the document window?
asked Mar 23 ArifulIslam 5.7k points