GithubHelp home page GithubHelp logo

fvtt-markdown-editor's People

Contributors

atomdmac avatar dependabot[bot] avatar moerill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fvtt-markdown-editor's Issues

[BUG] Global "GM Settings" not applied to player clients

Describe the bug
The GM Settings menu is a global setting, meaning players can't view it or change the options within. Despite being global, however, changing the settings as the GM only affects the GM's individual client. So, as it currently stands, there is no way to disable markdown text areas/editors in player clients.

To Reproduce

  1. Create a new world with a GM and a player. Enable this module.
  2. Log into the world in two different browsers, one for the GM user, the other for the player user (I used Firefox for the GM, Chrome for the player).
  3. As the GM, disable the Activate markdown support for chat. setting. Allow the page to refresh when the dialog prompts it. Note that the player browser does't refresh automatically, so do so manually.
  4. Type # Hello in the chat text area of both browsers. In the GM browser the text is styled normally, as you'd expect having deactivated markdown in the chat. In the player browser, however, it is styled as a header, indicating that the Activate markdown support for chat. setting had no effect on the player's client.
  5. You can test the same thing for the Activate markdown support for all rich text editors. setting using a journal entry for which the player has owner privileges. The player's client continues to use the markdown editor despite the GM setting being deactivated.

Expected behavior
I'd expect the GM Settings options to have a global effect on both GM and player clients rather than just affecting the GM's.

Module incompatibilities
Works with no other modules enabled.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox, Chrome
  • FVTT Version: 0.8.8
  • Module version: 0.5.0

Chat Box Shrinks with Ernie's Modern UI Module Enable

I'm not sure if it makes sense to report here or not given that fvtt-markdown-editor works fine with the stock Foundry VTT styles but I figured I'd mention it. The chat input looks like this when Ernie's Modern Layout is enabled.

image

This seems to be fixed by adding width: 100% to the .EasyMDEContainer element in the .chat-form element.

I can submit a PR to fix this later if others think that this repo is the appropriate place to address it.

General code restructuring

Inherit from the EasyMDE class, make it easier to update the libraries used, ...

still TODO:

  • Chat integration (Enter, PG up/Down)
  • defaultoptions
  • make use of the _onEditorSave method to provide better compatibility with other modules (e.g. quest log)
  • VIM Mode
  • create plugin manager to allow for other modules to modify memes behaviour
  • ???

Journal drag and drop not working within journals

Module version 3.2
Foundry version 0.6.5
Browser Chrome
OS Windows 10

When using markdown and opening a journal with embedded links for other journals the embedded links now show text rather than the entity links themselves that can be clicked on and followed to other journals. 0

With Markdown
image

Without Markdown
image

Entity links in chat do not work.

Module Ver. 0.3.2
FVTT Ver. 0.6.5
Using App, but also on Chromium-based browsers

When using markdown editor in conjunction with Combat Utility Belt's enhanced conditions module it refuses to print the link for the journal entry of the condition, I suspect because markdown doesn't like being surrounded by html tags and the chat message being made uses a template.

Picture:
image

Should be easy to create:

  1. Have both:
  • Combat Utility Belt 1.1.3
  • MEME 0.3.2
  1. Make sure at least Output to Chat is checked in the CUBPuter under Enhanced Conditions
  2. Put a condition from enhanced conditions on any token and have it output to chat

I think it would be pretty unreasonable to suggest accounting for every module posting to the chat. My personal suggestion would just be to allow the ability to turn off markdown in chat as a setting, but I'll leave it up to your judgement.

Discord Handle: @mercedes-benz#4852

Let me know if I missed something, I can post full module list as well but I tried on a fresh world with just those two and got the same results.

Collection Plugin Ideas

