Ace editor is not editing the text - ace-editor

I am not able to edit the text in ace editor.
I am using the following code to do the same
var editor = ace.edit("editor");
editor.setValue(ed.getContent(), -1)
editor.setTheme("ace/theme/monokai");
editor.getSession().setMode("ace/mode/html").setReadOnly(false);
the link to code is here.
can some one help me out to resolve this issue?

Related

CKEditor 4 h2 inside a

I try to put this in the source code of CKEditor:
<h2>Title</h2>
It automatically transforms into this:
<h2>Title</h2>
I tried setting config.allowedContent = true; in config.js, but it does not do anything.
Thank you
Please have a look at below issues:
https://dev.ckeditor.com/ticket/9457
https://github.com/ckeditor/ckeditor-dev/issues/514
CKEditor in general doesn't support transparent content model, but perhaps based on tip from second link, you will be able to achieve that result by changing the editor DTD.

How can I store raw html with ckeditor 4

I just integrate CKEditor 4 in my web, the problem is when I paste HTML code into edit area like this
enter image description here
the value I got is enter image description here
So, Is there a way I can store Raw Html like the first picture?
UPDATE: I want CKEditor know when I paste HTML Code, Output HTML also is raw HTML
UPDATE:
I add these lines to my config.js
config.htmlEncodeOutput = false;
config.fullPage = true;
config.basicEntities = false;
It solved the problem

dynamic value inside richtext editor

I am tring to use some data from my content to be shown in richtext editor.
but It shows as a text;
var contactDetails = #Umbraco.TypedContentAtRoot().ElementAt(2);
#contactDetails["Phone"]
You'll have to use a macro for that and allow to use them in the rich text editor.
https://our.umbraco.org/documentation/reference/templating/macros/

Why form class is highlighted as red?

Can somebody tell me which the cause of form class that highlighted as red? What's the meaning of this? I can't get rid of it. I already close the form at the end of the line. But when I view the page source this is what look like.
This is your editor trying to be helpful by highlighting the form tag.
As you're writing HTML make sure you're using an editor that supports more than PHP, like Atom or Sublime Text. Or tell your editor that you're editing HTML.

XUL - textbox problem

I am writing a Firefox extension. When a user highlights and right clicks a selected text on a webpage, the extension captures the text and displays it in a textbox (xul window). The textbox shows the correct formating (like the line breaks, spaces, * for li tags.). But the problem happens when i try to store the textbox value in a variable. The line breaks are gone.
var selText = document.getElementById("txtboxSelectedText").value; //
Can anybody help?
Thanks a lot.
Is this a real textbox or a rich text editor like tinyMCE or open wysiwyg?
In a real textbox there are linebreaks. In the rich text editors, they are really iframes with html content... what looks like a line break is really a <br/> tag.
The reason I suspect this is you can't have li tags (and their associated bullet points) inside a normal textbox

Resources