Comments (9)
DITA uses Relax NG for its master grammars, and specializations of DITA (which are encouraged) should be based on the RNG grammar. FWIW I found a codemirror derivative called "xmlmirror" ( https://lastlog.de/blog/posts/xmlmirror.html ) that claims to do schema-driven editing, including RNG-driven. Unfortunately xmlmirror's dependencies are very complex and it failed to install. But I'll keep looking around.
(I avoid Slack cos IMHO infinitely scrolling chat interfaces are useless IRL. But I'll leave notes here on this issue.)
from ponzu.
Hi @fbaube -
Could you elaborate on how this would be used? Or, how does myfield:"string" and using the editor.Richtext not already satisfy any requirements since you can put markup directly in the code view "<>", as you mentioned. You can add markup directly in the editor.Textarea function as well, but be mindful of how it is escaped.
I don't know if all the codemirror features/options are available, but if you test for a specific one and find that it is not available, let me know!
from ponzu.
I'm just thinking, specialised modes in editors always add nice functionalities. Codemirror has http://codemirror.net/mode/xml/
Schema-guided autocomplete is demo'd in https://codemirror.net/demo/xmlcomplete.html ; after you type "<" and select a tag, typing a space offers attributes.
I'd like to use this functionality for DITA. DITA has schemata in DTD, RNG, and XSD.
Unfortunately I've never actually configured Codemirror myself, so I have no idea how to proceed....
from ponzu.
Hi @fbaube - sorry for the delay, I must've missed the notification.
So just to be clear, you're looking to gain auto complete in the code view mode of the richtext editor?
I agree that this would be useful to add/edit markup, but I'm not as sure about adding a CLI specifier would be necessary. It should just be available in that mode by default IMO.
Unfortunately, the codemirror configuration is likely buried within the "materialnote" library I use to instantiate the richtext editor, and I'm not as familiar with its codebase as I probably should be. I will take a look at it though and let you know what i find.
from ponzu.
Autocomplete is the most desirable feature add, altho Codemirror has other XML enhancements too. I skimmed the Materialnote website and yes, it's a layer of complication if the goal is to directly tinker with Codemirror. But anything you can discover would be great !
I could provide a simplified version of the LwDITA DTD for testing purposes. The inline elements are much like HTML5; the block elements would be mostly new. There are additional attributes for things like links.
from ponzu.
Ok, thank you for clarification. I have added this as a suggested feature and will do my best to get it started. I created a Community Suggested Features project where I try to lay out a rough road map of whats to come, and what is in planning or development, so that anyone can come check out ideas to contribute if they would like.
I would love to get a PR for this, since admittedly the XML stuff is a bit outside my domain. If you'd like to work on it, let me know and I'll happily help get you started.
Since this feature is added to the project above, I will close out this issue for the time being. Feel free to join the #ponzu slack channel in the Gophers organization here: https://invite.slack.golangbridge.org and we can discuss further.
Link to project card: https://github.com/ponzu-cms/ponzu/projects/2#card-1726610
Thanks,
Steve
from ponzu.
Thanks! I will keep an eye on this too. I'm planning to dedicate more time over the next couple weeks to these types of issues.
from ponzu.
Now that I have found the RNGs for LwDITA (Lightweight DITA) I think I'll simply take a page in ponzu where the text edit widget works and then experiment with it until I get codemirror's XML functionality working.
from ponzu.
Sounds good. Let me know if you run into any issues -- I will admit, that code is a little messy 😄
from ponzu.
Related Issues (20)
- CLI is not working HOT 14
- Zap v11 was deleted HOT 14
- go module support HOT 9
- search sort HOT 2
- Custom databases HOT 3
- ponzu 0.11.0 fails to build HOT 2
- The "must" search operator in blevesearch can't be passed into ponzu HOT 1
- NOTICE: original author & maintainer is stepping away from the project HOT 7
- how to change to Summernote
- Redis Support for ponzu
- There is three CSRF vulnerability that can add the administrator account, delete administrator account, edit configuration.
- Only latest tag saving
- Error with "go get..." HOT 6
- Current state of Ponzu HOT 1
- Is this project still maintained? HOT 3
- Suggested install method no longer works HOT 2
- Is Ponzu dead? HOT 10
- Potential goroutine leak in achive.go
- How can you develop addons more efficiently?
- How to setup development env
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ponzu.