Editor stops me typing - "read only context"?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DanTemple
Posts: 26
Joined: Tue Oct 28, 2014 1:19 pm

Editor stops me typing - "read only context"?

Post by DanTemple »

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 = <phy mii address> // 0..31
MII_CTRL.regDevAddr = <phy device address> // 0..31
MII_CTRL.interface = <0/1> // Select interface to use
MII_CTRL.wrIndAddr = <indirect address>// Set indirect address
MII_CTRL.wrDataInd = <data to write> // 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: 9057
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu »

Hi Dan,

The problem is caused by the fact that the original XML content has ">" entity references in it.
This is not necessary, so you can replace for example in the entire codeblock the > 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: 9057
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu »

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
Post Reply