Editor stops me typing - "read only context"?

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
DanTemple
Posts: 26

Editor stops me typing - "read only context"?

Mon Jun 29, 2015 10:35 am

Version 17.1, Linux

I'm just editing a perfectly normal DITA file in Author mode - writable, editable etc, and I found if I try to type something at a specific point in the text, a popup appears and says "cannot insert text inside a read-only context".

Heres the source code: I am just aligning the // comments, as you can see I have done three, but the fourth one won't play ball, if I try to type spaces in front of the //:

<codeblock>
MII_CTRL.phyAddr = &lt;phy mii address&gt; // 0..31
MII_CTRL.regDevAddr = &lt;phy device address&gt; // 0..31
MII_CTRL.interface = &lt;0/1&gt; // Select interface to use
MII_CTRL.wrIndAddr = &lt;indirect address&gt;// Set indirect address
MII_CTRL.wrDataInd = &lt;data to write&gt; // Initiate the write
wait until MII_CTRL.busy == 0// Writing is done
</codeblock>

Not a problem as I can change to text mode and fix it, but I thought you might want to know....
Radu
Posts: 5221

Re: Editor stops me typing - "read only context"?

Mon Jun 29, 2015 11:31 am

Hi Dan,

The problem is caused by the fact that the original XML content has "&gt;" entity references in it.
This is not necessary, so you can replace for example in the entire codeblock the &gt; with ">" and the XML will still be wellformed.

Oxygen preserves those entity references in the Author content so if the caret position is considered to be inside the entity reference (you can see in the top breadcrumb toolbar the place where the caret is located), Oxygen will complain it cannot edit inside the entity reference. In such case you can press the RIGHT arrow once to exit the entity reference and place the caret after the reference and not inside it.

But I will also add an issue on our side to somehow remove this tricky behavior which does not help our users.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 5221

Re: Editor stops me typing - "read only context"?

Thu Oct 20, 2016 2:50 pm

Hi,

Just to update this thread, in Oxygen 18.1 the editor no longer complains when the caret is inside a entity reference (at the beginning or end of the entity reference) and you try to make modifications, the modifications will be made outside of the entity reference.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “Common Problems”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests