Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add format: AsciiDoc (Highlighter, TextActions) #808

Closed
Outi-s opened this issue Dec 29, 2019 · 19 comments · Fixed by #1876
Closed

Add format: AsciiDoc (Highlighter, TextActions) #808

Outi-s opened this issue Dec 29, 2019 · 19 comments · Fixed by #1876

Comments

@Outi-s
Copy link

Outi-s commented Dec 29, 2019

Hello @gsantner, I would like to put in a feature request for AsciiDoc support.

It is another markup language like Markdown. Currently, there is no app on Android supporting it.

Thank you for your hard work. Love the app.

@gsantner gsantner changed the title Feature Request: AsciiDoc Support (feature) Add format: AsciiDoc Dec 29, 2019
@gsantner gsantner added this to the Community Contribution milestone Jan 13, 2020
@harshad1
Copy link
Collaborator

I would be happy to donate/help however I can. This feature would be a huge plus for me.

@quesada
Copy link

quesada commented Feb 22, 2020

I would love to have asciidoc support too, and would consider donating.

@gsantner
Copy link
Owner

Implementation is waiting for contribution

@quesada
Copy link

quesada commented Feb 27, 2020

Contribution as in code or donation?

@gsantner
Copy link
Owner

Code

@ljwrites
Copy link

I too would love this feature. As asciidoc is plain text, however, the only support it really requires at minimum is the ability to open .adoc files (which is not required--the original Python AsciiDoc actually recommended .txt--but it does help with compatibility, syntax coloring support etc.). The newer AsciiDoctor Ruby port even has Markdown-compatible syntax for things like headers, so even now an AsciiDoc with MD-compatible headers would get partial syntax coloring & preview support with no other change required.

@gsantner
Copy link
Owner

gsantner commented Apr 30, 2020

Can others confirm, that it makes sense to load Markdown highlighting and actions for .adoc file extension?
Otherwise, lets load plaintext format.

md 😀, plaintext 🎉

@ljwrites
Copy link

ljwrites commented May 1, 2020

Sorry to betray my own premise, but I voted plaintext lol. MD compatible is not the default format, and not everything is compatible anyway so things could get confusing. While full AsciiDoc support would be wonderful in the long term, I'd be just as happy to be able to edit in plaintext.

@gsantner gsantner changed the title (feature) Add format: AsciiDoc Add format: AsciiDoc (Highlighter, TextActions) May 1, 2020
@gsantner
Copy link
Owner

Closing, so far nobody stepped up for this. If there is interest, start to work on it please and make a pull request. Thanks.

@aisbergde
Copy link
Contributor

Could you please reopen the issue?

For me this is the most important Feature Request. There is no Android app supporting AsciiDoc, and I still hope that sometimes in the future I can switch my notes system from markdown to asciidoc, after some basic support is somehow implemented into Markor.

I never developed in Java, but maybe you could give some hints where and how to start in Markor. Maybe I will understand how language support is implemented and I could add some starting implementation. But where to start? And maybe later some other developers can improve. Maybe this is not so much a question of Java but more about rules.

I understand that we will not get full asciidoc support, but maybe at least some basic support.

@aisbergde
Copy link
Contributor

What would be the right way to get asciidoc support into Markor?

@gsantner
Copy link
Owner

There is a PR open for txt2tags. It gives a overview of files that need to be touched / created

@aisbergde
Copy link
Contributor

aisbergde commented Aug 31, 2021

Yesterday I converted my markdown based notes system into a asciidoc based notes system, using kramdoc. There is no Android support for asciidoc and Markor is still my preferred Android editor.

I could also live without asciidoc preview on Android, because it is a plaintext format and easy to read. But I am curious, if it would be technical possible to use asciidoctor.js or AsciidoctorJ to render and preview.

Even without adoc preview I would like to request (or make) the editor to better work with AsciiDoc files. There are currently some specific editor settings for different file types: markdown, todo, plaintext... Would it be not too complicated to add asciidoc as additional language with some small changes compared to markdown?

  • different header system, based on "="
  • different sorted and unsorted list style support
  • different html link style. Currently I can't find, how to change the default markdown html link style which is used, when I use "send to Markor" and I started to use copy and paste of the html links. Is there a configuration which I can't find or is this style hard coded?
  • maybe some other specific features?

BTW, the main reason for switching was: I use AsciiDoc and Antora for technical documentation in different projects. And it is a bit hard to interchange content between my markdown based notes system and the technical project documentations.
Still open: switch my jekyll static site hosted as github page to asciidoc, or enable a mix of both.

@gsantner gsantner reopened this Sep 30, 2021
@aisbergde
Copy link
Contributor

Is there any way to support the preview of asciidoc documents?

Currently I do the following

  • Edit .adoc documents with Markor
  • I use "NiM Web Server" to deliver the content for use with a browser that supports asciidoc preview
    • Configuration
      • "Index Pages" - additional entry index.adoc
      • "Mime Types" - additional entry ".adoc" as "text/plain".
      • "Document root" - folder used by Markor for documents
  • Using a web browser for which you can install Google Chrome Extensions
    • Kiwi browser, Yandex browser, ...
    • Installing the extension "Asciidoctor.js Live Preview".
  • Start the web server to see the preview

This works, but is a bit cumbersome. It would be good to get to the preview directly from Markor.

  • It would be good to have an embedded Chromium-based browser that includes the Asciidoctor extension.
  • The above described combination of web server, browser with extension and direct link to it would already simplify the work.

However, I have no idea how and if this could be done. Maybe one could configure an action with file extensions (in the case .adoc)?

@gsantner
Copy link
Owner

Is there any way to support the preview of asciidoc documents?

Somebody who overall implements it and maintains the code base regulary.

@aisbergde
Copy link
Contributor

I understand that until now nobody worked on this. But maybe as a first step it would be possible to just add asciidoc as "format type" even not supporting formatting yet. At least a specific toolbox could be implemented for asciidoc. There are several block markers, sorted lists are different. I can't program in Java, but I could provide a list of useful toolbar items. It would also allow to format markdown but to not format asciidoc content.

@gsantner
Copy link
Owner

gsantner commented Jan 2, 2022

If you implement whatever part of it, or find somebody to do it - happy to review.

But just adding a asciidoc button, which is 100% equal to plaintext usage won't get added. Then you can just use plaintext format.

@aisbergde
Copy link
Contributor

Finaly I am looking for more flexibility in the tool bar for different format types in General.
I am using the plain text toolbar for asciidoc, but I can't find how to adapt or extend it for my personal needs. It looks like it is hard coded. Maybe there are other ways to get this flexibility into tool bars? For example a general way to use user defined format types and related to them different user defined tool bars? Or ways to extend and adapt existing tool bars?

@aisbergde
Copy link
Contributor

I created a fork of the project, will learn development with Java, then implement and maintain an AsciiDoc format into Markor. I will start with required action buttons and some changes in the syntax highlighting.

aisbergde added a commit to aisbergde/markor-asciidoc that referenced this issue Oct 2, 2022
aisbergde added a commit to aisbergde/markor-asciidoc that referenced this issue Oct 2, 2022
aisbergde added a commit to aisbergde/markor-asciidoc that referenced this issue Oct 2, 2022
…specifik special key menu. Still many TODOs
aisbergde added a commit to aisbergde/markor-asciidoc that referenced this issue Oct 3, 2022
@gsantner gsantner linked a pull request Oct 5, 2022 that will close this issue
macuyler pushed a commit to macuyler/markor that referenced this issue Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants