-
Notifications
You must be signed in to change notification settings - Fork 263
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
[Feature]: Add proper html support for token notes. #3791
Comments
I already have this in my personal use branch. I combined the JFX HtmlEditor control with rsyntaxtextarea. |
Any potential issues with that? Likely to break on future Java releases? |
I will wait with a PR until #3785 is merged because this change depends on that. |
Nice. |
Tested. Better HMTL support in notes. Seems to add in extra whitespace but the HTML can be edited directly if needed. |
Agreed. Do we have control over the tabs at the bottom? Could a third one for Markdown be added? IIRC, rsyntaxarea is capable of supporting just about any syntax highlighting if we can find/create our own regexes to handle where each type of highlighting begins and ends. For upward compatibility... When loading a campaign, if the first characters (skipping leading whitespace, of course) are |
Maybe we should just put the format of the notes into the campaign properties? Not sure if it different token in the same campaign should have different formats of notes. |
IMO we should just add relevant fields to Token or CampaignProperties and check if we are opening an old campaign and ask the use what type of notes he wants. |
Auto detection would always fallback to plain text (unless the user selects otherwise in Preferences). So only HTML and Markdown formats would be processed (HTML AS IS, while Markdown would be converted to HTML on the fly). We already auto detect a lot of stuff when reading the campaign and always have; it’s one reason why MT can read campaigns from 15 years ago with minimal impact. Each token has its own settings, as some on the Object layer may just be informational and used by the GM or players as reference points, while others might have more formatted info in them or even data (as you point out). |
I'll add a text type for notes and gmnotes for now with text/plain as default. Supported mime type will be text/plain, text/html and text/markdown. I'll reorder the tabs making TXT the first one the HTML tab also works as a (not editable) preview for markdown. I'll also only store the content of the body tag from the html editor. |
Feature Request
Currently one can use html tags in token notes, but there is no proper html editor for them. Also the hover display inserts
for every linebreak in the notes. One can only work around it by having all html code in one line.
The Solution you'd like
I would also like to be able to just copy & paste content from websites into those fields and keep formating.
Best would be a WYSIWYG editor for html with the ability to edit the source code if necessary.
Alternatives that you've considered.
Only using one line of html text. But I still can't paste HTML this way.
Additional Context
No response
The text was updated successfully, but these errors were encountered: