dankito / RichTextEditor

Rich text WYSIWYG editor for Android and JavaFX
Apache License 2.0
92 stars 36 forks source link

How to customize blockquotes #35

Closed rezziqbal06 closed 4 years ago

rezziqbal06 commented 4 years ago

How to costumize blockquote in editor to appear vertical line before text?

dankito commented 4 years ago

Hi,

as the underlying implementation uses HTML / JavaScript you can simply style it with CSS.

Place a file called 'platform_style.css' in your app's src/main/assets folder and style the blockquote element there:

blockquote {
   // your custom style here
}
rezziqbal06 commented 4 years ago

Thank you for your response

rezziqbal06 commented 4 years ago

One thing i wanna ask, Can i set font in editor from src/main/res/fonts ? How to do that?

dankito commented 4 years ago

It's true, currently I list only system fonts (see files SystemFontsParser and FontNamesUtils and the according commands SetFontNameCommand and SetFontNameWithPreviewCommand).

But I really don't know how

a) a custom font can be used generally in Android's WebView,

b) how this then can be configured to use this custom font via JavaScript.

If you can give me any hint how to do this or even better give me a pull request with working code I can implement this.

But in general: For new questions please open a new issue.