I made MEME to be extendable by different plugins, so everyone can have his/her custom meme!
All these plugins though should go into their separate modules, so there is no "dead code weight" for people not using those features (and less breaking modules if a feature doesn't work or so)
Also this allows for more people to just create their own plugin, without having to bother with me being to lazy to react to pull requests or possibly complaining about not liking stuff! If you need any more hooks or help for creating plugins, just contact me here or on discord and i'll try to help.

A small list of plugin ideas, to be updated:

  • Table of Content creator and view (create a ToC and a possible extra view to jump to the specific part)
  • Header to map pin creator (Create a map pin for each header, generate an SVG [customizable?] with the first few characters)
  • Markdown to mindmap ( https://markmap.js.org/repl/ , possibel MINDMAP module replacement? )

Feel free to add your own ideas in the comments! (Or claim some ideas there if you want.)

Why is nothing happening? Where are the updates?

Heya
Just a small update from my side:
I am currently and for the near future kinda busy with personal stuff/work and am not able to do much module work. This state will last at least until mid september.
If something really breaks i hope to be able to provide those bug fixes.

Also any big changes/feature updates will propably not come for FVTT 0.6.X anymore, but will be designed for FVTT 0.7.X. (Since i'd guess that its going to be at beta or close to it then.)

Best regards
Moerill

[PF2e] strange behaviour for text spanning multiple lines

When a text spans multiple lines without linebreak codemirror does strange stuff.
The cursor gets to big (spanning all the lines affected), selecting feels like it can#t decide what exactly it wants to select, ...

Search for difference PF2e (items) and other editors, try to solve it.

[BUG] Quick Insert compatibility: Keybind check console error

Description
When using the Quick Insert module (Now requiring Keybind lib), pressing "Enter" or "Backspace" when typing a chat message does not carry out the default behaviour. Instead a console error is thrown which halts the keybind default action. More detail below:

Quick Insert
Keybind lib

Bug
The below console error is thrown from a codemirror when checking the Quick Insert keybind settings game.settings.get('quick-insert', 'quickOpen'):

Uncaught Error: This is not a registered game setting
    get foundry.js:1146
    onRender quick-insert.js:30
    fe codemirror.js:568
    me codemirror.js:577
    ua codemirror.js:7196
    ei codemirror.js:3923

image

Steps to replicate

  1. Install Quick Insert, Keybind Lib and MEME
  2. Start typing a regular chat message
  3. Press "Enter" or "backspace"
  4. "Enter" will create a new line, rather than send the chat message
  5. "Backspace" will do nothing

Expected Behaviour
"Enter" should send the chat message, rather than throw an error.

Desktop:

  • OS: Windows 10
  • Browser Chrome/Firefox
  • FVTT Version 0.8.7
  • Module version 0.5.0

Missing Features

  • inline roll parsing
  • Compendium autocompletion (Using Quick Insert module)
  • anything else i missed

[BUG] Incompatibility with Cautious Gamemaster's Pack's notify typings feature

Describe the bug
Using MEME together with Cautious Gamemaster's Pack breaks one of Cautious Gamemaster's Pack's features, namely notify typings.
There are no console errors as far as I can tell.

To Reproduce
Steps to reproduce the behavior:

  1. Install Cautious Gamemaster's Pack and MEME
  2. Enable both of them in the same dnd5e world.
  3. Enable notify typings in Cautious Gamemaster's Pack settings (disabled by default).
  4. Use multiple tabs/windows/browsers to test if it works. (or ask somebody to type in game while you're testing)

Expected behavior
A box should pop up below the chat box notifying that a user is typing.

Module incompatibilities
I tried using Cautious Gamemaster's Pack on its own as well with 20 other modules at once which produced the desired result, so I am fairly confident it is these two modules conflicting.

Screenshots/GIFs/Videos
Example of the notification from Cautious Gamemaster's Pack page.

Desktop:

  • OS: Windows 10
  • Browser: Firefox
  • FVTT Version: 0.7.5
  • MEME version: 0.5.0
  • Cautious Gamemaster's Pack version: 0.1.6

Additional context
I have noticed the features stopped working some time in the past but only decided to pinpoint the reason now. I am fairly certain it has persisted since at least Foundry version 0.6.6 and MEME version 0.3.X. I am not sure about Cautious Gamemaster's Pack version however.

[Bug] Conflict with Tidy5e Sheet

Module Version: 0.3.2
FVTT Version: 0.6.6
Browser/OS: Firefox, Windows 10

Bug description:
The roll icon is broken when the two modules are enabled together, disabling either of the modules fixes it.
No console errors.

To Recreate: Install Tidy5e Sheet and MEME and enable them both in the same dnd5e world.

Screenshots:

both modules enabled
both_1
both_2

only MEME enabled
meme_1
meme_2

only tidy5e sheet enabled
tidy_1
tidy_2

Discord for further questions: Ghost desu#1312

Incompatibility with Dice Tray

While MEME is on, for players only (not for GM) Dice Tray buttons under the chat window will not add anything in the text field of the chat window, but will still roll.

Requesting compatibility with Forien's Quest Log

MEME breaks certain vital Quest Log functions like saving quest descriptions and closing out Quest Log windows.
As per Forien "it probably expects text editors to be exclusively used on entity sheets and Quest Form is not entity sheet".

Settings Menu and removal of welcome screen

Basic Settings Menu consisting of:

  • basic information (welcome screen)
  • Toggle settings for general editor and chat integration (world based?)
  • Basic information about module integrations working (or not)

[BUG] quick insert module call inside MEME

Using the template
Choose a fitting title to your issue.
Please go through each section, adding as much detailed information as possible and remove the default text. If a section is completly irrelevant for some reason, delete it completly.
Also ideally be somewhat responsive in this issues thread so you can answer possible questions i have.

Describe the bug
I don't see how to call Quick insert inside a journal note to reference an entity. With the default editor, there is a magnifying glass icon but this does not seem to be the case with "Meme »
when I use the shortcut inside the editor, (ctrl + ), it calls Quick insert to find the entity but it is outside the editor

To Reproduce
Steps to reproduce the behavior:

  1. Go to a journal note or a window
  2. Click on the button to activate the editor
  3. try to insert a reference to an entity with quick insert

Expected behavior
the ability to enter a link (@entity...) in the editor

Module incompatibilities

Screenshots/GIFs/Videos
Capture d’écran 2020-12-22 à 13 51 28
picture of the editor after having entered the shortcut "ctrl + "

Desktop (please complete the following information):

  • OS: apple
  • Browser chrome
  • FVTT Version .79
  • Module version 0.50

Additional context

[Improvement] Syntax Highlighting

Is your feature request related to a problem? Please describe.
Some highlighting can be hard to read

Describe the solution you'd like
Do some custom highlighting, preferably using the default FVTT styles and classes, if CodeMirror does allow for that.

[BUG] 'close' button (to close an journal entry for example) no longer works

Describe the bug
Since version 0.4, the 'close' button (to close an journal entry for example) no longer works. Nothing happens when I click on it so it is impossible to close once open

Desktop (please complete the following information):

  • firefox or chrome on mac os
  • FVTT Version 0.6.6
  • Module version 0.4

[BUG] With vim keybindings, pressing Esc hides the cursor and prevents further interaction until I click the text again

Describe the bug
With vim keybindings, pressing Esc hides the cursor and prevents further interaction until I click the text again.

To Reproduce

  1. Start editing text
  2. Press Esc
  3. Cursor disappears

Expected behavior
It should not make the cursor disappear, spamming Esc is a common way to make sure you're in normal mode.

Module incompatibilities
Same thing with this being the only module installed.

Screenshots/GIFs/Videos
Not necessary.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • FVTT Version 0.7.7
  • Module version 0.5.0

[BUG] Conflict with Forien's Scene Navigator

Module Version: v0.3.2

Describe the bug
@ SceneActivate and @ SceneView links become just text when activating Moerills Efficacious Markdown Editor even when regular @ Scene links remain clickable.

To Reproduce
Steps to reproduce the behavior

  1. Create either @s ceneActivate or @ SceneView entitly link in journal entry
  2. Save Journal Entry
  3. Activate Moerills Efficacious Markdown Editor
  4. Open previous journal entry
  5. See previously clickable @ Scene entily link as only text

Expected behavior
When both MEME and Forien's Scene Navigator are active, I am able to edit a document in Markdown as well as add Scene Activation and Viewing entity links to journal entries.

Screenshots
Bug-MEME_Active-FSN_Active
BUG-MEME_Inactive-FSN_Active

Browser:

  • Firefox v79.0

Foundry Version:

  • Foundry v0.6.6

Game System:

  • DND5e - Fifth Edition System 0.96

Additional context
FoundryVTT - Forien's Scene Navigator

[FEATURE] HTML to Markdown conversion

Describe the solution you'd like
For better backwards compatibility and ease of use with already existent TinyMCE created entries add an option to (maybe automatically) convert HTML to Markdown.

[FEATURE] double click to edit

Double click on text to edit at that specific point.
Probably keep the on hover button for easiness of transition from base FVTT..?

[BUG] HTML rendering is broken

Describe the bug
With the new version of the markdown editor it is not possible to render html tags. My guess is that the new markdown renderer escapes these characters.

Console Errors
There are no console errors.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Journal Entry
  2. Edit the entry and add some HTML tags (e.g. <img src="...">)
  3. Save the entry
  4. The Journal Entry only shows the escaped characters instead of rendering the html

Expected behavior
The with the old version this was possible and could be used to have more control over images (e.g. align to left or right, specify resolution, ...).

Screenshots/GIFs/Videos
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser Chromium / Firefox
  • FVTT Version 0.6.6
  • Module version 0.4.1

Secret Button is not working to secret the text.

Describe the bug
Select some Text, Click Secret Button.
Error in Console.

mmde.js:97 Uncaught ReferenceError: rules is not defined
at Object.toggleSecretBlock [as action] (mmde.js:97)
at HTMLButtonElement.e.action.e.action.s.onclick (easymde.js:235)

Code Crash point here.
` static toggleSecretBlock(editor) {
const secretChars = '$$$';
let cm = editor.codemirror;
const text = cm.getSelection();
let cur_start = cm.getCursor('start'),
cur_end = cm.getCursor('end');

if (cur_start.line !== cur_end.line || cur_start.ch !== cur_end.ch) {
    const start_line = cur_start.line,
          end_line = cur_end.line,
          end_text = cm.getLineHandle(end_line).text;
    const orig_text = cm.getRange({line: cur_start.line, ch: 0}, {line: cur_end.line, ch: end_text.length}),
            cap = rules.block.secret.exec(orig_text);
    let new_text = orig_text,`

This line here...
cap = rules.block.secret.exec(orig_text);

To Reproduce
Open Jornal.
Cerate a new Entry.
Click Edit
Cut and paste a block of text into it.
Highlight text with the mouse.
Click Secret Button.

Expected behavior
For the text to gain $$$ at the start and end of the highlighted paragraph.

Module incompatibilities
Occurs with no other modules loaded.
Also with no other modules loaded there is a report of
foundry.js:5361 Uncaught (in promise) TypeError: Cannot read property 'offsetHeight' of undefined at JournalSheet.activateEditor (foundry.js:5361) at foundry.js:32637
As well as the original error.

Screenshots/GIFs/Videos
image

Desktop (please complete the following information):

  • OS: Linux
  • Browser chrome
  • FVTT Version [0.7.9]
  • Module version [0.5.0]

Formatting Inconsistencies in Character Sheet

Environment

Markdown Editor Module: 0.0.4
Foundry VTT: 0.6.5
Browser: Firefox 78.0.1 / Chromium 83.0.4103.97
OS: Arch Linux, OSX

Bug Description

Some editor instances incorrectly apply formatting when saving. So far I have only found the issue in system-specific Applications so it's possible that changes would need to be made at the system-level. Still, I'm reporting here in the hopes that it's a more general problem that can be addressed in one place.

Reproduction Steps

  • Add a header (header level doesn't seem to matter)
  • Add some normal/paragraph text below it
  • Save the changes
  • The header formatting will stick but the content below it will be formatted as "code" (ex. like this)

Examples of affected editors:

  • Description field in DnD5e item/weapon sheet
  • Description field in Savage Worlds character sheet

Examples of editors that do not seem affected by the bug:

  • Biography field in DnD5e character sheet
  • Journal entries

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.