How can I disable inline editing of a tag's text while still allowing oxy_editor support?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Fri Apr 12, 2013 11:19 pm
How can I disable inline editing of a tag's text while still allowing oxy_editor support?
Post by micah.hainline »
I have a tag in oxygen Author that I want to edit using a combo. I can do this, and I can also hide the text with the following css:
Unfortunately, the cursor can still be placed after the combo, and text can be typed there. How can I disable the ability for the user to type, while retaining the ability to update the text using the combo?
Code: Select all
mytag {
visibility:-oxy-collapse-text;
content: oxy_editor(type, combo,
edit, "#text",
values, "value1, value2",
labels, "my label one, my label two"
editable, false);
}
mytag:before {
content: "choose mytag value: ";
}
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: How can I disable inline editing of a tag's text while still allowing oxy_editor support?
Post by alex_jitianu »
Hi,
I suggest implementing an ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter. On methods handleTyping() and handlePasteFragment() you should reject the edit in "mytag" element, something like:
Best regards,
Alex
I suggest implementing an ro.sync.ecss.extensions.api.AuthorSchemaAwareEditingHandlerAdapter. On methods handleTyping() and handlePasteFragment() you should reject the edit in "mytag" element, something like:
Code: Select all
try {
AuthorNode nodeAtOffset = authorAccess.getDocumentController().getNodeAtOffset(offset);
if ("mytag".equals(nodeAtOffset.getDisplayName())) {
throw new InvalidEditException("Reject", "Allow edit only through form controls.", false);
}
} catch (BadLocationException e1) {
e1.printStackTrace();
}
Alex
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service