ji-devs / ji-wysiwyg-editor

Jewish Interactive Wysiwyg Editor
https://jewish-interactive.github.io/ji-wysiwyg-editor/
MIT License
0 stars 0 forks source link

Allow totally clean font list #3

Closed dakom closed 5 years ago

dakom commented 5 years ago

e.g. to start from scratch so that we can supply only the fonts we have pre-loaded as web fonts

jpuri commented 5 years ago

@dakom : is not possible to know what all fonts has been loaded on the page, is it possible that you pass this list to the editor component ?

dakom commented 5 years ago

Yes - that's the intent of this issue, to allow the containing app/component to manually supply the list.

It is up to the containing app/component to preload them before starting the editor :)

jpuri commented 5 years ago

I have already added Hebrew fonts: https://github.com/jewish-interactive/ji-wysiwyg-editor/issues/6. I will make this change also 👍.

jpuri commented 5 years ago

Font family prop has now been added to the editor and fonts are required to be passed.

        <JiEditor
          defaultValue={"<p>testing</p>"}
          onChange={this.updateEditorContent}
          fontFamily={[
            "Assistant",
            "Varela Round",
            "David Libre",
            "Frank Ruhl Libre"
          ]}
        />
jpuri commented 5 years ago

Released ji-wysiwyg-editor@0.1.9